コード例 #1
0
ファイル: Form2.cs プロジェクト: sticwin/OCCT
 private void ContextShading_Click(object sender, System.EventArgs e)
 {
     this.SetDisplayMode(1);
     this.myOCCTProxy.UpdateCurrentViewer();
     IE_WinForms.tBarBackView parent = (IE_WinForms.tBarBackView) this.ParentForm;
     parent.SelectionChanged();
 }
コード例 #2
0
ファイル: Form2.cs プロジェクト: sticwin/OCCT
 private void toolBar1_MouseLeave(object sender, System.EventArgs e)
 {
     IE_WinForms.tBarBackView parent = (IE_WinForms.tBarBackView) this.ParentForm;
     parent.StatusBar.Text = "";
 }
コード例 #3
0
ファイル: Form2.cs プロジェクト: sticwin/OCCT
        private void Form2_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            switch (e.Button)
            {
            case MouseButtons.Left:
                if (myCurrentPressedKey == CurrentPressedKey.CurPressedKey_Ctrl)
                {
                    return;
                }
                switch (myCurrentMode)
                {
                case CurrentAction3d.CurAction3d_Nothing:
                    if (e.X == myXmin && e.Y == myYmin)
                    {
                        myXmax = e.X; myYmax = e.Y;
                        if (myCurrentPressedKey == CurrentPressedKey.CurPressedKey_Shift)
                        {
                            MultiInputEvent(myXmax, myYmax);
                        }
                        else
                        {
                            InputEvent(myXmax, myYmax);
                        }
                    }
                    else
                    {
                        myXmax = e.X; myYmax = e.Y;
                        DrawRectangle(false);
                        if (myCurrentPressedKey == CurrentPressedKey.CurPressedKey_Shift)
                        {
                            MultiDragEvent(myXmax, myYmax, 1);
                        }
                        else
                        {
                            DragEvent(myXmax, myYmax, 1);
                        }
                    }
                    break;

                case CurrentAction3d.CurAction3d_DynamicZooming:
                    myCurrentMode = CurrentAction3d.CurAction3d_Nothing;
                    break;

                case CurrentAction3d.CurAction3d_WindowZooming:
                    myXmax = e.X; myYmax = e.Y;
                    DrawRectangle(false);
                    int ValZWMin = 1;
                    if (Math.Abs(myXmax - myXmin) > ValZWMin && Math.Abs(myXmax - myYmax) > ValZWMin)
                    {
                        myOCCTProxy.WindowFitAll(myXmin, myYmin, myXmax, myYmax);
                    }
                    this.Cursor = System.Windows.Forms.Cursors.Default;
                    IE_WinForms.tBarBackView f = (IE_WinForms.tBarBackView) this.ParentForm;
                    f.SelectionChanged();
                    myCurrentMode = CurrentAction3d.CurAction3d_Nothing;
                    break;

                case CurrentAction3d.CurAction3d_DynamicPanning:
                    myCurrentMode = CurrentAction3d.CurAction3d_Nothing;
                    break;

                case CurrentAction3d.CurAction3d_GlobalPanning:
                    myOCCTProxy.Place(e.X, e.Y, myCurZoom);
                    myCurrentMode = CurrentAction3d.CurAction3d_Nothing;
                    break;

                case CurrentAction3d.CurAction3d_DynamicRotation:
                    myCurrentMode = CurrentAction3d.CurAction3d_Nothing;
                    if (!myDegenerateModeIsOn)
                    {
                        myOCCTProxy.SetDegenerateModeOff();
                        myDegenerateModeIsOn = false;
                    }
                    else
                    {
                        myOCCTProxy.SetDegenerateModeOn();
                        myDegenerateModeIsOn = true;
                    }
                    break;

                default:
                    break;
                }
                break;

            case MouseButtons.Right:
                if (!myDegenerateModeIsOn)
                {
                    myOCCTProxy.SetDegenerateModeOff();
                    myDegenerateModeIsOn = false;
                }
                else
                {
                    myOCCTProxy.SetDegenerateModeOn();
                    myDegenerateModeIsOn = true;
                }
                break;

            default:
                break;
            }

            IE_WinForms.tBarBackView parent = (IE_WinForms.tBarBackView) this.ParentForm;
            parent.SelectionChanged();
        }
コード例 #4
0
ファイル: Form2.cs プロジェクト: sticwin/OCCT
 public void DeleteObjects()
 {
     myOCCTProxy.EraseObjects();
     IE_WinForms.tBarBackView parent = (IE_WinForms.tBarBackView) this.ParentForm;
     parent.SelectionChanged();
 }
コード例 #5
0
ファイル: Form2.cs プロジェクト: sticwin/OCCT
 private void Form2_Closed(object sender, System.EventArgs e)
 {
     IE_WinForms.tBarBackView parent = (IE_WinForms.tBarBackView) this.ParentForm;
     parent.OnFileClose();
 }