コード例 #1
0
        public static ac Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient)
        {
            ac _ac = new ac();

            _ac.m_rocrailClient = rocrailClient;
            _ac.m_actiontime    = (int?)xml.Attribute("actiontime");
            _ac.m_activate      = (bool?)xml.Attribute("activate");
            _ac.m_addr          = (int?)xml.Attribute("addr");
            _ac.m_bus           = (int?)xml.Attribute("bus");
            _ac.m_cmd           = (string)xml.Attribute("cmd");
            _ac.m_desc          = (string)xml.Attribute("desc");
            _ac.m_doublequote   = (bool?)xml.Attribute("doublequote");
            _ac.m_every         = (bool?)xml.Attribute("every");
            _ac.m_hour          = (int?)xml.Attribute("hour");
            _ac.m_id            = (string)xml.Attribute("id");
            _ac.m_iid           = (string)xml.Attribute("iid");
            _ac.m_min           = (int?)xml.Attribute("min");
            _ac.m_oid           = (string)xml.Attribute("oid");
            _ac.m_param         = (string)xml.Attribute("param");
            _ac.m_random        = (bool?)xml.Attribute("random");
            _ac.m_refid         = (string)xml.Attribute("refid");
            _ac.m_remark        = (string)xml.Attribute("remark");
            _ac.m_sec           = (int?)xml.Attribute("sec");
            _ac.m_sndfile       = (string)xml.Attribute("sndfile");
            _ac.m_sndvolume     = (int?)xml.Attribute("sndvolume");
            _ac.m_timed         = (bool?)xml.Attribute("timed");
            _ac.m_timer         = (int?)xml.Attribute("timer");
            _ac.m_type          = (string)xml.Attribute("type");
            return(_ac);
        }
コード例 #2
0
 public void Update(ac element)
 {
     if (element.m_actiontime.HasValue == true)
     {
         this.actiontime = element.actiontime;
     }
     if (element.m_activate.HasValue == true)
     {
         this.activate = element.activate;
     }
     if (element.m_addr.HasValue == true)
     {
         this.addr = element.addr;
     }
     if (element.m_bus.HasValue == true)
     {
         this.bus = element.bus;
     }
     if (element.m_cmd != null)
     {
         this.cmd = element.cmd;
     }
     if (element.m_desc != null)
     {
         this.desc = element.desc;
     }
     if (element.m_doublequote.HasValue == true)
     {
         this.doublequote = element.doublequote;
     }
     if (element.m_every.HasValue == true)
     {
         this.every = element.every;
     }
     if (element.m_hour.HasValue == true)
     {
         this.hour = element.hour;
     }
     if (element.m_id != null)
     {
         this.id = element.id;
     }
     if (element.m_iid != null)
     {
         this.iid = element.iid;
     }
     if (element.m_min.HasValue == true)
     {
         this.min = element.min;
     }
     if (element.m_oid != null)
     {
         this.oid = element.oid;
     }
     if (element.m_param != null)
     {
         this.param = element.param;
     }
     if (element.m_random.HasValue == true)
     {
         this.random = element.random;
     }
     if (element.m_refid != null)
     {
         this.refid = element.refid;
     }
     if (element.m_remark != null)
     {
         this.remark = element.remark;
     }
     if (element.m_sec.HasValue == true)
     {
         this.sec = element.sec;
     }
     if (element.m_sndfile != null)
     {
         this.sndfile = element.sndfile;
     }
     if (element.m_sndvolume.HasValue == true)
     {
         this.sndvolume = element.sndvolume;
     }
     if (element.m_timed.HasValue == true)
     {
         this.timed = element.timed;
     }
     if (element.m_timer.HasValue == true)
     {
         this.timer = element.timer;
     }
     if (element.m_type != null)
     {
         this.type = element.type;
     }
 }