Inheritance: IMouseEventArgs
Exemple #1
0
 private void MouseMoved(MouseDevice sender, MouseEventArgs args)
 {
     if (_shouldMouseBeHidden)
     {
         Window.Current.CoreWindow.PointerCursor = _oldCursor;
         _cursorTimer.Stop();
         _cursorTimer.Start();
     }
 }
 private void MouseDeviceMouseMoved(MouseDevice sender, MouseEventArgs args)
 {
     var dx = args.MouseDelta.X;
     var dy = args.MouseDelta.Y;
     var value = MinimumMouseDragDelta * 100;
     if (dx > value || dx < -value || dy > value || dy < -value)
         return;
     _totalDeltaX += dx;
     _totalDeltaY += dy;
     if (_totalDeltaX > MinimumMouseDragDelta || _totalDeltaX < -MinimumMouseDragDelta || _totalDeltaY > MinimumMouseDragDelta || _totalDeltaY < -MinimumMouseDragDelta)
     {
         UpdateByDragging(_totalDeltaX, _totalDeltaY);
         _totalDeltaX = 0;
         _totalDeltaY = 0;
     }
 }
        private void OnMouseDragged(MouseDevice sender, MouseEventArgs args)
        {
            var dx = args.MouseDelta.X;
            var dy = args.MouseDelta.Y;

            if (dx > 200 || dx < -200 || dy > 200 || dy < -200)
            {
                return;
            }

            _totalDeltaX += dx;
            _totalDeltaY += dy;

            if (_totalDeltaX > MinMouseDragDelta ||
                _totalDeltaX < -MinMouseDragDelta ||
                _totalDeltaY > MinMouseDragDelta ||
                _totalDeltaY < -MinMouseDragDelta)
            {
                UpdateByDragging(_totalDeltaX, _totalDeltaY);
                _totalDeltaX = 0;
                _totalDeltaY = 0;
            }
        }
Exemple #4
0
        private void POnMouseLeave(object sender, MouseEventArgs mouseEventArgs)
        {
            var path = (Path)sender;
            path.Opacity = 1;

            GeoMapTooltip.Visibility = Visibility.Collapsed;//Visibility.Hidden;
        }
Exemple #5
0
        private void POnMouseEnter(object sender, MouseEventArgs mouseEventArgs)
        {
            var path = (Path) sender;
            path.Opacity = .8;

            var land = Lands.Values.FirstOrDefault(x => x.Shape == sender);
            if (land == null) return;

            double value;

            if (!HeatMap.TryGetValue(land.Id, out value)) return;
            if (!Hoverable) return;

            GeoMapTooltip.Visibility = Visibility.Visible;

            string name = null;

            if (LanguagePack != null) LanguagePack.TryGetValue(land.Id, out name);

            GeoMapTooltip.GeoData = new GeoData
            {
                Name = name ?? land.Name,
                Value = value
            };
        }
 private void MouseMoved(MouseDevice sender, MouseEventArgs args)
 {
     InputDetected();
 }
        private void RelativeMouseMoved(MouseDevice device, MouseEventArgs e)
        {
            if (!capturingMouse)
            {
                return;
            }

            MoonlightCommonRuntimeComponent.SendMouseMoveEvent((short)e.MouseDelta.X, (short)e.MouseDelta.Y);
        }
 private void HandleRelativeOnMouseMoved(MouseEventArgs args)
 {
     CurrentMouseDelta = NormalizeScreenPosition(new Vector2(args.MouseDelta.X, args.MouseDelta.Y));
 }
        private void OnMouseDragged(MouseDevice sender, MouseEventArgs args)
        {
            var dx = args.MouseDelta.X;
            var dy = args.MouseDelta.Y;

            UpdateByDragging(dx, dy);
        }