コード例 #1
0
ファイル: tt.cs プロジェクト: Peynn/Rocrail-CSharp-Wrapper
 public void Update(tt element)
 {
     if (element.m_V.HasValue == true)
     {
         this.V = element.V;
     }
     if (element.m_actfn.HasValue == true)
     {
         this.actfn = element.actfn;
     }
     if (element.m_addr.HasValue == true)
     {
         this.addr = element.addr;
     }
     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_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_bit0cmd.HasValue == true)
     {
         this.bit0cmd = element.bit0cmd;
     }
     if (element.m_bit1cmd.HasValue == true)
     {
         this.bit1cmd = element.bit1cmd;
     }
     if (element.m_bit2cmd.HasValue == true)
     {
         this.bit2cmd = element.bit2cmd;
     }
     if (element.m_bit3cmd.HasValue == true)
     {
         this.bit3cmd = element.bit3cmd;
     }
     if (element.m_bit4cmd.HasValue == true)
     {
         this.bit4cmd = element.bit4cmd;
     }
     if (element.m_bit5cmd.HasValue == true)
     {
         this.bit5cmd = element.bit5cmd;
     }
     if (element.m_bridgepos.HasValue == true)
     {
         this.bridgepos = element.bridgepos;
     }
     if (element.m_bus.HasValue == true)
     {
         this.bus = element.bus;
     }
     if (element.m_cmd != null)
     {
         this.cmd = element.cmd;
     }
     if (element.m_delay.HasValue == true)
     {
         this.delay = element.delay;
     }
     if (element.m_desc != null)
     {
         this.desc = element.desc;
     }
     if (element.m_diraddr.HasValue == true)
     {
         this.diraddr = element.diraddr;
     }
     if (element.m_embeddedblock.HasValue == true)
     {
         this.embeddedblock = element.embeddedblock;
     }
     if (element.m_entering.HasValue == true)
     {
         this.entering = element.entering;
     }
     if (element.m_fun.HasValue == true)
     {
         this.fun = element.fun;
     }
     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_invpos.HasValue == true)
     {
         this.invpos = element.invpos;
     }
     if (element.m_lightsfn.HasValue == true)
     {
         this.lightsfn = element.lightsfn;
     }
     if (element.m_locid != null)
     {
         this.locid = element.locid;
     }
     if (element.m_manager.HasValue == true)
     {
         this.manager = element.manager;
     }
     if (element.m_motoroffdelay.HasValue == true)
     {
         this.motoroffdelay = element.motoroffdelay;
     }
     if (element.m_oid != null)
     {
         this.oid = element.oid;
     }
     if (element.m_pause.HasValue == true)
     {
         this.pause = element.pause;
     }
     if (element.m_poladdr.HasValue == true)
     {
         this.poladdr = element.poladdr;
     }
     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_prot != null)
     {
         this.prot = element.prot;
     }
     if (element.m_psen != null)
     {
         this.psen = element.psen;
     }
     if (element.m_reserved.HasValue == true)
     {
         this.reserved = element.reserved;
     }
     if (element.m_resetaddr.HasValue == true)
     {
         this.resetaddr = element.resetaddr;
     }
     if (element.m_resetbitcmd.HasValue == true)
     {
         this.resetbitcmd = element.resetbitcmd;
     }
     if (element.m_resetport.HasValue == true)
     {
         this.resetport = element.resetport;
     }
     if (element.m_s1 != null)
     {
         this.s1 = element.s1;
     }
     if (element.m_s2 != null)
     {
         this.s2 = element.s2;
     }
     if (element.m_sMid != null)
     {
         this.sMid = element.sMid;
     }
     if (element.m_sMid2 != null)
     {
         this.sMid2 = element.sMid2;
     }
     if (element.m_singlegatenew.HasValue == true)
     {
         this.singlegatenew = element.singlegatenew;
     }
     if (element.m_singlegatepos.HasValue == true)
     {
         this.singlegatepos = element.singlegatepos;
     }
     if (element.m_state != null)
     {
         this.state = element.state;
     }
     if (element.m_state1.HasValue == true)
     {
         this.state1 = element.state1;
     }
     if (element.m_state2.HasValue == true)
     {
         this.state2 = element.state2;
     }
     if (element.m_stateMid.HasValue == true)
     {
         this.stateMid = element.stateMid;
     }
     if (element.m_stateMid2.HasValue == true)
     {
         this.stateMid2 = element.stateMid2;
     }
     if (element.m_swaprotation.HasValue == true)
     {
         this.swaprotation = element.swaprotation;
     }
     if (element.m_swcmd.HasValue == true)
     {
         this.swcmd = element.swcmd;
     }
     if (element.m_symbolsize.HasValue == true)
     {
         this.symbolsize = element.symbolsize;
     }
     if (element.m_traverser.HasValue == true)
     {
         this.traverser = element.traverser;
     }
     if (element.m_type != null)
     {
         this.type = element.type;
     }
     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.actionctrllist = element.actionctrllist;
     this.tracklist      = element.tracklist;
 }
