private void Timer_Tick(object sender, EventArgs e) { Timer.Tick -= OnTime; Timer.Enabled = false; HandledMouseEventArgs E = new HandledMouseEventArgs(eSave); EventServer.LongClick(E); LongClick?.Invoke(this, eSave); }
private void _MouseDoubleClick(object sender, System.Windows.Forms.MouseEventArgs e) { MousePos = new Point(e.X, e.Y); HandledMouseEventArgs E = new HandledMouseEventArgs(e); EventServer.MouseDoubleClick(E); if (!E.Handled) { onMouseDoubleClick(e); } }
private void _MouseWheelEnd(object sender, System.Windows.Forms.MouseEventArgs e) { if (!LastClickPosIsReady) { LastClickPos = Currentxyz; } HandledMouseEventArgs E = new HandledMouseEventArgs(e); EventServer.MouseWheelEnd(E); if (!E.Handled) { OnMouseWheelEnd(e); } }
private void _MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { if (!LastClickPosIsReady) { LastClickPos = Currentxyz; } Timer.Interval = 500; Timer.Tick += OnTime; Timer.Enabled = true; eSave = e; MousePos = new Point(e.X, e.Y); if ((!SnapEnable)) { double Lam = -1; Plane P = new Plane(new xyz(0, 0, 0), new xyz(0, 0, 1)); xyz Pt = new xyz(0, 0, 0); P.Cross(FromScr(MousePos), out Lam, out Pt); Currentxyz = Pt; } else if ((CurrentNavigationsModus == NavigateModus.Nothing)) { Selector.CreateSnappList(); } HandledMouseEventArgs E = new HandledMouseEventArgs(e); EventServer.MouseDown(E); if (!E.Handled) { onMouseDown(e); } for (int i = 0; i < EventServer.Added.Count; i++) { if (EventServer.Contains(EventServer.Added[i])) { EventServer.Added[i].OnMouseDown(E); } } EventServer.Added.Clear(); }
private void _MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) { if ((MousePos.X == e.X) && (MousePos.Y == e.Y)) { return; } MousePos = new Point(e.X, e.Y); double Lam = -1; Plane P = new Plane(new xyz(0, 0, 0), new xyz(0, 0, 1)); xyz Pt = new xyz(0, 0, 0); P.Cross(FromScr(MousePos), out Lam, out Pt); if (CurrentNavigationsModus == NavigateModus.Nothing) // es braucht kein Currentxyz { if (SnappItems.Count == 0) { Currentxyz = Pt; } } if ((!SnapEnable) /*&& (!ForegroundDrawEnable)*/) { //double Lam = -1; //Plane P = new Plane(new xyz(0, 0, 0), new xyz(0, 0, 1)); //xyz Pt = new xyz(0, 0, 0); //P.Cross(FromScr(MousePos), out Lam, out Pt); //Currentxyz = Pt; } else if ((CurrentNavigationsModus == NavigateModus.Nothing))// && (!ForegroundDrawEnable)) { Selector.CreateSnappList(); } HandledMouseEventArgs E = new HandledMouseEventArgs(e); EventServer.MouseMove(E); if (!E.Handled) { OnMouseMove(e); } }