Beispiel #1
0
 public void Update(scentry element)
 {
     if (element.m_block != null)
     {
         this.block = element.block;
     }
     if (element.m_free2go.HasValue == true)
     {
         this.free2go = element.free2go;
     }
     if (element.m_hour.HasValue == true)
     {
         this.hour = element.hour;
     }
     if (element.m_indelay.HasValue == true)
     {
         this.indelay = element.indelay;
     }
     if (element.m_location != null)
     {
         this.location = element.location;
     }
     if (element.m_minute.HasValue == true)
     {
         this.minute = element.minute;
     }
     if (element.m_swap.HasValue == true)
     {
         this.swap = element.swap;
     }
     this.actionctrllist = element.actionctrllist;
 }
Beispiel #2
0
        public static scentry Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient)
        {
            scentry _scentry = new scentry();

            _scentry.m_rocrailClient = rocrailClient;
            _scentry.m_block         = (string)xml.Attribute("block");
            _scentry.m_free2go       = (bool?)xml.Attribute("free2go");
            _scentry.m_hour          = (int?)xml.Attribute("hour");
            _scentry.m_indelay       = (int?)xml.Attribute("indelay");
            _scentry.m_location      = (string)xml.Attribute("location");
            _scentry.m_minute        = (int?)xml.Attribute("minute");
            _scentry.m_swap          = (bool?)xml.Attribute("swap");
            Definitions.Tools.ParseList <actionctrl>(_scentry.m_actionctrllist, xml, "actionctrl", actionctrl.Parse, rocrailClient);
            return(_scentry);
        }