Microwave and fluorescent light additions

This commit is contained in:
Tim Young 2015-08-13 20:00:43 -06:00
parent 2633e08950
commit adec041382
5 changed files with 29 additions and 1 deletions

View File

@ -32,7 +32,7 @@ namespace EduNetworkBuilder
public enum ResponseToPacket { none, accept, masq, drop, reject } public enum ResponseToPacket { none, accept, masq, drop, reject }
public enum DebugLevel { none=0, info=1, routing=2, switching=4, natting=8, filtering=16, debug=32 , packet=64, all=127} public enum DebugLevel { none=0, info=1, routing=2, switching=4, natting=8, filtering=16, debug=32 , packet=64, all=127}
public enum NetworkComponentType { none, router, net_switch, net_hub, laptop, pc, server, wap , public enum NetworkComponentType { none, router, net_switch, net_hub, laptop, pc, server, wap ,
wrouter, wbridge, wrepeater, link, firewall, ip_phone, printer, copier } wrouter, wbridge, wrepeater, link, firewall, ip_phone, printer, copier, microwave, fluorescent }
public enum NicType { none, lo, eth, wlan, wan, vpn, tun, management_interface, port, wport } public enum NicType { none, lo, eth, wlan, wan, vpn, tun, management_interface, port, wport }
public enum IPAddressType { ip, gw, route, ip_only } public enum IPAddressType { ip, gw, route, ip_only }
public enum nb_direction { none, to_src, to_dst } public enum nb_direction { none, to_src, to_dst }

View File

@ -282,6 +282,8 @@ namespace EduNetworkBuilder
BuildButton("btnFirewall", Properties.Resources.firewall, "Add a firewall to the network."); BuildButton("btnFirewall", Properties.Resources.firewall, "Add a firewall to the network.");
BuildButton("btnPrinter", Properties.Resources.Printer, "Add a printer to the network."); BuildButton("btnPrinter", Properties.Resources.Printer, "Add a printer to the network.");
BuildButton("btnCopier", Properties.Resources.Copier, "Add a copier to the network."); BuildButton("btnCopier", Properties.Resources.Copier, "Add a copier to the network.");
BuildButton("btnMicrowave", Properties.Resources.microwave, "Add a microwave to the network.");
BuildButton("btnFluorescent", Properties.Resources.fluorescent, "Add a light to the network.");
//BuildButton("btnWAP", Properties.Resources.wap, "Add a Wireless Access Point to the network."); //BuildButton("btnWAP", Properties.Resources.wap, "Add a Wireless Access Point to the network.");
//BuildButton("btnWRouter", Properties.Resources.WRouter, "Add a Wireless Router to the network."); //BuildButton("btnWRouter", Properties.Resources.WRouter, "Add a Wireless Router to the network.");
//BuildButton("btnWBridge", Properties.Resources.WBridge, "Add a Wireless Bridge to the network."); //BuildButton("btnWBridge", Properties.Resources.WBridge, "Add a Wireless Bridge to the network.");
@ -718,6 +720,8 @@ namespace EduNetworkBuilder
//This mouse-up is part of a double-click operation. //This mouse-up is part of a double-click operation.
if(ItemClickedOn!= null) if(ItemClickedOn!= null)
{ {
if (ItemClickedOn.GetNetType() == NetworkComponentType.microwave || ItemClickedOn.GetNetType() == NetworkComponentType.fluorescent)
return;
DeviceConfig editwindow = new DeviceConfig(ItemClickedOn); DeviceConfig editwindow = new DeviceConfig(ItemClickedOn);
editwindow.ShowDialog(); editwindow.ShowDialog();
pbNetworkView.Update(); pbNetworkView.Update();
@ -769,6 +773,12 @@ namespace EduNetworkBuilder
case "btnCopier": case "btnCopier":
NC = myNetwork.AddItem(NetworkComponentType.copier, CenteredLocation); NC = myNetwork.AddItem(NetworkComponentType.copier, CenteredLocation);
break; break;
case "btnMicrowave":
NC = myNetwork.AddItem(NetworkComponentType.microwave, CenteredLocation);
break;
case "btnFluorescent":
NC = myNetwork.AddItem(NetworkComponentType.fluorescent, CenteredLocation);
break;
case "btnWAP": case "btnWAP":
NC = myNetwork.AddItem(NetworkComponentType.wap, CenteredLocation); NC = myNetwork.AddItem(NetworkComponentType.wap, CenteredLocation);
break; break;

View File

@ -392,6 +392,10 @@ namespace EduNetworkBuilder
{ {
string answer = hostname; string answer = hostname;
//Add IP Addresses that are assigned //Add IP Addresses that are assigned
if (myType == NetworkComponentType.fluorescent)
return NB.Translate("ND_FluorescentTooltip");
if (myType == NetworkComponentType.microwave)
return NB.Translate("ND_MicrowaveTooltip");
foreach (NetworkCard nic in NICs) foreach (NetworkCard nic in NICs)
{ {
if (nic.GetNicType == NicType.wport || nic.GetNicType == NicType.port) if (nic.GetNicType == NicType.wport || nic.GetNicType == NicType.port)
@ -543,6 +547,12 @@ namespace EduNetworkBuilder
case NetworkComponentType.copier: case NetworkComponentType.copier:
MyImage = Properties.Resources.Copier; MyImage = Properties.Resources.Copier;
break; break;
case NetworkComponentType.fluorescent:
MyImage = Properties.Resources.fluorescent;
break;
case NetworkComponentType.microwave:
MyImage = Properties.Resources.microwave;
break;
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -713,4 +713,12 @@
<value>Find</value> <value>Find</value>
<comment>RTFWindow RTFW_lblFind = Find</comment> <comment>RTFWindow RTFW_lblFind = Find</comment>
</data> </data>
<data name="ND_FluorescentTooltip" xml:space="preserve">
<value>Fluorescent Light: corrupts ethernet packets that travel too close</value>
<comment>Network Device Fluorescent Tooltip = Fluorescent Light: corrupts ethernet packets that travel too close</comment>
</data>
<data name="ND_MicrowaveTooltip" xml:space="preserve">
<value>Microwave: corrupts wireless packets that travel too close</value>
<comment>NetworkDevice Microwave Tooltip = Microwave: corrupts wireless packets that travel too close</comment>
</data>
</root> </root>