コード例 #2
0
ファイル: tt.cs プロジェクト: Peynn/Rocrail-CSharp-Wrapper
        public static tt Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient)
        {
            tt _tt = new tt();

            _tt.m_rocrailClient = rocrailClient;
            _tt.m_V             = (int?)xml.Attribute("V");
            _tt.m_actfn         = (int?)xml.Attribute("actfn");
            _tt.m_addr          = (int?)xml.Attribute("addr");
            _tt.m_addr0         = (int?)xml.Attribute("addr0");
            _tt.m_addr1         = (int?)xml.Attribute("addr1");
            _tt.m_addr2         = (int?)xml.Attribute("addr2");
            _tt.m_addr3         = (int?)xml.Attribute("addr3");
            _tt.m_addr4         = (int?)xml.Attribute("addr4");
            _tt.m_addr5         = (int?)xml.Attribute("addr5");
            _tt.m_addr6         = (int?)xml.Attribute("addr6");
            _tt.m_b0sen         = (string)xml.Attribute("b0sen");
            _tt.m_b1sen         = (string)xml.Attribute("b1sen");
            _tt.m_b2sen         = (string)xml.Attribute("b2sen");
            _tt.m_b3sen         = (string)xml.Attribute("b3sen");
            _tt.m_bit0cmd       = (int?)xml.Attribute("bit0cmd");
            _tt.m_bit1cmd       = (int?)xml.Attribute("bit1cmd");
            _tt.m_bit2cmd       = (int?)xml.Attribute("bit2cmd");
            _tt.m_bit3cmd       = (int?)xml.Attribute("bit3cmd");
            _tt.m_bit4cmd       = (int?)xml.Attribute("bit4cmd");
            _tt.m_bit5cmd       = (int?)xml.Attribute("bit5cmd");
            _tt.m_bridgepos     = (int?)xml.Attribute("bridgepos");
            _tt.m_bus           = (int?)xml.Attribute("bus");
            _tt.m_cmd           = (string)xml.Attribute("cmd");
            _tt.m_delay         = (int?)xml.Attribute("delay");
            _tt.m_desc          = (string)xml.Attribute("desc");
            _tt.m_diraddr       = (int?)xml.Attribute("diraddr");
            _tt.m_embeddedblock = (bool?)xml.Attribute("embeddedblock");
            _tt.m_entering      = (bool?)xml.Attribute("entering");
            _tt.m_fun           = (int?)xml.Attribute("fun");
            _tt.m_id            = (string)xml.Attribute("id");
            _tt.m_iid           = (string)xml.Attribute("iid");
            _tt.m_inv           = (bool?)xml.Attribute("inv");
            _tt.m_invnew        = (bool?)xml.Attribute("invnew");
            _tt.m_invpos        = (bool?)xml.Attribute("invpos");
            _tt.m_lightsfn      = (int?)xml.Attribute("lightsfn");
            _tt.m_locid         = (string)xml.Attribute("locid");
            _tt.m_manager       = (bool?)xml.Attribute("manager");
            _tt.m_motoroffdelay = (int?)xml.Attribute("motoroffdelay");
            _tt.m_oid           = (string)xml.Attribute("oid");
            _tt.m_pause         = (int?)xml.Attribute("pause");
            _tt.m_poladdr       = (int?)xml.Attribute("poladdr");
            _tt.m_port0         = (int?)xml.Attribute("port0");
            _tt.m_port1         = (int?)xml.Attribute("port1");
            _tt.m_port2         = (int?)xml.Attribute("port2");
            _tt.m_port3         = (int?)xml.Attribute("port3");
            _tt.m_port4         = (int?)xml.Attribute("port4");
            _tt.m_port5         = (int?)xml.Attribute("port5");
            _tt.m_port6         = (int?)xml.Attribute("port6");
            _tt.m_prot          = (string)xml.Attribute("prot");
            _tt.m_psen          = (string)xml.Attribute("psen");
            _tt.m_reserved      = (bool?)xml.Attribute("reserved");
            _tt.m_resetaddr     = (int?)xml.Attribute("resetaddr");
            _tt.m_resetbitcmd   = (int?)xml.Attribute("resetbitcmd");
            _tt.m_resetport     = (int?)xml.Attribute("resetport");
            _tt.m_s1            = (string)xml.Attribute("s1");
            _tt.m_s2            = (string)xml.Attribute("s2");
            _tt.m_sMid          = (string)xml.Attribute("sMid");
            _tt.m_sMid2         = (string)xml.Attribute("sMid2");
            _tt.m_singlegatenew = (bool?)xml.Attribute("singlegatenew");
            _tt.m_singlegatepos = (bool?)xml.Attribute("singlegatepos");
            _tt.m_state         = (string)xml.Attribute("state");
            _tt.m_state1        = (bool?)xml.Attribute("state1");
            _tt.m_state2        = (bool?)xml.Attribute("state2");
            _tt.m_stateMid      = (bool?)xml.Attribute("stateMid");
            _tt.m_stateMid2     = (bool?)xml.Attribute("stateMid2");
            _tt.m_swaprotation  = (bool?)xml.Attribute("swaprotation");
            _tt.m_swcmd         = (bool?)xml.Attribute("swcmd");
            _tt.m_symbolsize    = (int?)xml.Attribute("symbolsize");
            _tt.m_traverser     = (bool?)xml.Attribute("traverser");
            _tt.m_type          = (string)xml.Attribute("type");
            _tt.m_x             = (int?)xml.Attribute("x");
            _tt.m_y             = (int?)xml.Attribute("y");
            _tt.m_z             = (int?)xml.Attribute("z");
            Definitions.Tools.ParseList <actionctrl>(_tt.m_actionctrllist, xml, "actionctrl", actionctrl.Parse, rocrailClient);
            Definitions.Tools.ParseList <track>(_tt.m_tracklist, xml, "track", track.Parse, rocrailClient);
            return(_tt);
        }