|
Yeah. The 'this' isn't strictly necccesary but it makes the code a little clearer.
|
|
|
|
|
hi
i want a control (like pictureBox) that display an image as map with pan & zoom tools to navigate in it, does exist that control?
thanks
|
|
|
|
|
|
thanks for reply
but i want to use in windows application in offline mode (not required intenet connection)
does exist it ?
thanks
|
|
|
|
|
Hi guys!
having a bit of a problem.. im picking upp value from file rowes, and i live in sweden so we use the characters å,ä,ö a lot.
so i want to replace the å ä ö with something else, because when i return the row in a listview the ö are like ? or something like that... =(
i have tryade to save in diffirent encoding.. nothing works! anyone with the same problem as me??
i pick upp info from rowes like this:
String row5 = File.ReadAllLines(file)[row];
string[] tecken = row5.Split(';');
string person = tecken[21];
anyone with good suggestions??
thanks!! peace!
|
|
|
|
|
UTF-8 should support Swedish characters. Are they not storing in your file correctly, or is it the listView not displaying them correctly?
|
|
|
|
|
i think its the listview hwo doesn´t display them correclty. beacouse i have tryade every encoding..
are i changing the ecoding throught advanced save options????
Thanks
|
|
|
|
|
I've tested the listView and it displays them fine.
Are you specifying the encoding to use when reading your file as I think that's where your problem is?
System.Text.Encoding swedishEncoding;
swedishEncoding = System.Text.Encoding.UTF8;
swedishEncoding = System.Text.Encoding.GetEncoding(437);
System.IO.StreamReader swedishReader = new System.IO.StreamReader("myPathHere", swedishEncoding, false);
|
|
|
|
|
Hi,
I have some Problems with Serialization:
I have a class B that is inside a class A:
public class A
{
[Serializable]
public class B
{
public int Number;
}
}
When I try to serialize/deserialize it with the XML Serializer it does not work.
Is it possible to serialize a class that is inside a class (so I have to search the bug elsewhere) or is it impossible (so I have to change the structure of the classes)?
Thanks
Roland
|
|
|
|
|
OK, found the Problem:
My class contains an IPAddress that can not be serialized by the XML Serializer because there is no default constructor. I only looked if the Attribute Serializable is set...
I tested and saw that with a simple class like the onein my example there is no problem with serializing a class inside a class...
Greets
Roland
|
|
|
|
|
Hello all:
How can I through (form1) by any control for example change the value of a textbox of another form (i e form2). any idea please......
Thanks
|
|
|
|
|
Try this: [ColinMackay]
I just now figured out how to do it lol
|
|
|
|
|
Hello :
Thanks a lot about this link , I'm really praise it
Thanks
|
|
|
|
|
I
l
i
k
e
y
o
u
r
t
a
l
l
s
i
g
.
C
a
n
'
t
y
o
u
m
a
k
e
i
t
a
b
i
t
t
a
l
l
e
r
?
|
|
|
|
|
Make it taller?
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
According to MSDN, methods of IEnumerator are expected to throw an exception if the enumerated collection has been modified
For Example,
<br />
List<int> list = new List<int>();<br />
list.Add(1);<br />
<br />
IEnumerator enumerator = list.GetEnumerator();<br />
<br />
enumerator.Reset();
<br />
list.Add(2);
<br />
enumerator.Reset();
When implementing the methods of IEnumerator in our own class, we should have them throw the exception if the collection is modified.
Now I have a class :
<br />
class MyEnumerator:IEnumerator{<br />
int[] integers;<br />
<br />
<br />
public void Reset(){ }<br />
}
How to implement Reset in an elegant way, so that I can throw an InvalidOperationException when Reset is called after integers are modified?
Thank you!
|
|
|
|
|
Hi,
I have not done this yet, but here is an idea:
- in the object you want to be able to enumerate, keep a generation counter that starts at
zero and gets incremented every time you modify the collection (hence Add, Remove, Clear,
... all contain "generation++;")
- in the enumerator hold a copy of the generation counter, equal to the collection's
generation at the moment you create the enumerator
- in each enumerator method compare enumerator generation with collection generation;
when unequal, throw the exception.
Refinement: to reduce the risk of generation overflow, rather than incrementing all the time,
your collection could keep two generation values (current and next), that both start at zero.
Each modification sets "generation=nextGeneration;", and each getEnumerator
does "generation=nextGeneration++;" hence the generation can only increase if an enumerator
has been requested.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Yeah, I see, thanks for your neat idea.
Then my collection class has to expose an extra property, say Generation{get{}}, right?
|
|
|
|
|
SeeBees wrote: expose an extra property, say Generation{get{}},
Not really, if your Collection inherits from an existing one, you can implement
your own public override IEnumerator GetEnumerator() just like the
original collection did.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
can any body have any idea regarign calendar delegation in OWA. any link or any idea !!!
Thanks in advance
|
|
|
|
|
Hi
I want to create a custom toolbar having a drop down menu and two controls (a textbox and a button) for Internet Explorer using c#. i have never done this type of work before. it is a core functionality of my project. can anyone tell me about this.
Ahmed
|
|
|
|
|
This[^] article should get you started.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Every time I maximize an MDI child window, it resizes the icon in the parents menubar and deforms everything, is there a way to prevent the icon showing at all.
P.S. I set the Child ShowIcon command to flase, but it still brings up a small icon in the menubar, I don't want that either.
modified on Saturday, February 02, 2008 8:52:34 AM
|
|
|
|
|
Hi,
I have a printer that is connected to computer with usb port.
How can I print a file (document or image) using the printer?
i.e with clicking a button printing of the file began.
Best wishes
|
|
|
|
|
Hi,
.NET contains a number of classes that deal with printing (PrintDialog, PrintDocument, ...).
It does not matter how your printer is connected to your PC, as long as it has a valid driver
it should pop up in the list of available printers (as in the Printer combobox in Word's
print dialog).
Look for examples in the CodeProject articles; my Sokoban article knows how to print
a simple graphic.
Note: I do not claim it is simple, taking care of print previewing, page orientation,
duplexing and collating is rather hard. It is after all a complex matter.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|