private void menuItem4_Click(object sender, System.EventArgs e) { IE_WinForms.Form2 curForm = (IE_WinForms.Form2) this.ActiveMdiChild; IE_WinForms.Form2 newView = new Form2(); newView.MdiParent = this; newView.Show(); newView.InitView(); newView.SetContext(curForm.View); newView.View.CreateNewView(newView.Handle); newView.SetNextIndex(curForm); }
private void FileImport_Popup(object sender, System.EventArgs e) { IE_WinForms.Form2 curForm = (IE_WinForms.Form2) this.ActiveMdiChild; if (curForm == null) { return; } if (curForm.View.IsObjectSelected()) { this.ExportBRep.Enabled = true; this.ExportIges.Enabled = true; this.ExportStep.Enabled = true; this.ExportVrml.Enabled = true; this.ExportStl.Enabled = true; } }
private void toolBarView_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e) { IE_WinForms.Form2 curForm = (IE_WinForms.Form2) this.ActiveMdiChild; if (curForm == null) { return; } switch (toolBarView.Buttons.IndexOf(e.Button)) { case 0: curForm.View.ZoomAllView(); break; case 1: curForm.Mode = CurrentAction3d.CurAction3d_WindowZooming; this.ZoomWin.Pushed = true; break; case 2: curForm.Mode = CurrentAction3d.CurAction3d_DynamicZooming; break; case 3: curForm.Mode = CurrentAction3d.CurAction3d_DynamicPanning; break; case 4: curForm.Zoom = curForm.View.Scale(); curForm.Mode = CurrentAction3d.CurAction3d_GlobalPanning; break; case 5: curForm.View.FrontView(); break; case 6: curForm.View.BackView(); break; case 7: curForm.View.TopView(); break; case 8: curForm.View.BottomView(); break; case 9: curForm.View.LeftView(); break; case 10: curForm.View.RightView(); break; case 11: curForm.View.AxoView(); break; case 12: curForm.Mode = CurrentAction3d.CurAction3d_DynamicRotation; break; case 13: curForm.View.Reset(); break; case 14: curForm.View.SetDegenerateModeOn(); curForm.DegenerateMode = true; this.HlrOff.Pushed = false; this.HlrOn.Pushed = true; break; case 15: curForm.View.SetDegenerateModeOff(); curForm.DegenerateMode = false; this.HlrOn.Pushed = false; this.HlrOff.Pushed = true; break; case 16: curForm.myOCCTProxy.ShowBottle(400, 300, 100); break; case 17: curForm.myOCCTProxy.showRect(200, 80, 500, 10, 5); curForm.View.ZoomAllView(); break; default: break; } }
public void SelectionChanged() { if (this.MdiChildren.Length == 0) { return; } IE_WinForms.Form2 curForm = (IE_WinForms.Form2) this.ActiveMdiChild; if (curForm == null) { return; } switch (curForm.View.DisplayMode()) { case -1: this.shading.Enabled = false; this.wireframe.Enabled = false; break; case 0: this.wireframe.Enabled = false; this.shading.Enabled = true; this.transparency.Enabled = false; break; case 1: this.wireframe.Enabled = true; this.shading.Enabled = false; this.transparency.Enabled = true; break; case 10: this.wireframe.Enabled = true; this.shading.Enabled = true; this.transparency.Enabled = true; break; default: break; } bool IsSelected = curForm.View.IsObjectSelected(); if (IsSelected) { this.color.Enabled = true; this.material.Enabled = true; this.delete.Enabled = true; } else { this.color.Enabled = false; this.material.Enabled = false; this.transparency.Enabled = false; this.delete.Enabled = false; } if (curForm.DegenerateMode) { this.HlrOff.Pushed = false; this.HlrOn.Pushed = true; } else { this.HlrOff.Pushed = true; this.HlrOn.Pushed = false; } if (curForm.Mode == IE_WinForms.CurrentAction3d.CurAction3d_WindowZooming) { this.ZoomWin.Pushed = false; } }