|
Yeah, very similar. The difference is more how it's used than in how it's coded. And again, don't be afraid to ask questions. As long as the questions are like "How do you use the SaveFileDialog control?", and not "Can someone give me the sourcecode for a FTP Program", you'll do fine.
Kyosa Jamie Nordmeyer - Taekwondo Yi (2nd) Dan
Portland, Oregon, USA
|
|
|
|
|
How do you work out that kind of thing? Have you got books? If so, can you recommend any?
Thanks.
(sorry if this has double posted, something up with my connection)
|
|
|
|
|
You can also follow the simpler code like this if you are using .NET 2.0 (VS 2005)
SaveFileDialog dlg = new SaveFileDialog();<br />
dlg.Filter = "Text Files|*.txt|Comma Seperated Files|*.csv|All Files|*.*";<br />
if (dlg.ShowDialog() == DialogResult.OK)<br />
{<br />
File.WriteAllText(dlg.FileName, txtContent.Text); <br />
}
|
|
|
|
|
Hmm. I've never called this method before. It must call Flush internally. I've had mixed results closing or disposing the StreamWriter class without flushing first.
Thanks for the tip.
Kyosa Jamie Nordmeyer - Taekwondo Yi (2nd) Dan
Portland, Oregon, USA
|
|
|
|
|
hi,
when use the code given by you it saves a file but unfortunately it saves it without newline characters ie.,. I want to save my work as it is displayed in the multiline text box.can you help me please
Don't wait to hear a word of thanks from anybody when you help them instead ask them to help three other people and ask them to continue in chain.
|
|
|
|
|
Are you writing each line on its own using the StreamWriter.Write method, or are you writing the entire contents of the textbox to the Write method? If you're writing each line on its own, then you need to use WriteLine, not Write.
Kyosa Jamie Nordmeyer - Taekwondo Yi (2nd) Dan
Portland, Oregon, USA
|
|
|
|
|
I'm trying to create a restaurant point of sale system that has the ability to send messages (xml files) over a LAN. Basically I would like to send orders from a front desk/dining area to the kitchen. Can someone please point me in the general direction of what to look up in order to do so? I'm not familiar with LAN stuff at all...
Thanks
|
|
|
|
|
|
thank you sir
|
|
|
|
|
I totally agree, because someone said, how do I create a text editor it made me actually think about making one myself, and by asking specific questions, I got specific answers. So, yeah do not just ask for something. Analyze the problem, think about what you want it to do, try and figure things out (Microsoft Visual C# 2005 is great for this, if you hover over functions) then if you still have no idea, post a specific question.
|
|
|
|
|
mmmm buddy, I think you should really be using a database, instead of "sending" orders to the kitchen
|
|
|
|
|
WCF (or if you have to use old stuff: a WebService). Remoting is a posible solution if you want to add complexity and remove flexibility.
The database is obviously something that could be used on the server (kitchen side in your example I guess), though for a small test example storing XML will probably do. If you use a database, access it from business logic on the server side, do not access it directly from the client side.
|
|
|
|
|
There has been an alarming amount of questions from people who want others to do their (home)work for them. They put zero effort into solving, or even understanding, the problem themselves.
If someone does not attempt to solve their problem themselves, please DO NOT HAND FEED them the answer. The question "Can you send me code" has been used way too many times without any effort on their part.
By all means point them in the right direction, but do not do their homework for them.
|
|
|
|
|
Well said, got my 5....
.... but so many people have posted exactly the same thing and it just doesnt sink in.
|
|
|
|
|
Agreed entirely.
Kyosa Jamie Nordmeyer - Taekwondo Yi (2nd) Dan
Portland, Oregon, USA
|
|
|
|
|
OK, this regular expression works great with the System.Text.RegularExpressions.Regex object:
^\d{3}(-?)\d{2}\1\d{4}$
but bombs out when used with Javascripts (IE7) RegExp object. I'm not using any options (multiline, ignoreCase, etc.). Has anybody heard of issues with the IE 7 Javascript engine having issues with back references, or any other weird regex stuff?
Kyosa Jamie Nordmeyer - Taekwondo Yi (2nd) Dan
Portland, Oregon, USA
|
|
|
|
|
|
have you used the @ setting for the string or quallified the slashes?
|
|
|
|
|
The @ setting doesn't matter in my case, as the Regex string is being written to client script for use by the Javascript RegExp object. Thanks for the thought, though. No, that's always the first thing I check. This was just me being a bone head and forgetting to use \\ instead of \. D'Oh!!!
Kyosa Jamie Nordmeyer - Taekwondo Yi (2nd) Dan
Portland, Oregon, USA
|
|
|
|
|
Forgive my ignorance, but if you're writing a script with C#, wouldn't the @ make it literal, thus be written as is?
"^\d{3}(-?)\d{2}\1\d{4}$" <= wouldn't work.
"^\\d{3}(-?)\\d{2}\\1\\d{4}$" <= would work
@"^\d{3}(-?)\d{2}\1\d{4}$" <= result is same as above
|
|
|
|
|
|
I was hoping that was the problem. I was about to rumble through my c# books on regex
thanks
|
|
|
|
|
|
can anyone tell me how to create text editor in c#.
Don't wait to hear a word of thanks from anybody when you help them instead ask them to help three other people and ask them to continue in chain.
|
|
|
|
|
you can start your homework with a multiline textbox.
|
|
|
|