示例#1
0
 public override void OnMouseMove(int int_0, int int_1, int int_2, int int_3)
 {
     if (this._plugin.Scene.LayerCount != 0 && this.bool_0 && ((long)int_2 - this.long_0 != 0L || (long)int_3 - this.long_1 != 0L))
     {
         long num  = (long)int_2 - this.long_0;
         long num2 = (long)int_3 - this.long_1;
         if (int_0 == 2)
         {
             ToolSceneNavigate.SetCursor(this.cursor_2.Handle.ToInt32());
             if (num2 < 0L)
             {
                 this._plugin.Camera.Zoom(1.1);
             }
             else if (num2 > 0L)
             {
                 this._plugin.Camera.Zoom(0.9);
             }
         }
         if (int_0 == 3)
         {
             ToolSceneNavigate.SetCursor(this.cursor_1.Handle.ToInt32());
             IPoint point = new Point();
             point.PutCoords((double)this.long_0, (double)this.long_1);
             IPoint point2 = new Point();
             point2.PutCoords((double)int_2, (double)int_3);
             this._plugin.Camera.Pan(point, point2);
         }
         if (int_0 == 1)
         {
             if (!this.bool_1)
             {
                 this._plugin.Camera.PolarUpdate(1.0, (double)num, (double)num2, true);
             }
             else if (this.bool_3)
             {
                 this._plugin.Camera.PolarUpdate(1.0, (double)num, (double)num2, true);
             }
             else
             {
                 System.Drawing.Rectangle rectangle = default(System.Drawing.Rectangle);
                 ToolSceneNavigate.GetClientRect(this._plugin.ActiveViewer.hWnd, ref rectangle);
                 if (num < 0L)
                 {
                     this.double_0 = (180.0 / (double)rectangle.Right - (double)rectangle.Left) * (double)(num - (long)this._plugin.ActiveViewer.GestureSensitivity);
                 }
                 else
                 {
                     this.double_0 = (180.0 / (double)rectangle.Right - (double)rectangle.Left) * (double)(num + (long)this._plugin.ActiveViewer.GestureSensitivity);
                 }
                 this.StartSpin();
             }
         }
         this.long_0 = (long)int_2;
         this.long_1 = (long)int_3;
         this._plugin.ActiveViewer.Redraw(true);
     }
 }
示例#2
0
 public override void OnMouseUp(int int_0, int int_1, int int_2, int int_3)
 {
     if (this.bool_1)
     {
         ToolSceneNavigate.SetCursor(this.cursor_3.Handle.ToInt32());
     }
     else
     {
         ToolSceneNavigate.SetCursor(this.cursor_0.Handle.ToInt32());
     }
     try
     {
     }
     catch
     {
     }
 }
示例#3
0
        public override void OnKeyDown(int int_0, int int_1)
        {
            if (int_0 == 27)
            {
                this.bool_2 = true;
                ToolSceneNavigate.SetCursor(this.cursor_0.Handle.ToInt32());
            }
            switch (int_1)
            {
            case 1:
                ToolSceneNavigate.SetCursor(this.cursor_1.Handle.ToInt32());
                break;

            case 2:
                ToolSceneNavigate.SetCursor(this.cursor_2.Handle.ToInt32());
                break;

            case 3:
                if (!this.bool_3)
                {
                    if (this.bool_1)
                    {
                        this._plugin.ActiveViewer.GestureEnabled = false;
                        this.bool_1 = false;
                        ToolSceneNavigate.SetCursor(this.cursor_0.Handle.ToInt32());
                    }
                    else
                    {
                        this._plugin.ActiveViewer.GestureEnabled = true;
                        this.bool_1 = true;
                        ToolSceneNavigate.SetCursor(this.cursor_3.Handle.ToInt32());
                    }
                }
                break;
            }
        }
示例#4
0
        public override void OnKeyUp(int int_0, int int_1)
        {
            if (int_1 == 1)
            {
                switch (int_0)
                {
                case 37:
                    this._plugin.Camera.Move(esriCameraMovementType.esriCameraMoveRight, 0.01);
                    break;

                case 38:
                    this._plugin.Camera.Move(esriCameraMovementType.esriCameraMoveDown, 0.01);
                    break;

                case 39:
                    this._plugin.Camera.Move(esriCameraMovementType.esriCameraMoveLeft, 0.01);
                    break;

                case 40:
                    this._plugin.Camera.Move(esriCameraMovementType.esriCameraMoveUp, 0.01);
                    break;

                default:
                    return;
                }
            }
            else if (int_1 == 2)
            {
                switch (int_0)
                {
                case 37:
                    this._plugin.Camera.HTurnAround(-1.0);
                    break;

                case 38:
                    this._plugin.Camera.Move(esriCameraMovementType.esriCameraMoveAway, 0.01);
                    break;

                case 39:
                    this._plugin.Camera.HTurnAround(1.0);
                    break;

                case 40:
                    this._plugin.Camera.Move(esriCameraMovementType.esriCameraMoveToward, 0.01);
                    break;

                default:
                    return;
                }
            }
            else
            {
                double num  = 5.0;
                double num2 = 2.0;
                double num3 = 2.0;
                switch (int_0)
                {
                case 33:
                    this.double_0 *= 1.1;
                    break;

                case 34:
                    this.double_0 /= 1.1;
                    break;

                case 35:
                case 36:
                    return;

                case 37:
                    this._plugin.Camera.PolarUpdate(1.0, num3 * num, 0.0, true);
                    break;

                case 38:
                    this._plugin.Camera.PolarUpdate(1.0, 0.0, -num2 * num, true);
                    break;

                case 39:
                    this._plugin.Camera.PolarUpdate(1.0, -num3 * num, 0.0, true);
                    break;

                case 40:
                    this._plugin.Camera.PolarUpdate(1.0, 0.0, num2 * num, true);
                    break;

                default:
                    return;
                }
            }
            if (this.bool_1)
            {
                ToolSceneNavigate.SetCursor(this.cursor_3.Handle.ToInt32());
            }
            else
            {
                ToolSceneNavigate.SetCursor(this.cursor_0.Handle.ToInt32());
            }
            this._plugin.ActiveViewer.Redraw(true);
        }