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 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 ,
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 IPAddressType { ip, gw, route, ip_only }
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("btnPrinter", Properties.Resources.Printer, "Add a printer 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("btnWRouter", Properties.Resources.WRouter, "Add a Wireless Router 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.
if(ItemClickedOn!= null)
{
if (ItemClickedOn.GetNetType() == NetworkComponentType.microwave || ItemClickedOn.GetNetType() == NetworkComponentType.fluorescent)
return;
DeviceConfig editwindow = new DeviceConfig(ItemClickedOn);
editwindow.ShowDialog();
pbNetworkView.Update();
@ -769,6 +773,12 @@ namespace EduNetworkBuilder
case "btnCopier":
NC = myNetwork.AddItem(NetworkComponentType.copier, CenteredLocation);
break;
case "btnMicrowave":
NC = myNetwork.AddItem(NetworkComponentType.microwave, CenteredLocation);
break;
case "btnFluorescent":
NC = myNetwork.AddItem(NetworkComponentType.fluorescent, CenteredLocation);
break;
case "btnWAP":
NC = myNetwork.AddItem(NetworkComponentType.wap, CenteredLocation);
break;

View File

@ -392,6 +392,10 @@ namespace EduNetworkBuilder
{
string answer = hostname;
//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)
{
if (nic.GetNicType == NicType.wport || nic.GetNicType == NicType.port)
@ -543,6 +547,12 @@ namespace EduNetworkBuilder
case NetworkComponentType.copier:
MyImage = Properties.Resources.Copier;
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>
<comment>RTFWindow RTFW_lblFind = Find</comment>
</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>