Process for connecting a network link to the device it is connected to. Without this, cloned networks fail.
This commit is contained in:
parent
ff37a1b0ef
commit
4c921ab280
@ -1556,6 +1556,23 @@ namespace EduNetworkBuilder
|
||||
return didanything;
|
||||
}
|
||||
|
||||
public bool DoAllMarkAsLinked()
|
||||
{
|
||||
bool didanything = false;
|
||||
NetworkLink nl;
|
||||
foreach (NetworkComponent nc in NetComponents.ToList())
|
||||
{
|
||||
if (NB.GetComponentType(nc) == GeneralComponentType.link)
|
||||
{
|
||||
nl = (NetworkLink)nc;
|
||||
nl.MarkAsLinked();
|
||||
didanything = true;
|
||||
}
|
||||
}
|
||||
|
||||
return didanything;
|
||||
}
|
||||
|
||||
public bool DoAllAutoJoin()
|
||||
{
|
||||
bool didanything = false;
|
||||
|
@ -118,6 +118,16 @@ namespace EduNetworkBuilder
|
||||
myNet.MarkAsLinked(DstNic, GetUniqueIdentifier);
|
||||
}
|
||||
|
||||
public void MarkAsLinked()
|
||||
{
|
||||
Network myNet = NB.GetNetwork();
|
||||
if (myNet != null)
|
||||
{
|
||||
myNet.MarkAsLinked(SrcNic, GetUniqueIdentifier);
|
||||
myNet.MarkAsLinked(DstNic, GetUniqueIdentifier);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Save(XmlWriter writer)
|
||||
{
|
||||
writer.WriteStartElement("link");
|
||||
|
Loading…
Reference in New Issue
Block a user