network loads and saves NetShapes
This commit is contained in:
parent
e9fe9095b6
commit
3b0bb6358f
@ -23,6 +23,10 @@ namespace EduNetworkBuilder
|
||||
InArea = Where;
|
||||
WhatColor = color;
|
||||
}
|
||||
public NetShape(XmlNode what)
|
||||
{
|
||||
Load(what);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draw the specified shape on the image
|
||||
|
@ -68,6 +68,7 @@ namespace EduNetworkBuilder
|
||||
private List<Image> PacketImages = new List<Image>();
|
||||
private List<PingTestStatus> PingTestStats = new List<PingTestStatus>();
|
||||
private List<string> BrokenItems = new List<string>();
|
||||
private List<NetShape> Shapes = new List<NetShape>(); //For storing simple shapes which are drawn on the network
|
||||
public bool IsRandomNetwork = false;
|
||||
|
||||
private List<AnimationClass> Animations = new List<AnimationClass>();
|
||||
@ -271,6 +272,10 @@ namespace EduNetworkBuilder
|
||||
StartingHelpLevel = NB.ParseEnum<NetTestVerbosity>(Individual.InnerText);
|
||||
HintsToDisplay = StartingHelpLevel;
|
||||
break;
|
||||
case "shape":
|
||||
NetShape nShape = new NetShape(Individual);
|
||||
Shapes.Add(nShape);
|
||||
break;
|
||||
case "vlanname":
|
||||
if (Individual.Attributes != null && Individual.Attributes["ID"] != null)
|
||||
{
|
||||
@ -418,6 +423,10 @@ namespace EduNetworkBuilder
|
||||
{
|
||||
writer.WriteElementString("tag",HT.ToString());
|
||||
}
|
||||
foreach(NetShape shape in Shapes)
|
||||
{
|
||||
shape.Save(writer);
|
||||
}
|
||||
foreach(VLANName VLAN in VlanNames)
|
||||
{
|
||||
writer.WriteStartElement("VLANName");
|
||||
|
Loading…
Reference in New Issue
Block a user