internal void InternalMouseDownAsync(InputDevice inputDevice, Point position)
        {
            _inputDevice = inputDevice;
            PickStarted?.Invoke(this, EventArgs.Empty);
            UpdateAppScreenshot();
            UpdateEyedropper(position);

            if (Opacity < 1)
            {
                Opacity = 1;
            }
        }
Пример #2
0
        private async void _rootGrid_PointerPressed(object sender, PointerRoutedEventArgs e)
        {
            _pointerId = e.Pointer.PointerId;
            PickStarted?.Invoke(this, EventArgs.Empty);
            if (_appScreenshot == null)
            {
                await UpdateAppScreenshotAsync();
            }

            var point = e.GetCurrentPoint(_rootGrid);

            UpdateEyedropper(point.Position);

            if (this.Opacity < 1)
            {
                this.Opacity = 1;
            }
        }
        // Internal abstraction is used by the Unit Tests
        internal async Task InternalPointerPressedAsync(uint pointerId, Point position, Windows.Devices.Input.PointerDeviceType pointerDeviceType)
        {
            _pointerId = pointerId;
            PickStarted?.Invoke(this, EventArgs.Empty);
            await UpdateAppScreenshotAsync();

            UpdateEyedropper(position);

            if (pointerDeviceType == Windows.Devices.Input.PointerDeviceType.Touch)
            {
                VisualStateManager.GoToState(this, TouchState, false);
            }
            else
            {
                VisualStateManager.GoToState(this, MousePenState, false);
            }

            if (Opacity < 1)
            {
                Opacity = 1;
            }
        }
Пример #4
0
        private async void TargetGrid_PointerPressed(object sender, PointerRoutedEventArgs e)
        {
            _pointerId = e.Pointer.PointerId;
            PickStarted?.Invoke(this, EventArgs.Empty);
            await UpdateAppScreenshotAsync();

            var point = e.GetCurrentPoint(_rootGrid);

            UpdateEyedropper(point.Position);
            if (e.Pointer.PointerDeviceType == Windows.Devices.Input.PointerDeviceType.Touch)
            {
                VisualStateManager.GoToState(this, TouchState, false);
            }
            else
            {
                VisualStateManager.GoToState(this, MousePenState, false);
            }

            if (Opacity < 1)
            {
                Opacity = 1;
            }
        }
 private void Eyedropper_PickStarted(Eyedropper sender, EventArgs args)
 {
     PickStarted?.Invoke(this, args);
 }