Inheritance: IManipulationCompletedEventArgs
        /*
        private void deleteButton_ManipulationDelta(object sender, ManipulationDeltaEventArgs e)
        {
            if (dmove.X > 260)
            {
                deleteButton.Background = transformingBrush;
            }

            // move it
            dmove.X += e.DeltaManipulation.Translation.X;
        }
        */


        private void deleteButton_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
        {
            if (dmove.X > 260)
            {
                // delete the item
                var button = sender as Button;
                TaskItem tasktodelete = button.DataContext as TaskItem;

                taskModel.DeleteTaskItem(tasktodelete);

                // return the square to its original position/color
                for (double i = dmove.X; i > 0; i = i - 1)
                {
                    dmove.X -= 1;
                }
                deleteButton.Margin = new Thickness(-11, -12, 0, -13);
                SolidColorBrush backColor = new SolidColorBrush((Color)Application.Current.Resources["PhoneAccentColor"]);
                deleteButton.Background = backColor;
            }
            else if ((dmove.X <= 260) && (dmove.X >= 0))
            {
                for (double i = dmove.X; i > 0; i = i - 1)
                {
                    dmove.X -= 1;
                }
                deleteButton.Margin = new Thickness(-11, -12, 0, -13);
            }
            else
            {
                for (double i = dmove.X; i < 0; i = i + 1)
                {
                    dmove.X += 1;
                }
            }
        }
        void gr_ManipulationCompleted(Windows.UI.Input.GestureRecognizer sender, Windows.UI.Input.ManipulationCompletedEventArgs args)
        {
#if (DEBUG)
            System.Diagnostics.Debug.WriteLine("gr_ManipulationCompleted");
#endif
            var data = DataContext as ProgressViewModel;

            if (Math.Abs(args.Cumulative.Translation.X) > Math.Abs(args.Cumulative.Translation.Y))
            {
                data.flick(Orientation.Horizontal, args.Cumulative.Translation.X);
            }
            else
            {
                data.flick(Orientation.Vertical, args.Cumulative.Translation.Y);
            }
        }
示例#3
0
 void gestureRecognizer_ManipulationCompleted(GestureRecognizer sender, ManipulationCompletedEventArgs args)
 {
     inManipulation = false;
 }
示例#4
0
 public virtual void OnManipulationCompleted(GestureRecognizer sender, ManipulationCompletedEventArgs args)
 {
 }
 public void OnManipulationCompleted(GestureRecognizer sender, ManipulationCompletedEventArgs args)
 {
     physics.OnManipulationCompleted(sender, args);
 }
示例#6
0
 /// <summary>
 /// gesture completed
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="args"></param>
 private void swipeAreaGestureRecognizer_ManipulationCompleted(GestureRecognizer sender, ManipulationCompletedEventArgs args)
 {
     if (args.Velocities.Linear.X > 1 && args.Cumulative.Translation.X > 50)
         this.Frame.Navigate(typeof(FlyPage));
     else if (args.Velocities.Linear.X < -1 && args.Cumulative.Translation.X < -50)
         this.Frame.Navigate(typeof(ButtonPage));
 }
示例#7
0
 /// <summary>
 /// gesture completed
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="args"></param>
 private void LogoGestureRecognizer_ManipulationCompleted(GestureRecognizer sender, ManipulationCompletedEventArgs args)
 {
     if (args.Velocities.Linear.Y > 0.5 && args.Cumulative.Translation.Y > 20)
         MsgBox.Text = "SwipeDown";
     else if (args.Velocities.Linear.Y < -0.5 && args.Cumulative.Translation.Y < -20)
         MsgBox.Text = "SwipeUp";
     if (args.Velocities.Linear.X > 0.5 && args.Cumulative.Translation.X > 50)
     {
         int mode = (int)App.actionHelper.mode + 1;
         mode = mode % 3;
         App.actionHelper.mode = (ActionHelper.SensorMode)mode;
         switch (App.actionHelper.mode)
         {
             case ActionHelper.SensorMode.NONE:
                 logoImage.Opacity = 0.5;
                 logoImage.Source = joyLogoImage.Source;
                 break;
             case ActionHelper.SensorMode.TRACKER:
                 logoImage.Opacity = 1;
                 logoImage.Source = trackerLogoImage.Source;
                 break;
             case ActionHelper.SensorMode.JOYSTICK:
                 logoImage.Opacity = 1;
                 logoImage.Source = joyLogoImage.Source;
                 break;
             case ActionHelper.SensorMode.CALIBRATION:
                 logoImage.Opacity = 1;
                 logoImage.Source = caliLogoImage.Source;
                 break;
         }
     }
     else if (args.Velocities.Linear.X < -0.5 && args.Cumulative.Translation.X < -50)
     {
         int mode = (int)App.actionHelper.mode - 1;
         if (mode < 0) mode = 2;
         mode = mode % 3;
         App.actionHelper.mode = (ActionHelper.SensorMode)mode;
         switch (App.actionHelper.mode)
         {
             case ActionHelper.SensorMode.NONE:
                 logoImage.Opacity = 0.5;
                 logoImage.Source = joyLogoImage.Source;
                 break;
             case ActionHelper.SensorMode.TRACKER:
                 logoImage.Opacity = 1;
                 logoImage.Source = trackerLogoImage.Source;
                 break;
             case ActionHelper.SensorMode.JOYSTICK:
                 logoImage.Opacity = 1;
                 logoImage.Source = joyLogoImage.Source;
                 break;
             case ActionHelper.SensorMode.CALIBRATION:
                 logoImage.Opacity = 1;
                 logoImage.Source = caliLogoImage.Source;
                 break;
         }
     }
 }
 // When a manipulation has finished, reset the color of the object
 void OnManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
 {
     Border b = element as Border;
     b.Background = new SolidColorBrush(Windows.UI.Colors.LightGray);
 }
