/// <summary> /// Begins dragging the clicked node and pushes it in front of other nodes. /// </summary> public void NodeMouseDown(NodeViewModel node, IMouseEventInfo e) { draggedNode = node; dragMouseOffset = e.GetPosition(relativeTo: this) - draggedNode.Position; draggedNode.ZIndex = maxZValue++; draggedNode.NotifyOfPropertyChange(() => draggedNode.ZIndex); }
/// <summary> /// Updates the position of the dragged edge or node. /// </summary> public void MouseMove(IMouseEventInfo e) { if (e.LeftButton != MouseButtonState.Pressed) { draggedNode = null; DraggedEdge = null; // removes unnecessary inputs CullInputs(); return; } if (draggedNode != null) { draggedNode.Position = e.GetPosition(relativeTo: this) - dragMouseOffset; } else if (DraggedEdge != null) { if (DraggedEdge.Status != EdgeStatus.Indeterminate) { DraggedEdge.Status = EdgeStatus.Indeterminate; } DraggedEdge.EndPoint = e.GetPosition(relativeTo: this); } }
public void MouseUp(IMouseEventInfo info) { InputDevice = InputDevice.Mouse; if (MouseButtons.None == info.Button) throw new ArgumentException(); foreach (var item in State.GetAllItems().Where(x => x.IsClicked(info.Location.X, info.Location.Y)).ToArray()) { item.OnClick(info); } State.MouseUp(info); }
public void MouseMove(IMouseEventInfo info) { InputDevice = InputDevice.Mouse; MouseLocation = info.Location; State.MouseMove(info); }
protected override void MouseUpInternal(IMouseEventInfo info) { base.MouseUpInternal(info); RaiseAction0Event(info.Button, info.Location); }
public virtual void MouseUp(WindowState eigoTestState, IMouseEventInfo mouseEventInfo) { }
public void OnClick(IMouseEventInfo info) { if (null != Click) { Click(this, new EigoTestMouseEventArgs(info)); } }
public void MouseMove(IMouseEventInfo info) { MouseCursorPosition = info.Location; Window.MouseCursor = MouseCursor.Default; 指定した座標の項目をCurrentItemにする(info.Location.X, info.Location.Y); MouseMoveInternal(info); Invalidate(); }
protected override void MouseUpInternal(IMouseEventInfo info) { var chumon = (Chumon)_mondai.Parent; var daimon = (Daimon)chumon.Parent; if (次のDaimonへ遷移する判定()) { Window.State = WindowState.FoFi(this, new DaimonState(Window, (Daimon)daimon.NextItem)); } else { BackToChumonMenu(); } }
protected virtual void MouseWheelInternal(IMouseEventInfo info) { }
protected virtual void MouseMoveInternal(IMouseEventInfo info) { }
public void MouseWheel(IMouseEventInfo info) { MouseWheelInternal(info); }
public void MouseUp(IMouseEventInfo info) { MouseCursorPosition = info.Location; Window.MouseCursor = MouseCursor.Default; 指定した座標の項目をCurrentItemにする(info.Location.X, info.Location.Y); MouseUpInternal(info); switch (info.Button) { case MouseButtons.Left : { break; } case MouseButtons.Right : { OnAction1(); break; } } Invalidate(); }
public void MouseWheel(IMouseEventInfo info) { State.MouseWheel(info); }
protected override void MouseWheelInternal(IMouseEventInfo info) { _helpWithScroll.Scroll(info); }
public EigoTestMouseEventArgs(IMouseEventInfo info) { Info = info; }
protected override void MouseUpInternal(IMouseEventInfo info) { OnAction0(); }
protected override void MouseUpInternal(IMouseEventInfo mouseEventInfo) { RaiseAction0Event(mouseEventInfo.Button, mouseEventInfo.Location); }
protected override void MouseUpInternal(IMouseEventInfo info) { if (RaiseAction0Event(info.Button, info.Location)) {} else if (MouseButtons.Right == info.Button) { OnAction1(); } }