[RESOLVED] Map system which mointors the network using PING
The It manager of my company handed over me a project it was a simple 1
first it was like develop the network map of the company to display the workstations and continuously ping each and every workstation and display tht status weather its down or working .....
I used some static buttons and designed a form didn't do anything dayanamicaly bt later after some time he asked me to make it dynamical I mean
the user should be able to add pc's or workstations using this software ....
now I am trying every thing to do this software ... I couldn't get a good idea ... pls can any one help me ? no need a lecture just shed some light ... :)
I am now downloading XNA to try using tht previously I tried to create buttons (which will represent workstations ) dayanamically bt no use
I cannot name em
Button <any name> = new Button();
I cannot change the anyname part so I left it and now I am out of clue pls help !!!
Re: Map system which mointors the network using PING
I'm not sure whether XNA is going to help you anything.
It's basically for game designing.
Other than that I'm not really sure what you are doing with the buttons.
Can you post a screenshot?
Re: Map system which mointors the network using PING
the best example is Cisco packet tracer
http://www.cemkefeli.com/image.axd?p...leTopology.png
I wanna create a program like tht bt I know tht its too complex .. so I thought I will create buttons dynamically
this is to display a network for example one button will represent the router or switch other buttons will act as nodes I will assign each node (button an IP address) so when I click a node(button) a popup will open and then It will ping tht node ...
this is what I am trying...
I am ok with the ping and all but I am struggling with the GUI
Re: Map system which mointors the network using PING
But what do you have now?
Can you post a screen of that?
Re: Map system which mointors the network using PING
http://img814.imageshack.us/img814/4192/12005691.jpg
vb Code:
private void panel1_DoubleClick(object sender, EventArgs e)
{
//MouseEventArgs mv = new MouseEventArgs(System.Windows.Forms.MouseButtons.Left,2,10,10,0);
int x = Cursor.Position.X;
int y = Cursor.Position.Y;
label1.Text = x.ToString();
label2.Text = y.ToString();
//Point screenPos = this.MousePosition;
Button[] btnArr = new Button[2];
btnArr[0] = new Button();
btnArr[0].Name = "IAmButton";
//btnArr[0].Left = x;
//btnArr[0].Top = y;
btnArr[0].Location = new Point(x, y);
btnArr[0].Size = new Size(50, 20);
btnArr[0].Text = "check";
panel1.Controls.Add(btnArr[0]);
}
Update :
Run time
http://img412.imageshack.us/img412/5669/44336746.jpg
Re: Map system which mointors the network using PING
Quote:
Originally Posted by
nVidia
vb Code:
private void panel1_DoubleClick(object sender, EventArgs e)
{
//MouseEventArgs mv = new MouseEventArgs(System.Windows.Forms.MouseButtons.Left,2,10,10,0);
int x = Cursor.Position.X;
int y = Cursor.Position.Y;
label1.Text = x.ToString();
label2.Text = y.ToString();
//Point screenPos = this.MousePosition;
Button[] btnArr = new Button[2];
btnArr[0] = new Button();
btnArr[0].Name = "IAmButton";
//btnArr[0].Left = x;
//btnArr[0].Top = y;
btnArr[0].Location = new Point(x, y);
btnArr[0].Size = new Size(50, 20);
btnArr[0].Text = "check";
panel1.Controls.Add(btnArr[0]);
}
If that is working already, you don't even have to name them.
You can give the .Tag property the IP or something like that and add an event here using btnArr[0].Click += .... (when you type += you can hit 'tab' twice and it creates an event handler for you).
Then in the event handler use the sender to get the tag of the clicked button.
Re: Map system which mointors the network using PING
yea ... thx and I wanna know are there any other methods to do the same thing ?
can v use GDI to do the same thing ... I just saw picture box drag and drop thread...
pls advice !