jonassvensson4

Untitled

Apr 16th, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.63 KB | None | 0 0
  1. //Router  1
  2. Ping ping1 = new Ping();
  3. PingReply pingresult1 = ping1.Send(textBoxRouter1.Text, timeout, buffer, options);
  4. if (pingresult1.Status.ToString() == "Success")
  5. {
  6.     pictureBoxRouter1.Image = Properties.Resources.router_online;
  7.     toolTip0.SetToolTip(pictureBoxRouter1, "Ethernet: " + textBoxRouter1.Text + " | UP" + Environment.NewLine + "Serial 0: " + "192.168." + textBoxSerialAB.Text + ".2" + " | UP" + Environment.NewLine + "Ethernet: " + textBoxRouter1.Text + " | UP" + Environment.NewLine + "Serial 1: " + "192.168." + textBoxSerialBC.Text + ".1" + " | UP");
  8.  
  9.     richTextBoxOutput.Text += "-------------------------------------------";
  10.     richTextBoxOutput.Text += Environment.NewLine + "ROUTER - B";
  11.     richTextBoxOutput.Text += Environment.NewLine;
  12.     richTextBoxOutput.Text += Environment.NewLine + "Ethernet: " + pingresult1.Address.ToString();
  13.     richTextBoxOutput.Text += Environment.NewLine + "Serial 0: " + "192.168." + textBoxSerialAB.Text + ".2";
  14.     richTextBoxOutput.Text += Environment.NewLine + "Serial 1: " + "192.168." + textBoxSerialBC.Text + ".1";
  15.     richTextBoxOutput.Text += Environment.NewLine;
  16.     richTextBoxOutput.Text += Environment.NewLine + "Response time: " + pingresult1.RoundtripTime + "ms";
  17.     richTextBoxOutput.Text += Environment.NewLine + "Time to live: " + pingresult1.Options.Ttl;
  18.     richTextBoxOutput.Text += Environment.NewLine + "Don't fragment: " + pingresult1.Options.DontFragment;
  19.     richTextBoxOutput.Text += Environment.NewLine + "Buffer size: " + pingresult1.Buffer.Length;
  20.     richTextBoxOutput.Text += Environment.NewLine + "-------------------------------------------";
  21. }
  22. else
  23. {
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment