Update ping stuff again

This commit is contained in:
Tim Young 2015-11-19 16:04:08 -05:00
parent 4897217d7b
commit afff91667b

View File

@ -669,7 +669,7 @@ namespace EduNetworkBuilder
bool todo = true; bool todo = true;
if (ItemClickedOn == null) return; //we do not have something chosen to ping from if (ItemClickedOn == null) return; //we do not have something chosen to ping from
IPAddress destination = new IPAddress(NB.ZeroIPString, NB.ZeroIPString, IPAddressType.ip_only); IPAddress destination = new IPAddress(NB.ZeroIPString, NB.ZeroIPString, IPAddressType.ip_only);
todo = destination.Edit(ItemClickedOn, NB.Translate("NB_NetViewPng")); todo = destination.Edit(ItemClickedOn, NB.Translate("_Ping"));
if(todo) if(todo)
{ {
ItemClickedOn.PingFromHere(destination); ItemClickedOn.PingFromHere(destination);
@ -696,7 +696,7 @@ namespace EduNetworkBuilder
if (ItemClickedOn == null) return; //we do not have something chosen to ping from if (ItemClickedOn == null) return; //we do not have something chosen to ping from
ToolStripMenuItem Pressed = (ToolStripMenuItem)sender; ToolStripMenuItem Pressed = (ToolStripMenuItem)sender;
string itemname = Pressed.Text; string itemname = Pressed.Text;
string dest = Regex.Replace(itemname, NB.Translate("H_ARP_Title "), ""); string dest = Regex.Replace(itemname, NB.Translate("H_ARP_Title")+" ", "");
IPAddress destination; IPAddress destination;
destination = myNetwork.DNSLookup(ItemClickedOn, dest); destination = myNetwork.DNSLookup(ItemClickedOn, dest);
if (destination == null || destination.GetIPString == NB.ZeroIPString) if (destination == null || destination.GetIPString == NB.ZeroIPString)