load / save burned state

This commit is contained in:
Tim Young 2018-02-14 12:07:06 +00:00
parent de0e9b4b98
commit 24413ec12e

View File

@ -32,6 +32,7 @@ namespace EduNetworkBuilder
public bool MustUseDHCP = false; public bool MustUseDHCP = false;
public bool CanAddNics = false; public bool CanAddNics = false;
public bool HasAdvFirewall = false; public bool HasAdvFirewall = false;
public bool IsBurned = false;
public Color BackgroundColor = Color.Empty; public Color BackgroundColor = Color.Empty;
protected Color MorphColor = Color.Empty; protected Color MorphColor = Color.Empty;
public List<FirewallRule> FirewallRules = new List<FirewallRule>(); public List<FirewallRule> FirewallRules = new List<FirewallRule>();
@ -369,6 +370,9 @@ namespace EduNetworkBuilder
case "isdns": case "isdns":
bool.TryParse(Individual.InnerText, out isDNSServer); bool.TryParse(Individual.InnerText, out isDNSServer);
break; break;
case "isburned":
bool.TryParse(Individual.InnerText, out IsBurned);
break;
case "isdhcp": case "isdhcp":
bool.TryParse(Individual.InnerText, out isDHCPServer); bool.TryParse(Individual.InnerText, out isDHCPServer);
break; break;
@ -409,6 +413,8 @@ namespace EduNetworkBuilder
writer.WriteElementString("mytype", myType.ToString()); writer.WriteElementString("mytype", myType.ToString());
writer.WriteElementString("isdns", isDNSServer.ToString()); writer.WriteElementString("isdns", isDNSServer.ToString());
writer.WriteElementString("isdhcp", isDHCPServer.ToString()); writer.WriteElementString("isdhcp", isDHCPServer.ToString());
if(IsBurned)
writer.WriteElementString("isburned", IsBurned.ToString());
if (HasAdvFirewall) if (HasAdvFirewall)
writer.WriteElementString("hasadvfirewall", HasAdvFirewall.ToString()); writer.WriteElementString("hasadvfirewall", HasAdvFirewall.ToString());
if (MorphColor != Color.Empty) if (MorphColor != Color.Empty)