public static swcmd Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient) { swcmd _swcmd = new swcmd(); _swcmd.m_rocrailClient = rocrailClient; _swcmd.m_cmd = (string)xml.Attribute("cmd"); _swcmd.m_id = (string)xml.Attribute("id"); _swcmd.m_lock = (bool?)xml.Attribute("lock"); _swcmd.m_reduceV = (bool?)xml.Attribute("reduceV"); _swcmd.m_track = (int?)xml.Attribute("track"); return(_swcmd); }
public void Update(swcmd element) { if (element.m_cmd != null) { this.cmd = element.cmd; } if (element.m_id != null) { this.id = element.id; } if (element.m_lock.HasValue == true) { this.@lock = element.@lock; } if (element.m_reduceV.HasValue == true) { this.reduceV = element.reduceV; } if (element.m_track.HasValue == true) { this.track = element.track; } }