示例#1
0
 // Intercept touch on window.
 private bool OnWinInterceptTouch(object sender, Window.TouchEventArgs e)
 {
     if (e.Touch.GetState(0) == PointStateType.Up)
     {
         if (isInterceptTouch == false && overlayTimer == null)
         {
             overlayTimer       = new Timer(3000);
             overlayTimer.Tick += OnTick;
             overlayTimer.Start();
             GetBorderWindowBottomLayer().RaiseToTop();
             if (rootView != null)
             {
                 rootView.Show();
             }
             isInterceptTouch = true;
         }
     }
     return(false);
 }
示例#2
0
 // Intercept touch on window.
 private bool OnWinInterceptedTouch(object sender, Window.TouchEventArgs e)
 {
     if (e.Touch.GetState(0) == PointStateType.Stationary && e.Touch.GetPointCount() == 2)
     {
         if (isWinGestures == false && timer == null)
         {
             timer       = new Timer(300);
             timer.Tick += OnTick;
             timer.Start();
         }
     }
     else
     {
         currentGesture = CurrentGesture.None;
         if (timer != null)
         {
             timer.Stop();
             timer.Dispose();
             timer = null;
         }
     }
     return(false);
 }