示例#1
0
        public static macro Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient)
        {
            macro _macro = new macro();

            _macro.m_rocrailClient = rocrailClient;
            _macro.m_class         = (int?)xml.Attribute("class");
            _macro.m_hours         = (int?)xml.Attribute("hours");
            _macro.m_minutes       = (int?)xml.Attribute("minutes");
            _macro.m_nr            = (int?)xml.Attribute("nr");
            _macro.m_repeat        = (int?)xml.Attribute("repeat");
            _macro.m_slowdown      = (int?)xml.Attribute("slowdown");
            _macro.m_uid           = (int?)xml.Attribute("uid");
            _macro.m_wday          = (int?)xml.Attribute("wday");
            Definitions.Tools.ParseList <macroline>(_macro.m_macrolinelist, xml, "macroline", macroline.Parse, rocrailClient);
            return(_macro);
        }
示例#2
0
 public void Update(macro element)
 {
     if (element.m_class.HasValue == true)
     {
         this.@class = element.@class;
     }
     if (element.m_hours.HasValue == true)
     {
         this.hours = element.hours;
     }
     if (element.m_minutes.HasValue == true)
     {
         this.minutes = element.minutes;
     }
     if (element.m_nr.HasValue == true)
     {
         this.nr = element.nr;
     }
     if (element.m_repeat.HasValue == true)
     {
         this.repeat = element.repeat;
     }
     if (element.m_slowdown.HasValue == true)
     {
         this.slowdown = element.slowdown;
     }
     if (element.m_uid.HasValue == true)
     {
         this.uid = element.uid;
     }
     if (element.m_wday.HasValue == true)
     {
         this.wday = element.wday;
     }
     this.macrolinelist = element.macrolinelist;
 }