Esempio n. 1
0
        /// <summary>
        /// Zooms the view by the specified factor at the position specified in the <see cref="OxyMouseEventArgs" />.
        /// </summary>
        /// <param name="view">The view.</param>
        /// <param name="args">The <see cref="OxyMouseWheelEventArgs" /> instance containing the event data.</param>
        /// <param name="delta">The zoom factor.</param>
        private static void HandleZoomAt(IPlotView view, OxyMouseEventArgs args, double delta)
        {
            var m = new ZoomStepManipulator(view)
            {
                Step = delta, FineControl = args.IsControlDown
            };

            m.Started(args);
        }
Esempio n. 2
0
        /// <summary>
        /// Zooms the view by the mouse wheel delta in the specified <see cref="OxyKeyEventArgs" />.
        /// </summary>
        /// <param name="view">The view.</param>
        /// <param name="args">The <see cref="OxyMouseWheelEventArgs" /> instance containing the event data.</param>
        /// <param name="factor">The zoom speed factor. Default value is 1.</param>
        private static void HandleZoomByWheel(IPlotView view, OxyMouseWheelEventArgs args, double factor = 1)
        {
            var m = new ZoomStepManipulator(view)
            {
                Step = args.Delta * 0.001 * factor, FineControl = args.IsControlDown
            };

            m.Started(args);
        }
Esempio n. 3
0
 /// <summary>
 /// Zooms the view by the mouse wheel delta in the specified <see cref="OxyKeyEventArgs" />.
 /// </summary>
 /// <param name="view">The view.</param>
 /// <param name="args">The <see cref="OxyMouseWheelEventArgs" /> instance containing the event data.</param>
 /// <param name="factor">The zoom speed factor. Default value is 1.</param>
 private static void HandleZoomByWheel(IPlotView view, OxyMouseWheelEventArgs args, double factor = 1)
 {
     var m = new ZoomStepManipulator(view) { Step = args.Delta * 0.001 * factor, FineControl = args.IsControlDown };
     m.Started(args);
 }
Esempio n. 4
0
 /// <summary>
 /// Zooms the view by the specified factor at the position specified in the <see cref="OxyMouseEventArgs" />.
 /// </summary>
 /// <param name="view">The view.</param>
 /// <param name="args">The <see cref="OxyMouseWheelEventArgs" /> instance containing the event data.</param>
 /// <param name="delta">The zoom factor.</param>
 private static void HandleZoomAt(IPlotView view, OxyMouseEventArgs args, double delta)
 {
     var m = new ZoomStepManipulator(view) { Step = delta, FineControl = args.IsControlDown };
     m.Started(args);
 }
Esempio n. 5
0
 /// <summary>
 /// Raises the <see cref="E:System.Windows.Forms.Control.MouseWheel"/> event.
 /// </summary>
 /// <param name="e">
 /// A <see cref="T:System.Windows.Forms.MouseEventArgs"/> that contains the event data.
 /// </param>
 protected override void OnMouseWheel(MouseEventArgs e)
 {
     base.OnMouseWheel(e);
     bool isControlDown = ModifierKeys == Keys.Control;
     var m = new ZoomStepManipulator(this, e.Delta * 0.001, isControlDown);
     m.Started(new ManipulationEventArgs(e.Location.ToScreenPoint()));
 }