Ping Command - MonoNetwork!!
After spending all the day (Sunday) jajaja creating a GUI using Glade and having it be pretty easy, but getting frustrated by how linked my code for the ping command and the GUI was, I needed to update tue GUI for each response of the command. I was looking for information about delegates and threads.
I found that: !! Responsive Application !!
http://www.mono-project.com/Responsive_Applications
It’s an excellent article which teaches you how to program multi-threaded GTK# well as how to keep your GTK# application responsive.
I could solve my problem using the follow methods:
notify = new ThreadNotify (new ReadyEvent (updatemygui));
notify.WakeupMain ();
private void updatemygui()
{
< << code >>
}
The reason I decided upon using these methos is because you can update the GUI from other thread. I create a Thread with which I can execute the ping command and get the results after that I call the method WakeupMain.
When you call the method (WakeupMain) the ThreadNotify wake and execute the method (updatemygui).

As you can see! The main Thread create a second thread and the ThreadNotify. When the second Thread calls the wakeupmain also calls the sleep so that while the second thread is sleeping, the GUI is updated by the first thread with the new results from the ping command.
Well I need to check the follow points:
1.- Packages Received
2.- Packages Transmited
3.- Packages Lost
4.- Programming the progress bar
5.- The time for each request of the ping command
But I’m so tired !! I hope I’ll do something during next week


