Inheritance: IMouseEventArgs
Exemplo n.º 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;
     }
 }
Exemplo n.º 3
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;
            }
        }
Exemplo n.º 4
0
        private void POnMouseLeave(object sender, MouseEventArgs mouseEventArgs)
        {
            var path = (Path)sender;
            path.Opacity = 1;

            GeoMapTooltip.Visibility = Visibility.Collapsed;//Visibility.Hidden;
        }
Exemplo n.º 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
            };
        }
Exemplo n.º 6
0
 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);
        }
Exemplo n.º 8
0
 private void HandleRelativeOnMouseMoved(MouseEventArgs args)
 {
     CurrentMouseDelta = NormalizeScreenPosition(new Vector2(args.MouseDelta.X, args.MouseDelta.Y));
 }
Exemplo n.º 9
0
        private void OnMouseDragged(MouseDevice sender, MouseEventArgs args)
        {
            var dx = args.MouseDelta.X;
            var dy = args.MouseDelta.Y;

            UpdateByDragging(dx, dy);
        }