示例#1
0
        void GetNrpnMessage(object sender, EventArgs e)
        {
            var msg = RpnNrpn.FromInt(numNrpnMsb.Value.ToInt32(), numD1.Value.ToInt32());

            PluginManager.ActivePlugin.PluginCommandStub.ProcessEvents(msg.GetNrpnEvents());
            label6.Text = string.Format("{0}\n{1}\n{2}\n{3}", msg.StrNrpnLsb, msg.StrNrpmMsb, msg.StrNrpnLsbData, msg.StrNrpnMsbData);
        }
示例#2
0
        //
        // Util
        // ===============================

        static public RpnNrpn FromInt(int a, int b)
        {
            var msg = new RpnNrpn();

            msg.lsb  = a.Div(128);
            msg.msb  = a.Mod(128);
            msg.lsbd = b.Div(128);
            msg.msbd = b.Mod(128);
            return(msg);
        }
示例#3
0
 //
 // Util
 // ===============================
 public static RpnNrpn FromInt(int a, int b)
 {
     var msg = new RpnNrpn();
     msg.lsb = a.Div(128);
     msg.msb = a.Mod(128);
     msg.lsbd = b.Div(128);
     msg.msbd = b.Mod(128);
     return msg;
 }