public static List <ConfigurationTimeZone> Deserialize(IEnumerable <XElement> elms) { List <ConfigurationTimeZone> rgTz = new List <ConfigurationTimeZone>(); List <XElement> rgElm = SerializeToXml.GetElements(elms, "TimeZone"); foreach (XElement elm in rgElm) { ConfigurationTimeZone tz = ConfigurationTimeZone.Deserialize(elm); rgTz.Add(tz); } return(rgTz); }
public static ConfigurationPlotArea Deserialize(XElement elm) { ConfigurationPlotArea plotArea = new ConfigurationPlotArea(); XElement child = SerializeToXml.GetElement(elm.Descendants(), "PlotArea"); plotArea.GridColor = SerializeToXml.LoadColor(child, "GridColor").Value; plotArea.BackColor = SerializeToXml.LoadColor(child, "BackColor").Value; plotArea.ZeroLine = SerializeToXml.LoadColor(child, "ZeroLineColor").Value; plotArea.LabelFont = SerializeToXml.LoadFont(child, "LabelFont"); Color?clr = SerializeToXml.LoadColor(child, "SeparatorColor"); if (clr.HasValue) { plotArea.m_clrSeparator = clr.Value; } plotArea.m_rgTimeZones = ConfigurationTimeZone.Deserialize(elm.Descendants()); return(plotArea); }