private void LoadDialogue() { List <Node> deserializedNodes = XMLConverter.Deserialize <List <Node> >("Assets/Dialogue", "NewFile.xml"); List <NodeConnection> deserializedConnections = XMLConverter.Deserialize <List <NodeConnection> >("Assets/Dialogue", "NewConnections.xml"); nodes = new List <Node>(); connections = new List <NodeConnection>(); }
public void ProcessProjectServerResponse(MemoryStream xmlResponse) { Console.WriteLine("Engine: ProcessProjectServerResponse"); BaseMessage response = XMLConverter.Deserialize(xmlResponse); messageToHandler[response.ID](response); }
public ArchivatorDTO ConvertXMLToObject() { try { if (form1.xmlPath != string.Empty && form1.xmlPath != null) { XMLConverter xmlConv = new XMLConverter(); string xmlInputData = File.ReadAllText(form1.xmlPath); archivatorDTO = xmlConv.Deserialize <ArchivatorDTO>(xmlInputData); ComponentsUtil.AppendTextToRichTextBox(form1.GetRichTextBoxInfo(), "XML structure is OK..", Color.Green, true); } else { ComponentsUtil.AppendTextToRichTextBox(form1.GetRichTextBoxInfo(), "Error please check XML structure", Color.Red, true); } return(archivatorDTO); } catch (Exception ex) { ComponentsUtil.AppendTextToRichTextBox(form1.GetRichTextBoxInfo(), String.Format("Error Load XML: {0}", ex.Message), Color.Red, true); return(archivatorDTO); }; }