Inheritance: GestureEventArgs
Ejemplo n.º 1
0
 void FireCustomEvent(object sender, SelfTouchEventArgs e)
 {
     lock (SyncRoot)
     {
         //Left button down
         if (!CheckEventInterval(ref _fireCustomHit, MouseButtonsIntervalInMilliseconds)) return;
         WindowMessage = "Fire Custom";
         _lefthandRightShoulderGesture.SelfTouchDetected -= FireCustomEvent;
         DispatcherHelper.CheckBeginInvokeOnUI(InitStartGame);
     }
 }
Ejemplo n.º 2
0
 void FireMouseClick(object sender, SelfTouchEventArgs e)
 {
     lock (SyncRoot)
     {
         //Left button down
         if (!CheckEventInterval(ref _mouseClickHit, MouseButtonsIntervalInMilliseconds)) return;
         WindowMessage = "Mouse click";
         if (!_controlMouse) return;
         MouseSimulator.MouseDown(System.Windows.Input.MouseButton.Left);
         MouseSimulator.MouseUp(System.Windows.Input.MouseButton.Left);
         _mouseDown = false;
     }
 }
Ejemplo n.º 3
0
        private void GestureSelfTouchDetected(object sender, SelfTouchEventArgs e)
        {
            Action del3 = () => lblNaam.Visibility = Visibility.Hidden;
            Action del4 = () => lblWorkshop.Visibility = Visibility.Hidden;
            lblNaam.Dispatcher.BeginInvoke(DispatcherPriority.Send, del3);
            lblWorkshop.Dispatcher.BeginInvoke(DispatcherPriority.Send, del4);

            RestoreBalls();
        }
Ejemplo n.º 4
0
        void FireMouseDown(object sender, SelfTouchEventArgs e)
        {
            lock (SyncRoot)
            {
                _mouseDownCounter++;
                //only act after 3 hits
                if (_mouseDownCounter < NoiseFilter) return;
                _mouseUpCounter = 0;
                //Prevent int overflow
                if (_mouseDownCounter > int.MaxValue) _mouseDownCounter = NoiseFilter;
                
                //Check the time interval
                if (!CheckEventInterval(ref _mouseDownHit, MouseButtonsIntervalInMilliseconds) || _mouseDown) return;
                _mouseDown = true;
                WindowMessage = "Mouse down";

                if (!_controlMouse) return;
                MouseSimulator.MouseDown(System.Windows.Input.MouseButton.Left);
            }
        }
Ejemplo n.º 5
0
 private void SelfTouch(object sender, SelfTouchEventArgs e)
 {
     Trace.Write(string.Format("{0} LeftHand on RightShoulder", _counter++));
 }