public static seltab Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient) { seltab _seltab = new seltab(); _seltab.m_rocrailClient = rocrailClient; _seltab.m_addr0 = (int?)xml.Attribute("addr0"); _seltab.m_addr1 = (int?)xml.Attribute("addr1"); _seltab.m_addr2 = (int?)xml.Attribute("addr2"); _seltab.m_addr3 = (int?)xml.Attribute("addr3"); _seltab.m_addr4 = (int?)xml.Attribute("addr4"); _seltab.m_addr5 = (int?)xml.Attribute("addr5"); _seltab.m_addr6 = (int?)xml.Attribute("addr6"); _seltab.m_addr7 = (int?)xml.Attribute("addr7"); _seltab.m_b0sen = (string)xml.Attribute("b0sen"); _seltab.m_b1sen = (string)xml.Attribute("b1sen"); _seltab.m_b2sen = (string)xml.Attribute("b2sen"); _seltab.m_b3sen = (string)xml.Attribute("b3sen"); _seltab.m_b4sen = (string)xml.Attribute("b4sen"); _seltab.m_b5sen = (string)xml.Attribute("b5sen"); _seltab.m_b6sen = (string)xml.Attribute("b6sen"); _seltab.m_bus = (int?)xml.Attribute("bus"); _seltab.m_cmd = (string)xml.Attribute("cmd"); _seltab.m_desc = (string)xml.Attribute("desc"); _seltab.m_fifo = (bool?)xml.Attribute("fifo"); _seltab.m_id = (string)xml.Attribute("id"); _seltab.m_iid = (string)xml.Attribute("iid"); _seltab.m_inv = (bool?)xml.Attribute("inv"); _seltab.m_invnew = (bool?)xml.Attribute("invnew"); _seltab.m_locid = (string)xml.Attribute("locid"); _seltab.m_manager = (bool?)xml.Attribute("manager"); _seltab.m_minocc = (int?)xml.Attribute("minocc"); _seltab.m_movedelay = (int?)xml.Attribute("movedelay"); _seltab.m_nrtracks = (int?)xml.Attribute("nrtracks"); _seltab.m_offpos = (int?)xml.Attribute("offpos"); _seltab.m_ori = (string)xml.Attribute("ori"); _seltab.m_pending = (bool?)xml.Attribute("pending"); _seltab.m_port0 = (int?)xml.Attribute("port0"); _seltab.m_port1 = (int?)xml.Attribute("port1"); _seltab.m_port2 = (int?)xml.Attribute("port2"); _seltab.m_port3 = (int?)xml.Attribute("port3"); _seltab.m_port4 = (int?)xml.Attribute("port4"); _seltab.m_port5 = (int?)xml.Attribute("port5"); _seltab.m_port6 = (int?)xml.Attribute("port6"); _seltab.m_port7 = (int?)xml.Attribute("port7"); _seltab.m_pos = (int?)xml.Attribute("pos"); _seltab.m_prot = (string)xml.Attribute("prot"); _seltab.m_psen = (string)xml.Attribute("psen"); _seltab.m_sharedfb = (bool?)xml.Attribute("sharedfb"); _seltab.m_singlegate = (bool?)xml.Attribute("singlegate"); _seltab.m_state = (string)xml.Attribute("state"); _seltab.m_x = (int?)xml.Attribute("x"); _seltab.m_y = (int?)xml.Attribute("y"); _seltab.m_z = (int?)xml.Attribute("z"); Definitions.Tools.ParseList <fbevent>(_seltab.m_fbeventlist, xml, "fbevent", fbevent.Parse, rocrailClient); Definitions.Tools.ParseList <seltabpos>(_seltab.m_seltabposlist, xml, "seltabpos", seltabpos.Parse, rocrailClient); return(_seltab); }
public void Update(seltab element) { if (element.m_addr0.HasValue == true) { this.addr0 = element.addr0; } if (element.m_addr1.HasValue == true) { this.addr1 = element.addr1; } if (element.m_addr2.HasValue == true) { this.addr2 = element.addr2; } if (element.m_addr3.HasValue == true) { this.addr3 = element.addr3; } if (element.m_addr4.HasValue == true) { this.addr4 = element.addr4; } if (element.m_addr5.HasValue == true) { this.addr5 = element.addr5; } if (element.m_addr6.HasValue == true) { this.addr6 = element.addr6; } if (element.m_addr7.HasValue == true) { this.addr7 = element.addr7; } if (element.m_b0sen != null) { this.b0sen = element.b0sen; } if (element.m_b1sen != null) { this.b1sen = element.b1sen; } if (element.m_b2sen != null) { this.b2sen = element.b2sen; } if (element.m_b3sen != null) { this.b3sen = element.b3sen; } if (element.m_b4sen != null) { this.b4sen = element.b4sen; } if (element.m_b5sen != null) { this.b5sen = element.b5sen; } if (element.m_b6sen != null) { this.b6sen = element.b6sen; } if (element.m_bus.HasValue == true) { this.bus = element.bus; } if (element.m_cmd != null) { this.cmd = element.cmd; } if (element.m_desc != null) { this.desc = element.desc; } if (element.m_fifo.HasValue == true) { this.fifo = element.fifo; } if (element.m_id != null) { this.id = element.id; } if (element.m_iid != null) { this.iid = element.iid; } if (element.m_inv.HasValue == true) { this.inv = element.inv; } if (element.m_invnew.HasValue == true) { this.invnew = element.invnew; } if (element.m_locid != null) { this.locid = element.locid; } if (element.m_manager.HasValue == true) { this.manager = element.manager; } if (element.m_minocc.HasValue == true) { this.minocc = element.minocc; } if (element.m_movedelay.HasValue == true) { this.movedelay = element.movedelay; } if (element.m_nrtracks.HasValue == true) { this.nrtracks = element.nrtracks; } if (element.m_offpos.HasValue == true) { this.offpos = element.offpos; } if (element.m_ori != null) { this.ori = element.ori; } if (element.m_pending.HasValue == true) { this.pending = element.pending; } if (element.m_port0.HasValue == true) { this.port0 = element.port0; } if (element.m_port1.HasValue == true) { this.port1 = element.port1; } if (element.m_port2.HasValue == true) { this.port2 = element.port2; } if (element.m_port3.HasValue == true) { this.port3 = element.port3; } if (element.m_port4.HasValue == true) { this.port4 = element.port4; } if (element.m_port5.HasValue == true) { this.port5 = element.port5; } if (element.m_port6.HasValue == true) { this.port6 = element.port6; } if (element.m_port7.HasValue == true) { this.port7 = element.port7; } if (element.m_pos.HasValue == true) { this.pos = element.pos; } if (element.m_prot != null) { this.prot = element.prot; } if (element.m_psen != null) { this.psen = element.psen; } if (element.m_sharedfb.HasValue == true) { this.sharedfb = element.sharedfb; } if (element.m_singlegate.HasValue == true) { this.singlegate = element.singlegate; } if (element.m_state != null) { this.state = element.state; } if (element.m_x.HasValue == true) { this.x = element.x; } if (element.m_y.HasValue == true) { this.y = element.y; } if (element.m_z.HasValue == true) { this.z = element.z; } this.fbeventlist = element.fbeventlist; this.seltabposlist = element.seltabposlist; }