Example #1
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            NPT  = new Testpad.NPT();
            Item = new Testpad.NPT.DataItem();
            NPT.UpgradeProgress += NPT_UpgradeProgress;
            NPT.EventReceived   += NPT_EventReceived;
            NPT.DataReceived    += NPT_DataReceived;
            NPT.In1Pressed      += NPT_In1Pressed;
            NPT.TouchStart       = false;

            NPT.ChannelResistanceVersion = 1;

            if (File.Exists(DefaultParameterFile))
            {
                NPT.LoadParameter(DefaultParameterFile);
            }

            ParameterGrid.SelectedObject = NPT.CurrentParameter;
            ParameterGrid.CollapseAllGridItems();

            T_Refresh.Enabled = true;
        }
Example #2
0
 private void NPT_DataReceived(uint Channel, Testpad.NPT.DataItem Item)
 {
     Console.WriteLine("Tick:{0}", Item.Tick);
     Display(string.Format("[{0}]:{1},{2},{3}", Channel, Item.Name, Item.Value, Item.Flag));
 }