// Maneja el evento HandCursorMove private void ScrollableCanvas_HandCursorMove(object sender, HandCursorEventArgs args) { if (_isHandOverCanvas) { _handPosition = new Point(args.X, args.Y); } }
// Maneja el evento HandCursorEnter private void ScrollableCanvas_HandCursorEnter(object sender, HandCursorEventArgs args) { if (!_isHandOverCanvas) { _handPosition = new Point(args.X, args.Y); } _isHandOverCanvas = true; _isMoved = true; StackPanel stackPanel = (Name == "LeftScrollableCanvas") ? FindChild <StackPanel>(Application.Current.MainWindow, "LeftStackPanel") : FindChild <StackPanel>(Application.Current.MainWindow, "RightStackPanel"); if (stackPanel.Children.Count == 0) { return; } SetPositions(stackPanel); if (!CheckHandPosition(stackPanel)) { return; } if (_isHandOverCanvas) { _enterTimer.Start(); } }
/// <summary> /// Handles HandCursorLeave event /// </summary> protected void KinectButton_HandCursorLeave(object sender, HandCursorEventArgs args) { _handIsOverButton = false; if (IsClicked) { SetValue(IsClickedProperty, false); } ResetTimer(ClickTimer); }
/// <summary> /// Imitates the click event for KinectScreenshotButtun /// </summary> protected override void KinectButton_HandCursorClick(object sender, HandCursorEventArgs args) { SetValue(IsClickedProperty, true); (Application.Current.MainWindow as MainWindow).ScreenshotGrid.Visibility = Visibility.Visible; (Application.Current.MainWindow as MainWindow).ScreenshotText.Text = "3..."; _screenshotTimer.Start(); AfterClickTimer.Start(); }
/// <summary> /// Imitates the click event for KinectScreenshotButtun /// </summary> protected override void KinectButton_HandCursorClick(object sender, HandCursorEventArgs args) { SetValue(IsClickedProperty, true); (Application.Current.MainWindow as MainWindow).ScreenshotGrid.Visibility = Visibility.Visible; (Application.Current.MainWindow as MainWindow).ScreenshotText.Text = "3..."; _screenshotTimer.Start(); AfterClickTimer.Start(); }
// Maneja el evento HandCursorLeave private void ScrollableCanvas_HandCursorLeave(object sender, HandCursorEventArgs args) { _isHandOverCanvas = false; }
/// <summary> /// Imitates the click event for KinectSizeButton /// </summary> protected override void KinectButton_HandCursorClick(object sender, HandCursorEventArgs args) { SetValue(IsClickedProperty, true); AfterClickTimer.Start(); }
/// <summary> /// Handles HandCursorMove event /// </summary> protected void KinectButton_HandCursorMove(object sender, HandCursorEventArgs args) { _lastHandPosition = new Point(args.X, args.Y); }
/// <summary> /// Handles HandCursorEnter event /// </summary> protected void KinectButton_HandCursorEnter(object sender, HandCursorEventArgs args) { _handIsOverButton = true; ClickTimer.Start(); }
/// <summary> /// Imitates the click event for KinectSizeButton /// </summary> protected override void KinectButton_HandCursorClick(object sender, HandCursorEventArgs args) { SetValue(IsClickedProperty, true); AfterClickTimer.Start(); }
/// <summary> /// Handles HandCursorMove event /// </summary> protected void KinectButton_HandCursorMove(object sender, HandCursorEventArgs args) { _lastHandPosition = new Point(args.X, args.Y); }
/// <summary> /// Handles HandCursorLeave event /// </summary> protected void KinectButton_HandCursorLeave(object sender, HandCursorEventArgs args) { _handIsOverButton = false; if (IsClicked) SetValue(IsClickedProperty, false); ResetTimer(ClickTimer); }
/// <summary> /// Handles HandCursorEnter event /// </summary> protected void KinectButton_HandCursorEnter(object sender, HandCursorEventArgs args) { _handIsOverButton = true; ClickTimer.Start(); }