Пример #1
0
        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);
        }
Пример #2
0
        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);
        }