void m_category_people_OnMouseUpEvent(object sender, System.Windows.Forms.MouseEventArgs e) { m_currentCategoryIndex = 9; ChangeForm(m_countryNameLabel.Text, m_currentCategoryIndex); }
/// <summary> /// Constructor with WfMouseEventArgs</summary> /// <param name="args">WfMouseEventArgs</param> public MouseEventArgsInterop(WfMouseEventArgs args) : this(args.Button, args.Clicks, args.X, args.Y, args.Delta) {}
private void mouseHookListener_MouseMove(object sender, MouseEventArgs e) { if (lastMouseDownLocation != null) { var currentPos = e.Location; var proposedYOffset = lastMouseDownVerticalOffset + lastMouseDownLocation.Value.Y - currentPos.Y; var proposedXOffset = lastMouseDownHorizontalOffset + lastMouseDownLocation.Value.X - currentPos.X; if (proposedYOffset <= 0 || proposedYOffset > source.ScrollViewer.ScrollableHeight) { lastMouseDownVerticalOffset = proposedYOffset <= 0 ? 0 : source.ScrollViewer.ScrollableHeight; lastMouseDownLocation = new Point(lastMouseDownLocation.Value.X, e.Y); proposedYOffset = lastMouseDownVerticalOffset + lastMouseDownLocation.Value.Y - currentPos.Y; } source.ScrollViewer.ScrollToVerticalOffset(proposedYOffset); if (proposedXOffset <= 0 || proposedXOffset > source.ScrollViewer.ScrollableWidth) { lastMouseDownHorizontalOffset = proposedXOffset <= 0 ? 0 : source.ScrollViewer.ScrollableWidth; lastMouseDownLocation = new Point(e.X, lastMouseDownLocation.Value.Y); proposedXOffset = lastMouseDownHorizontalOffset + lastMouseDownLocation.Value.X - currentPos.X; } source.ScrollViewer.ScrollToHorizontalOffset(proposedXOffset); } }
private void Form1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) { paper.Clear(this.BackColor); paper.DrawRectangle(pen, e.X + 10, this.ClientRectangle.Height - 20, 50, 10); }
void flag_OnMouseEnterEvent(object sender, EventArgs e) { System.Windows.Forms.MouseEventArgs mea = new System.Windows.Forms.MouseEventArgs( System.Windows.Forms.MouseButtons.None, 0, DrawArgs.LastMousePosition.X, DrawArgs.LastMousePosition.Y, 0); // hack check to make sure that a widget isn't in the way if (DrawArgs.NewRootWidget.OnMouseMove(mea) || DrawArgs.RootWidget.OnMouseMove(mea)) return; WavingFlagLayer flag = (WavingFlagLayer)sender; if (m_wavingFlagsList.IsOn && flag.Initialized && flag.IsOn) { ChangeForm(flag.Name, m_currentCategoryIndex); //m_ciaForm.Visible = true; } for (int i = 0; i < m_wavingFlagsList.ChildObjects.Count; i++) { if (m_wavingFlagsList.ChildObjects[i] is WavingFlagLayer) { WavingFlagLayer wavingFlag = (WavingFlagLayer)m_wavingFlagsList.ChildObjects[i]; if (wavingFlag.Name != flag.Name) wavingFlag.ShowHighlight = false; else wavingFlag.ShowHighlight = true; } } }
/// <summary> /// Should the camera do a panning (strafing) motion?</summary> /// <param name="controlScheme">The control scheme instance to extend</param> /// <param name="modifierKeys">The camera control's ModifierKeys property</param> /// <param name="e">The camera control's event handler's WfMouseEventArgs</param> /// <returns>True if the user wants to pan the camera</returns> /// <remarks>This is used by the arcball and trackball camera controllers.</remarks> public static bool IsPanning(this ControlScheme controlScheme, WfKeys modifierKeys, WfMouseEventArgs e) { return controlScheme.IsPanning(KeysInterop.ToAtf(modifierKeys), MouseEventArgsInterop.ToAtf(e)); }
/* ----------------------------------------------------------------- */ /// /// OnMouseUp /// /// <summary> /// 描画対象となるボタンの MouseUp イベントを捕捉するハンドラです。 /// </summary> /// /* ----------------------------------------------------------------- */ protected virtual void OnMouseUp(System.Windows.Forms.MouseEventArgs e) { IsMouseDown = false; View.Invalidate(); }
// Called when the mouse wheel is moved private void onMouseWheelMoved(object sender, MouseEventArgs args) { mouseWheel= args.Delta; }
private void CVue3D_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) { Capture = false; }
/* ----------------------------------------------------------------- */ /// /// OnMouseDown /// /// <summary> /// 描画対象となるボタンの MouseDown イベントを捕捉するハンドラです。 /// </summary> /// /* ----------------------------------------------------------------- */ protected virtual void OnMouseDown(System.Windows.Forms.MouseEventArgs e) => IsMouseDown = (e.Button == System.Windows.Forms.MouseButtons.Left);
void MyNotifyIcon_MouseDoubleClick(object sender, System.Windows.Forms.MouseEventArgs e) { this.WindowState = WindowState.Normal; }
public bool OnMouseWheel(System.Windows.Forms.MouseEventArgs e) { // TODO: Add TextBox.OnMouseWheel implementation return(false); }
void Viewport_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) { if (e.Button == System.Windows.Forms.MouseButtons.Left) { } }
/// <summary> /// Creates AtfMouseEventArgs instance from data in WfMouseEventArgs instance</summary> /// <param name="args">WfMouseEventArgs instance</param> /// <returns>AtfMouseEventArgs instance</returns> public static AtfMouseEventArgs ToAtf(WfMouseEventArgs args) { return new AtfMouseEventArgs(MouseButtonsInterop.ToAtf(args.Button), args.Clicks, args.X, args.Y, args.Delta); }
private void con_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { p = new System.Drawing.Point(e.X, e.Y); }
// Called when the viewport has detected a mouse button is up private void onMouseUp(object sender, MouseEventArgs args) { switch((int)args.Button) { case 1048576: held[0]= false; break; case 4194304: held[1]= false; break; case 2097152: held[2]= false; break; case 8388608: held[3]= false; break; case 16777216: held[4]= false; break; } mouseWheel= args.Delta; }
private void con_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) { }
/// <summary> /// Gets called when mouse moves over map /// </summary> /// <param name="worldPos">The click coordinate</param> /// <param name="mouseEventArgs">The event arguments</param> private void MapBoxOnMouseMove(Coordinate worldPos, MouseEventArgs mouseEventArgs) { _currentMouseCoordinate = worldPos; if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs("CurrentMouseCoordinate")); PropertyChanged(this, new PropertyChangedEventArgs("CurrentMouseCoordinateString")); } }
private void GlControlHost_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { WInput.SetMouseState(WinFormToWPFMouseButton(e), true); }
void HookManager_MouseMove(object sender, MouseEventArgs e) { //Side dock > top dock if (!IsEnabled) return; if (Mouse.LeftButton == MouseButtonState.Released) //If the user doubleclicks the window, relocates the window and releases the mouse, it doesn't get stopped { DragStop(); return; } if (MouseIsLeftRightOrTop(e.X, e.Y, out _newSide)) { var screen = WpfScreen.GetScreenFrom(new Point(e.X, e.Y)); if (NewSide == WindowPositionSide.Left || NewSide == WindowPositionSide.Right) { if (!IsAtRightOrLeftBorder) { IsAtRightOrLeftBorder = true; OpenWindow(NewSide.Value, screen); if (IsAtTop) IsAtTop = false; } return; } if (IsAtRightOrLeftBorder) { IsAtRightOrLeftBorder = false; CloseWindowIfExists(); } if (NewSide == WindowPositionSide.Top) { if (!IsAtTop || screen.DeviceName != DisplayingScreen) { IsAtTop = true; OpenWindow(NewSide.Value, screen); DisplayingScreen = screen.DeviceName; } } } else { if (!_firedUndocked) { _firedUndocked = true; OnUndocked(); } if (IsAtTop) { IsAtTop = false; CloseWindowIfExists(); } if (IsAtRightOrLeftBorder) { IsAtRightOrLeftBorder = false; CloseWindowIfExists(); } } }
private void GlControlHost_MouseWheel(object sender, System.Windows.Forms.MouseEventArgs e) { WInput.SetMouseScrollDelta(e.Delta); }
private void mouseHookListener_MouseUp(object sender, MouseEventArgs e) { mouseHookListener.Enabled = false; lastMouseDownLocation = null; }
void m_category_transportation_OnMouseUpEvent(object sender, System.Windows.Forms.MouseEventArgs e) { m_currentCategoryIndex = 71; ChangeForm(m_countryNameLabel.Text, m_currentCategoryIndex); }
private void mouseHookListener_MouseDown(object sender, MouseEventArgs e) { source.ZoomIn(); }
public override void MouseDownAction(System.Windows.Forms.MouseEventArgs e) { points = new LinkedList <Vector2>(); points.Add(new Vector2(e.X, e.Y)); }