Esempio n. 1
0
 public ConfigurationTimeZone(ConfigurationTimeZone zone)
 {
     m_dtStart       = zone.m_dtStart;
     m_dtEnd         = zone.m_dtEnd;
     m_clrBackground = zone.m_clrBackground;
     m_bRelative     = zone.m_bRelative;
 }
Esempio n. 2
0
        public static ConfigurationTimeZone Deserialize(XElement elm)
        {
            ConfigurationTimeZone tz = new ConfigurationTimeZone();

            tz.StartTime = SerializeToXml.LoadDateTime(elm, "Start").Value;
            tz.EndTime   = SerializeToXml.LoadDateTime(elm, "End").Value;
            tz.BackColor = SerializeToXml.LoadColor(elm, "BackColor").Value;
            tz.Relative  = SerializeToXml.LoadBool(elm, "Relative").Value;

            return(tz);
        }
Esempio n. 3
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);
        }
Esempio n. 4
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);
        }
Esempio n. 5
0
        public bool Compare(ConfigurationTimeZone t)
        {
            if (m_dtStart != t.m_dtStart)
            {
                return(false);
            }

            if (m_dtEnd != t.m_dtEnd)
            {
                return(false);
            }

            if (m_clrBackground != t.m_clrBackground)
            {
                return(false);
            }

            if (m_bRelative != t.m_bRelative)
            {
                return(false);
            }

            return(true);
        }