Example #1
0
        public static jsevent Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient)
        {
            jsevent _jsevent = new jsevent();

            _jsevent.m_rocrailClient = rocrailClient;
            _jsevent.m_device        = (int?)xml.Attribute("device");
            _jsevent.m_msec          = (int?)xml.Attribute("msec");
            _jsevent.m_number        = (int?)xml.Attribute("number");
            _jsevent.m_type          = (int?)xml.Attribute("type");
            _jsevent.m_value         = (int?)xml.Attribute("value");
            return(_jsevent);
        }
Example #2
0
 public void Update(jsevent element)
 {
     if (element.m_device.HasValue == true)
     {
         this.device = element.device;
     }
     if (element.m_msec.HasValue == true)
     {
         this.msec = element.msec;
     }
     if (element.m_number.HasValue == true)
     {
         this.number = element.number;
     }
     if (element.m_type.HasValue == true)
     {
         this.type = element.type;
     }
     if (element.m_value.HasValue == true)
     {
         this.@value = element.@value;
     }
 }