microwave and light logic for display
This commit is contained in:
parent
bc68ff91b0
commit
d128340987
@ -953,6 +953,8 @@ namespace EduNetworkBuilder
|
|||||||
if(NB.GetComponentType(NC) == GeneralComponentType.device)
|
if(NB.GetComponentType(NC) == GeneralComponentType.device)
|
||||||
{
|
{
|
||||||
ND = (NetworkDevice)NC;
|
ND = (NetworkDevice)NC;
|
||||||
|
if (ND.GetNetType() == NetworkComponentType.microwave || ND.GetNetType() == NetworkComponentType.fluorescent)
|
||||||
|
continue;
|
||||||
tList.Add(ND.hostname);
|
tList.Add(ND.hostname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -646,6 +646,8 @@ namespace EduNetworkBuilder
|
|||||||
List<string> macStrings = new List<string>();
|
List<string> macStrings = new List<string>();
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
bool CanUse = true;
|
bool CanUse = true;
|
||||||
|
if (myType == NetworkComponentType.microwave || myType == NetworkComponentType.fluorescent)
|
||||||
|
return macStrings;
|
||||||
foreach (NetworkCard nic in NICs)
|
foreach (NetworkCard nic in NICs)
|
||||||
{
|
{
|
||||||
if (OnlyUnused)
|
if (OnlyUnused)
|
||||||
@ -668,7 +670,9 @@ namespace EduNetworkBuilder
|
|||||||
public List<string> NetworkCardInterfaceStrings(int index)
|
public List<string> NetworkCardInterfaceStrings(int index)
|
||||||
{
|
{
|
||||||
List<string> myList = new List<string>();
|
List<string> myList = new List<string>();
|
||||||
if(index >= 0 && index < NICs.Count)
|
if (myType == NetworkComponentType.microwave || myType == NetworkComponentType.fluorescent)
|
||||||
|
return myList;
|
||||||
|
if (index >= 0 && index < NICs.Count)
|
||||||
{
|
{
|
||||||
myList.AddRange(NICs[index].IPAddresses());
|
myList.AddRange(NICs[index].IPAddresses());
|
||||||
}
|
}
|
||||||
@ -772,17 +776,19 @@ namespace EduNetworkBuilder
|
|||||||
int counter = 0;
|
int counter = 0;
|
||||||
CenterString(BaseImage, x, y + (counter * gap), hostname, Color.Black);
|
CenterString(BaseImage, x, y + (counter * gap), hostname, Color.Black);
|
||||||
counter++;
|
counter++;
|
||||||
|
if (myType != NetworkComponentType.microwave && myType != NetworkComponentType.fluorescent)
|
||||||
|
{
|
||||||
foreach (NetworkCard nic in NICs)
|
foreach (NetworkCard nic in NICs)
|
||||||
{
|
{
|
||||||
if(nic.GetNicType != NicType.lo && nic.GetNicType != NicType.port && nic.GetNicType != NicType.wport)
|
if (nic.GetNicType != NicType.lo && nic.GetNicType != NicType.port && nic.GetNicType != NicType.wport)
|
||||||
{
|
{
|
||||||
string title = "";
|
string title = "";
|
||||||
if (nic.GetNicType == NicType.management_interface)
|
if (nic.GetNicType == NicType.management_interface)
|
||||||
title += "if: ";
|
title += "if: ";
|
||||||
else
|
else
|
||||||
title += nic.NicName() + ": ";
|
title += nic.NicName() + ": ";
|
||||||
foreach(string addr_str in nic.IPAddresses(true))
|
|
||||||
|
foreach (string addr_str in nic.IPAddresses(true))
|
||||||
{
|
{
|
||||||
CenterString(BaseImage, x, y + (counter * gap), title + addr_str, Color.Black);
|
CenterString(BaseImage, x, y + (counter * gap), title + addr_str, Color.Black);
|
||||||
counter++;
|
counter++;
|
||||||
@ -790,6 +796,7 @@ namespace EduNetworkBuilder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
IsDirty = false; //We printed it, now we are content that we are clean
|
IsDirty = false; //We printed it, now we are content that we are clean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user