public static actionctrl Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient) { actionctrl _actionctrl = new actionctrl(); _actionctrl.m_rocrailClient = rocrailClient; _actionctrl.m_auto = (bool?)xml.Attribute("auto"); _actionctrl.m_bkid = (string)xml.Attribute("bkid"); _actionctrl.m_carcount = (int?)xml.Attribute("carcount"); _actionctrl.m_countedcars = (int?)xml.Attribute("countedcars"); _actionctrl.m_counter = (int?)xml.Attribute("counter"); _actionctrl.m_deact = (string)xml.Attribute("deact"); _actionctrl.m_desc = (string)xml.Attribute("desc"); _actionctrl.m_id = (string)xml.Attribute("id"); _actionctrl.m_lcid = (string)xml.Attribute("lcid"); _actionctrl.m_load = (int?)xml.Attribute("load"); _actionctrl.m_manual = (bool?)xml.Attribute("manual"); _actionctrl.m_param = (string)xml.Attribute("param"); _actionctrl.m_reset = (bool?)xml.Attribute("reset"); _actionctrl.m_state = (string)xml.Attribute("state"); _actionctrl.m_temp = (int?)xml.Attribute("temp"); _actionctrl.m_volt = (int?)xml.Attribute("volt"); _actionctrl.m_wheelcount = (int?)xml.Attribute("wheelcount"); Definitions.Tools.ParseList <actioncond>(_actionctrl.m_actioncondlist, xml, "actioncond", actioncond.Parse, rocrailClient); return(_actionctrl); }
public void Update(actionctrl element) { if (element.m_auto.HasValue == true) { this.auto = element.auto; } if (element.m_bkid != null) { this.bkid = element.bkid; } if (element.m_carcount.HasValue == true) { this.carcount = element.carcount; } if (element.m_countedcars.HasValue == true) { this.countedcars = element.countedcars; } if (element.m_counter.HasValue == true) { this.counter = element.counter; } if (element.m_deact != null) { this.deact = element.deact; } if (element.m_desc != null) { this.desc = element.desc; } if (element.m_id != null) { this.id = element.id; } if (element.m_lcid != null) { this.lcid = element.lcid; } if (element.m_load.HasValue == true) { this.load = element.load; } if (element.m_manual.HasValue == true) { this.manual = element.manual; } if (element.m_param != null) { this.param = element.param; } if (element.m_reset.HasValue == true) { this.reset = element.reset; } if (element.m_state != null) { this.state = element.state; } if (element.m_temp.HasValue == true) { this.temp = element.temp; } if (element.m_volt.HasValue == true) { this.volt = element.volt; } if (element.m_wheelcount.HasValue == true) { this.wheelcount = element.wheelcount; } this.actioncondlist = element.actioncondlist; }