コード例 #1
0
ファイル: jsmap.cs プロジェクト: Peynn/Rocrail-CSharp-Wrapper
        public static jsmap Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient)
        {
            jsmap _jsmap = new jsmap();

            _jsmap.m_rocrailClient = rocrailClient;
            _jsmap.m_f1            = (int?)xml.Attribute("f1");
            _jsmap.m_f10           = (int?)xml.Attribute("f10");
            _jsmap.m_f11           = (int?)xml.Attribute("f11");
            _jsmap.m_f12           = (int?)xml.Attribute("f12");
            _jsmap.m_f2            = (int?)xml.Attribute("f2");
            _jsmap.m_f3            = (int?)xml.Attribute("f3");
            _jsmap.m_f4            = (int?)xml.Attribute("f4");
            _jsmap.m_f5            = (int?)xml.Attribute("f5");
            _jsmap.m_f6            = (int?)xml.Attribute("f6");
            _jsmap.m_f7            = (int?)xml.Attribute("f7");
            _jsmap.m_f8            = (int?)xml.Attribute("f8");
            _jsmap.m_f9            = (int?)xml.Attribute("f9");
            _jsmap.m_leftright     = (int?)xml.Attribute("leftright");
            _jsmap.m_light         = (int?)xml.Attribute("light");
            _jsmap.m_poweroff      = (int?)xml.Attribute("poweroff");
            _jsmap.m_poweron       = (int?)xml.Attribute("poweron");
            _jsmap.m_repeat        = (int?)xml.Attribute("repeat");
            _jsmap.m_reverse       = (int?)xml.Attribute("reverse");
            _jsmap.m_select        = (int?)xml.Attribute("select");
            _jsmap.m_step          = (int?)xml.Attribute("step");
            _jsmap.m_stop          = (int?)xml.Attribute("stop");
            _jsmap.m_updown        = (int?)xml.Attribute("updown");
            return(_jsmap);
        }
コード例 #2
0
ファイル: jsmap.cs プロジェクト: Peynn/Rocrail-CSharp-Wrapper
 public void Update(jsmap element)
 {
     if (element.m_f1.HasValue == true)
     {
         this.f1 = element.f1;
     }
     if (element.m_f10.HasValue == true)
     {
         this.f10 = element.f10;
     }
     if (element.m_f11.HasValue == true)
     {
         this.f11 = element.f11;
     }
     if (element.m_f12.HasValue == true)
     {
         this.f12 = element.f12;
     }
     if (element.m_f2.HasValue == true)
     {
         this.f2 = element.f2;
     }
     if (element.m_f3.HasValue == true)
     {
         this.f3 = element.f3;
     }
     if (element.m_f4.HasValue == true)
     {
         this.f4 = element.f4;
     }
     if (element.m_f5.HasValue == true)
     {
         this.f5 = element.f5;
     }
     if (element.m_f6.HasValue == true)
     {
         this.f6 = element.f6;
     }
     if (element.m_f7.HasValue == true)
     {
         this.f7 = element.f7;
     }
     if (element.m_f8.HasValue == true)
     {
         this.f8 = element.f8;
     }
     if (element.m_f9.HasValue == true)
     {
         this.f9 = element.f9;
     }
     if (element.m_leftright.HasValue == true)
     {
         this.leftright = element.leftright;
     }
     if (element.m_light.HasValue == true)
     {
         this.light = element.light;
     }
     if (element.m_poweroff.HasValue == true)
     {
         this.poweroff = element.poweroff;
     }
     if (element.m_poweron.HasValue == true)
     {
         this.poweron = element.poweron;
     }
     if (element.m_repeat.HasValue == true)
     {
         this.repeat = element.repeat;
     }
     if (element.m_reverse.HasValue == true)
     {
         this.reverse = element.reverse;
     }
     if (element.m_select.HasValue == true)
     {
         this.@select = element.@select;
     }
     if (element.m_step.HasValue == true)
     {
         this.step = element.step;
     }
     if (element.m_stop.HasValue == true)
     {
         this.stop = element.stop;
     }
     if (element.m_updown.HasValue == true)
     {
         this.updown = element.updown;
     }
 }