public override void LoadInternalFromXml(XmlTextReader xmlIn, int formatVersion) { base.LoadInternalFromXml(xmlIn, formatVersion); // Move to next xml node if (!xmlIn.Read()) { throw new ArgumentException("Could not read in next expected node"); } // Check it has the expected name if (xmlIn.Name != "Space") { throw new ArgumentException("Node 'Space' expected but not found"); } // Grab raw position information string attrSpace = xmlIn.GetAttribute(0); // Convert from string to proper type _space = Decimal.Parse(attrSpace); _best.LoadFromXml("Best", xmlIn); _next.LoadFromXml("Next", xmlIn); _previous.LoadFromXml("Previous", xmlIn); }
public override void LoadInternalFromXml(XmlTextReader xmlIn, int formatVersion) { base.LoadInternalFromXml(xmlIn, formatVersion); // Move to next xml node if (!xmlIn.Read()) { throw new ArgumentException("Could not read in next expected node"); } // Check it has the expected name if (xmlIn.Name != "Position") { throw new ArgumentException("Node 'Position' expected but not found"); } // Grab raw position information string attrSize = xmlIn.GetAttribute(0); string attrLocation = xmlIn.GetAttribute(1); // Convert from string to proper types _size = ConversionHelper.StringToSize(attrSize); _location = ConversionHelper.StringToPoint(attrLocation); _best.LoadFromXml("Best", xmlIn); _associates.LoadFromXml("Associates", xmlIn); }
public override void LoadInternalFromXml(XmlTextReader xmlIn, int formatVersion) { base.LoadInternalFromXml(xmlIn, formatVersion); _next.LoadFromXml("Next", xmlIn); _previous.LoadFromXml("Previous", xmlIn); // _selected added in version 4 format if (formatVersion >= 4) { // Move to next xml node if (!xmlIn.Read()) { throw new ArgumentException("Could not read in next expected node"); } // Check it has the expected name if (xmlIn.Name != "Selected") { throw new ArgumentException("Node 'Selected' expected but not found"); } // Convert attribute value to boolean value _selected = Convert.ToBoolean(xmlIn.GetAttribute(0)); } }
public override void LoadInternalFromXml(XmlTextReader xmlIn, int formatVersion) { base.LoadInternalFromXml(xmlIn, formatVersion); _next.LoadFromXml("Next", xmlIn); _previous.LoadFromXml("Previous", xmlIn); _nextAll.LoadFromXml("NextAll", xmlIn); _previousAll.LoadFromXml("PreviousAll", xmlIn); }