|
What sort of pond life would downvote such an excellent answer to a question? Compensation provided.
|
|
|
|
|
Thanks. I have to admit, I was surprised by the vote as I thought I'd given a clear enough start to get someone on the way with extension methods. Oh well
|
|
|
|
|
Hi
I have about 1000 2d points that I draw a ClosedCurve on bitmap then on picturbox, but I want saving a few points from this 1000 points that are necessery to drawing previous ClosedCurve or shape.
Thanks
|
|
|
|
|
What have you tried, where exactly are you stuck?
What do you mean when you say saving? When will you draw that previous ClosedCurve? When the application restarts? When the user hits the undo button? On the whim of a butterfly flapping its wings ?
Give us more info, so we better understand the question.
|
|
|
|
|
thanks, suppose we have an image that contain a shape like "s", this "s" formed from thousands points or pixels. well, we want drawing a shape like "s" whit .DrawCurve method in C# but we don't want .DrawCurve accept that thousnds parameter(or points). we want detect a few number of point that are critical(in mathemathics) or necessary points then draw same shape("s"). of course if we detect this points we can use DrawLine or DrawBezier and etc methods to draw same shape("s").
|
|
|
|
|
how to read .Zim file in C#
|
|
|
|
|
Well, you're probably going to need to write something that implements the .ZIM file format[^]. There is no default implementation in the BCL.
|
|
|
|
|
I am able to create a XML file with:
="1.0"="ISO-8859-1"
with the following codes:
XmlWriterSettings settings = new XmlWriterSettings();
settings.Indent = true;
settings.Encoding = Encoding.GetEncoding("ISO-8859-1");
XmlWriter writer = XmlWriter.Create("C:\\XML files\\XML_File.xml", settings);
How can I add standalone="no" after encoding="ISO-8859-1" as
="1.0"="ISO-8859-1"="no"
Thanks for any help
|
|
|
|
|
|
When I use the link and set:
writer.WriteStartDocument(true) ; then I have
="1.0"="ISO-8859-1"="true"
However when I set:
writer.WriteStartDocument(false) ; then I have
="1.0"="ISO-8859-1"
*) What I need as mentionned before:
="1.0"="ISO-8859-1"="no"
Thanks for help, we are close!
|
|
|
|
|
|
Thanks for the link, it is OK if I viewing my xml file with Notepad!
|
|
|
|
|
I had the same problem. I had to go with XmlDocument:
XmlNode docNode = doc.CreateXmlDeclaration("1.0", "iso-8859-1", "no");
I'm guessing you are viewing this in a browser instead of a text file. One thing that you may notice is that the "ISO" becomes capitalized in a browser, but if you look at it with a text editor like Notepad, it looks the way you want it. Also, the browser translates "no" to "false". If you want to see what it looks like exactly, use Notepad.
You might also try this:
XmlSerializer xmlSer = new XmlSerializer(typeof(T));
using (MemoryStream mem = new MemoryStream())
{
using (XmlWriter writer = XmlWriter.Create(mem))
{
string doubleQuote = ((char)34).ToString();
string s = "version=" + doubleQuote + "1.0" + doubleQuote + " encoding=" + doubleQuote + "iso-8859-1" + doubleQuote + " standalone=" + doubleQuote + "no" + doubleQuote;
writer.WriteProcessingInstruction("xml", s);
xmlSer.Serialize(writer, objectToSerialize);
}
}
modified 20-May-14 19:51pm.
|
|
|
|
|
Yes, you are right about seeing it with Notepad which I have:
Thanks for clarifying it
|
|
|
|
|
I need to add onclick method to textbox inside grid.In this scenerio i can bind the client id the get the value of that grid item inside javascript method or can bind directly the value to the javascript method which is the best way for implementation
1. binding the client id and getting the value
txtbx1.attributes.add("onclick","Getvalues('txtbx1')");
If i am passing id javascript will search complete html,so performance will be less
2. Bind value directly to the method
txtbx1.attributes.add("onclick","Getvalues('20')");
No need to search get the value directly performance will be good
My answer is 2 .
|
|
|
|
|
|
Hi,
Anyone know this link[^] looks like MSDN has posted all the major used dll source code that can be downloaded.
_AKA_KSN_
|
|
|
|
|
Please, only post in one forum only. Duplicate posts aren't appreciated.
|
|
|
|
|
i wanna create some component like telerik , dev component by using component class and using c# .anyone can help me on this ? i coul not find any article that used component class! please help
|
|
|
|
|
Probably by writing a lot of code. Now if you have a proper question, perhaps you would like to try explaining it in detail.
|
|
|
|
|
wanna create combo box with check box list inside and make it as a dll file !
i wanna create collection of my own custom control as telerik did!
|
|
|
|
|
Ah! Easy: open a VS solution and right click the solution name in the Solution explorer.
Select "Add...New Project..." from the context menu, and wait for the dialog.
Select "Class Library" from the available project types and give it a suitable name - perhaps "UtilityControls"
Press "OK".
Look at the new class library project, and delete the existing class it added for you - you don't need that.
Now right click the project name and select "Add...User Control..."
Give it a suitable name - perhaps "MyCheckCombo" and press "Add".
You will now have a blank canvas to start designing your control on.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
That was easy - really!
And I wasted weeks after weeks to create a component pack for me company...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
You gotta learn to code faster, that's your problem!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
but i do'nt wanna use usercontrol instead using component class , i have seen a exaple but do'nt know how does it work in component class, please help meeeee
you can see that in this article component has been used!
A ComboBox with a CheckedListBox as a Dropdown[^]
|
|
|
|