diff --git a/EduNetworkBuilder/Network.cs b/EduNetworkBuilder/Network.cs index d137578..718eab0 100644 --- a/EduNetworkBuilder/Network.cs +++ b/EduNetworkBuilder/Network.cs @@ -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; diff --git a/EduNetworkBuilder/NetworkLink.cs b/EduNetworkBuilder/NetworkLink.cs index 7ac62b7..11106a6 100644 --- a/EduNetworkBuilder/NetworkLink.cs +++ b/EduNetworkBuilder/NetworkLink.cs @@ -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");