Example #1
0
        protected override void OnTouchUp(System.Windows.Input.TouchEventArgs e)
        {
            base.OnTouchUp(e);
            var finalPosition = e.GetTouchPoint(this).Position;

            ProcessTapFinished(finalPosition);
        }
Example #2
0
        protected override void OnPreviewTouchDown(System.Windows.Input.TouchEventArgs e)
        {
            base.OnPreviewTouchDown(e);

            touchTime = DateTime.Now;
            touchPoint = e.GetTouchPoint(this.owner).Position.Y;
        }
Example #3
0
 private void StandbyMessage_TouchDown(object sender, System.Windows.Input.TouchEventArgs e)
 {
     if (inStandby)
     {
         WakeupFromStandby();
     }
 }
Example #4
0
        protected override void OnTouchDown(System.Windows.Input.TouchEventArgs e)
        {
            base.OnTouchDown(e);
            var position = e.GetTouchPoint(this).Position;

            ProcessTapStart(position);
        }
        public void SetCropTarget(System.Windows.Input.TouchEventArgs e)
        {
            this._selectedImage = null;

            Visual visual = this._inkCanvas as Visual;

            if (visual != null)
            {
                //선택한 위치가 이미지랑 겹치는지 확인
                //겹치면 가장 위 이미지에 대해서 정보를 클래스에 저장
                VisualTreeHelper.HitTest(this._inkCanvas.Parent as Visual,
                                         new HitTestFilterCallback(p =>
                {
                    if (p is TouchableImage)
                    {
                        this._selectedImage = p as TouchableImage;
                        return(HitTestFilterBehavior.Stop);
                    }

                    this._selectedImage = null;
                    return(HitTestFilterBehavior.Continue);
                }),
                                         new HitTestResultCallback(q =>
                {
                    return(HitTestResultBehavior.Continue);
                }),
                                         new PointHitTestParameters(e.GetTouchPoint(null).Position));
            }
        }
        private void ResetTimer(object sender, System.Windows.Input.TouchEventArgs e)
        {
            var Element = sender as FrameworkElement;
            ClassificationPanelViewModel Classifier = Element.DataContext as ClassificationPanelViewModel;

            Classifier.StartStillThereModalTimer();
        }
Example #7
0
        private void LayoutRoot_TouchDown(object sender, System.Windows.Input.TouchEventArgs e)
        {
            if (LaunchDel == null)
            {
                return;
            }

            LaunchDel();
        }
Example #8
0
        protected override void OnTouchDown(System.Windows.Input.TouchEventArgs e)
        {
            base.OnTouchDown(e);

            Point touch_point = e.TouchDevice.GetTouchPoint(this).Position;

            Down(touch_point);

            e.TouchDevice.Capture(this);

            e.Handled = true;

            InvalidateVisual();
        }
Example #9
0
        protected override void OnTouchUp(System.Windows.Input.TouchEventArgs e)
        {
            base.OnTouchUp(e);

            Point point = e.TouchDevice.GetTouchPoint(this).Position;

            Up(point);

            // release touch device
            e.TouchDevice.Capture(null);

            e.Handled = true;

            InvalidateVisual();
        }
Example #10
0
        /// <summary>
        /// Called when a touch input is about to be received by the canvas.
        /// </summary>
        private void Canvas_PreviewTouchDown(object sender, System.Windows.Input.TouchEventArgs e)
        {
            // Save the current editing mode.
            if (canvas.EditingMode != System.Windows.Controls.InkCanvasEditingMode.None)
            {
                mode = canvas.EditingMode;
            }

            // Check if touch is disabled.
            if (touchDisabledBox.Checked)
            {
                // Disable all editing.
                canvas.EditingMode = System.Windows.Controls.InkCanvasEditingMode.None;
            }
        }
Example #11
0
        private void GameCanvas_TouchUp(object sender, System.Windows.Input.TouchEventArgs e)
        {
            Point current = e.GetTouchPoint(sender as IInputElement).Position;

            if (squareDistance(current.X, start.X, current.Y, start.Y))
            {
                if (Math.Abs(current.X - start.X) < 50 && current.Y > start.Y)
                {
                    direction = "down";
                }
                else if (Math.Abs(current.X - start.X) < 50 && current.Y < start.Y)
                {
                    direction = "up";
                }
                else if (Math.Abs(current.Y - start.Y) < 50 && current.X < start.X)
                {
                    direction = "left";
                }
                else if (Math.Abs(current.Y - start.Y) < 50 && current.X > start.X)
                {
                    direction = "right";
                }
            }
        }
Example #12
0
 public TouchMoveArgs(ObjectPositionDescriptor positionDescriptor, System.Windows.Input.TouchEventArgs moveEventArgs)
 {
     PositionDescriptor = positionDescriptor;
     MoveEventArgs = moveEventArgs;
 }