public Monitor DeserializeMonitor(XmlReader xmlReader) { xmlReader.ReadStartElement("Monitor"); Monitor display = (Monitor)CreateNewObject("Monitor", ""); display.ReadXml(xmlReader); DeserializeControls(display.Children, xmlReader); xmlReader.ReadEndElement(); return(display); }
public IEnumerable <string> DeserializeMonitor(MonitorCollection destination, XmlReader xmlReader, int monitorNumber) { xmlReader.ReadStartElement("Monitor"); Monitor display = (Monitor)CreateNewObject("Monitor", ""); display.ReadXml(xmlReader); foreach (string progress in DeserializeControls(display.Children, xmlReader)) { yield return(progress); } xmlReader.ReadEndElement(); display.Name = "Monitor " + monitorNumber; destination.Add(display); yield return($"loaded {display.Name}"); }