示例#1
0
        //-----------------------------------
        //             Mouse MODE
        //-----------------------------------


        private void btn_mouse_Click(object sender, RoutedEventArgs e)
        {
            TAPManager.Instance.OnMoused += OnMoused;
            TAPManager.Instance.SetTapInputMode(TAPInputMode.Controller());
            TAPManager.Instance.SetTapInputMode(TAPInputMode.ControllerWithMouseHID());
            TAPManager.Instance.SetTapInputMode(TAPInputMode.Text());

            TAPManager.Instance.Start();
        }
        //--------------------------
        //        TAP STRAP
        //--------------------------

        protected override void OnActivated(EventArgs e)
        {
            base.OnActivated(e);
            if (this.Once)
            {
                this.Once = false;
                TAPManager.Instance.OnTapped += this.OnTapped;

                TAPManager.Instance.SetDefaultInputMode(TAPInputMode.Text(), true);
                TAPManager.Instance.Start();
            }
        }
示例#3
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (!this.rawMode)
     {
         TAPManager.Instance.SetTapInputMode(TAPInputMode.RawSensor(new RawSensorSensitivity()));
         Console.WriteLine("Turn to RawSensor mode");
         this.LogLine("Turn to RawSensor mode");
     }
     else
     {
         TAPManager.Instance.SetTapInputMode(TAPInputMode.Text());
         Console.WriteLine("Turn to text mode");
         this.LogLine("Turn to text mode");
     }
     this.rawMode = !this.rawMode;
 }
        protected override void OnActivated(EventArgs e)
        {
            base.OnActivated(e);
            if (this.once)
            {
                this.once = false;
                TAPManager.Instance.OnMoused          += this.OnMoused;
                TAPManager.Instance.OnTapped          += this.OnTapped;
                TAPManager.Instance.OnTapConnected    += this.OnTapConnected;
                TAPManager.Instance.OnTapDisconnected += this.OnTapDisconnected;

                TAPManager.Instance.OnAirGestured            += this.OnAirGestured;
                TAPManager.Instance.OnChangedAirGestureState += this.OnChangedAirGestureState;
                TAPManager.Instance.OnRawSensorDataReceieved += this.OnRawSensorDataReceieved;


                TAPManager.Instance.SetDefaultInputMode(TAPInputMode.Text(), true);
                TAPManager.Instance.Start();
            }
        }