示例#9
0
 // Simulates a key release when the horizontal drag has completed
 public override void OnManipulationCompleted(GestureRecognizer sender, ManipulationCompletedEventArgs args)
 {
     isShooting = false;
     touched = false;
 }
示例#10
0
 private void viewer_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
 {
     if (VerticalOffset == 0 && CurrentState <= RefreshState.ReleasePulling)
     {
         //var p = this.TransformToVisual(ElementRelease).Transform(new Point(0, 0));
         //if (p.Y < -VerticalPullToRefreshDistance)
         double Translation_Y = e.Cumulative.Translation.Y;
         if (Translation_Y > VerticalPullToRefreshDistance)
         {
             if (PullRefresh != null)
             {
                 PullRefresh(this, EventArgs.Empty);
                 if (UpdateDescription.Visibility == Visibility.Collapsed)
                 {
                     UpdateDescription.Visibility = Visibility.Visible;
                 }
                 PullSubtext = DateTime.Now.ToString("MM-dd HH:mm:ss");
             }
             isPulling = false;
             ChangeVisualState(RefreshState.ReleasePulling, true);
             //ChangeVisualState(RefreshState.RefreshDoing, true);
             //GoToState("Doing", true);
         }
     }
 }
示例#11
0
 void OnManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
 {
 }
示例#12
0
 public override void OnManipulationCompleted(GestureRecognizer sender, ManipulationCompletedEventArgs args)
 {
     Yaw = 0;
 }
 /// <summary>
 /// Releases physics body (if applicable) on release of pointer, either mouse button up or removal of touch input
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="args"></param>
 public void OnManipulationCompleted(GestureRecognizer sender, ManipulationCompletedEventArgs args)
 {
     if (grabConstraint != null)
     {
         World.RemoveConstraint(grabConstraint);
     }
     grabBody = null;
     grabConstraint = null;
 }
        private void GrOnManipulationCompleted(GestureRecognizer sender, ManipulationCompletedEventArgs args)
        {
            var x = args.Cumulative.Translation.X;
            _currentX = x;

            if (x > 0)
            {
                if (this.RightPane.IsAvailable)
                {
                    if (this.IsRightPaneOpen)
                    {
                        if (x < _rightDragDistance)
                        {
                            OpenRightPane(); // prevent tab closing
                        }
                        else
                        {
                            this.IsRightPaneOpen = false;
                        }

                        return;
                    }
                }

                if (this.LeftPane.IsAvailable)
                {
                    if (!this.IsLeftPaneOpen)
                    {
                        if (x < _leftDragDistance)
                        {
                            CloseLeftPane(); // prevent tab opening
                        }
                        else
                        {
                            this.IsLeftPaneOpen = true;
                        }

                        return;
                    }
                }
            }
            else
            {
                if (this.LeftPane.IsAvailable)
                {
                    if (this.IsLeftPaneOpen)
                    {
                        if (Math.Abs(x) < _leftDragDistance)
                        {
                            OpenLeftPane(); // prevent tab closing
                        }
                        else
                        {
                            this.IsLeftPaneOpen = false;
                        }

                        return;
                    }
                }

                if (this.RightPane.IsAvailable)
                {
                    if (!this.IsRightPaneOpen)
                    {
                        if (Math.Abs(x) < _rightDragDistance)
                        {
                            CloseRightPane();
                        }
                        else
                        {
                            this.IsRightPaneOpen = true;
                        }

                        return;
                    }
                }
            }
        }
示例#15
0
 public void OnManipulationCompleted(GestureRecognizer sender, ManipulationCompletedEventArgs args)
 {
     //Not Used
 }