Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 3
0
        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);
            }
        }
Exemplo n.º 4
0
        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();
        }
Exemplo n.º 5
0
        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);
            }
        }