ability to load / save the messages
This commit is contained in:
parent
c4c5984f21
commit
aed5340351
@ -236,6 +236,9 @@ namespace EduNetworkBuilder
|
||||
SuggestedReadings.Add(tempHelpTopic);
|
||||
}
|
||||
break;
|
||||
case "packetmessages":
|
||||
myMessages = NB.Deserialize<List<PacketMessage>>(Individual.InnerText);
|
||||
break;
|
||||
case "level":
|
||||
int.TryParse(Individual.InnerText, out Level);
|
||||
//Tags.Add("Level_" + Individual.InnerText);
|
||||
@ -337,7 +340,7 @@ namespace EduNetworkBuilder
|
||||
}
|
||||
|
||||
|
||||
public void Save(XmlWriter writer, bool StraightToFile = true)
|
||||
public void Save(XmlWriter writer, bool StraightToFile = true, bool SaveMessages = false)
|
||||
{
|
||||
//Save the language name
|
||||
//save the number of items
|
||||
@ -359,6 +362,11 @@ namespace EduNetworkBuilder
|
||||
writer.WriteElementString("VLANPacketColors", VLANPacketColors.ToString());
|
||||
if (!StraightToFile)
|
||||
writer.WriteElementString("PuzzleName", PuzzleName);
|
||||
if(SaveMessages)
|
||||
{
|
||||
string serializedstring = NB.SerializeObject<List<PacketMessage>>(myMessages);
|
||||
writer.WriteElementString("PacketMessages", serializedstring);
|
||||
}
|
||||
//Save all the devices
|
||||
for (int loop = 0; loop < NetComponents.Count; loop++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user