private void ContextShading_Click(object sender, System.EventArgs e) { this.SetDisplayMode(1); this.myView.UpdateCurrentViewer(); IE.Form1 parent = (IE.Form1) this.ParentForm; parent.SelectionChanged(); }
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) { myView.WindowFitAll(myXmin, myYmin, myXmax, myYmax); } this.Cursor = System.Windows.Forms.Cursors.Default; IE.Form1 f = (IE.Form1) this.ParentForm; f.SelectionChanged(); myCurrentMode = CurrentAction3d.CurAction3d_Nothing; break; case CurrentAction3d.CurAction3d_DynamicPanning: myCurrentMode = CurrentAction3d.CurAction3d_Nothing; break; case CurrentAction3d.CurAction3d_GlobalPanning: myView.Place(e.X, e.Y, myCurZoom); myCurrentMode = CurrentAction3d.CurAction3d_Nothing; break; case CurrentAction3d.CurAction3d_DynamicRotation: myCurrentMode = CurrentAction3d.CurAction3d_Nothing; if (!myDegenerateModeIsOn) { myView.SetDegenerateModeOff(); myDegenerateModeIsOn = false; } else { myView.SetDegenerateModeOn(); myDegenerateModeIsOn = true; } break; default: break; } break; case MouseButtons.Right: if (!myDegenerateModeIsOn) { myView.SetDegenerateModeOff(); myDegenerateModeIsOn = false; } else { myView.SetDegenerateModeOn(); myDegenerateModeIsOn = true; } break; default: break; } IE.Form1 parent = (IE.Form1) this.ParentForm; parent.SelectionChanged(); }