public void Update(channelsetup element) { if (element.m_channel.HasValue == true) { this.channel = element.channel; } if (element.m_delay.HasValue == true) { this.delay = element.delay; } if (element.m_offpos.HasValue == true) { this.offpos = element.offpos; } if (element.m_offsteps.HasValue == true) { this.offsteps = element.offsteps; } if (element.m_onpos.HasValue == true) { this.onpos = element.onpos; } if (element.m_onsteps.HasValue == true) { this.onsteps = element.onsteps; } if (element.m_options.HasValue == true) { this.options = element.options; } if (element.m_state.HasValue == true) { this.state = element.state; } }
public static channelsetup Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient) { channelsetup _channelsetup = new channelsetup(); _channelsetup.m_rocrailClient = rocrailClient; _channelsetup.m_channel = (int?)xml.Attribute("channel"); _channelsetup.m_delay = (int?)xml.Attribute("delay"); _channelsetup.m_offpos = (int?)xml.Attribute("offpos"); _channelsetup.m_offsteps = (int?)xml.Attribute("offsteps"); _channelsetup.m_onpos = (int?)xml.Attribute("onpos"); _channelsetup.m_onsteps = (int?)xml.Attribute("onsteps"); _channelsetup.m_options = (int?)xml.Attribute("options"); _channelsetup.m_state = (int?)xml.Attribute("state"); return(_channelsetup); }