Click here to Skip to main content
15,067,405 members

Comments by tornadofay (Top 7 by date)

tornadofay 18-Nov-15 20:38pm View
I don't understand where your problem is, as I understand from your question is that you get error when you parse String to IPAddress if that what you mean then
I tried this at new windows application
using System.Net;
private void button1_Click(object sender, EventArgs e)
string sc = IPA.Text;
var ip = IPAddress.Parse(sc);
while (IPA is TextBox)& tested under .NET 3.5 , .NET 4
I tested for input range ~ and it works fine with no problems at all.
for tests like (-, 255.2552, ABC.fhf.0.1) ofcourse it will through Exception so you will need to do some validation there before parsing.

it will be more helpful to edit your post and add Exception (Message, Source and Stack trace) as it will give better understanding of your problem.
tornadofay 17-Nov-15 15:31pm View
thanks for your reply,
I will try the Community Edition, although I use MoonPdfPanel - A WPF-based PDF Viewer Control[^] to display PDF combined with the above Method for printing and it's running pretty good.
tornadofay 10-Nov-15 11:10am View
the user must type the UID, can it be automatic ?
like that the user enter 1232015 then leave the text that's where leave event fire we can at this event, get the last ID from DB for example then add +1 to it then add the last part to textbox text progamtically
tornadofay 7-Nov-15 14:53pm View
this Solution may solve your problem, but Solution 4 is much far better, it's the right way to do validation than this way + it's easier to maintain in the long run.
I recommend solution 4 as better answer to your problem.
tornadofay 6-Nov-15 21:44pm View
check the code i updated it to be compatible always with current year
tornadofay 6-Nov-15 14:52pm View
no problem, for this type of validations you better write it first on paper in steps for what you really need. if you done it right on paper then it will be so easy to implement with code.
tornadofay 6-Nov-15 14:48pm View
thanks,I don't know how i didn't see this.
any more suggestions ?