Пример #1
0
 public void Update(clock element)
 {
     if (element.m_cmd != null)
     {
         this.cmd = element.cmd;
     }
     if (element.m_divider.HasValue == true)
     {
         this.divider = element.divider;
     }
     if (element.m_hour.HasValue == true)
     {
         this.hour = element.hour;
     }
     if (element.m_minute.HasValue == true)
     {
         this.minute = element.minute;
     }
     if (element.m_temp.HasValue == true)
     {
         this.temp = element.temp;
     }
     if (element.m_time.HasValue == true)
     {
         this.time = element.time;
     }
     if (element.m_update.HasValue == true)
     {
         this.update = element.update;
     }
 }
Пример #2
0
        public static clock Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient)
        {
            clock _clock = new clock();

            _clock.m_rocrailClient = rocrailClient;
            _clock.m_cmd           = (string)xml.Attribute("cmd");
            _clock.m_divider       = (int?)xml.Attribute("divider");
            _clock.m_hour          = (int?)xml.Attribute("hour");
            _clock.m_minute        = (int?)xml.Attribute("minute");
            _clock.m_temp          = (int?)xml.Attribute("temp");
            _clock.m_time          = (long?)xml.Attribute("time");
            _clock.m_update        = (int?)xml.Attribute("update");
            return(_clock);
        }