private void menu_makeAlwaysOnTop(object sender, System.EventArgs e) { base.RecordUndoEvent("Child Window Status Change"); this.winChildStatus = childStatus.AlwaysOnTop; this.SetupWin(); this.ExpireSolution(true); }
private void menu_makeChildofRhino(object sender, System.EventArgs e) { base.RecordUndoEvent("Child Window Status Change"); this.winChildStatus = childStatus.ChildOfRhino; this.UpdateMenu(); this.SetupWin(); this.ExpireSolution(true); }
/// <summary> /// Adds to the default deserialization method to retrieve the saved child status so it persists on copy/paste and save/reopen. /// </summary> public override bool Read(GH_IReader reader) { int readVal = -1; reader.TryGetInt32("ChildStatus", ref readVal); bool enableHorizScroll = false; reader.TryGetBoolean("EnableHorizScroll", ref enableHorizScroll); winChildStatus = (childStatus)readVal; this.enableHorizScroll = enableHorizScroll; this.UpdateMenu(); return(base.Read(reader)); }
internal static void SetChildStatus(MainWindow mw, childStatus winChildStatus) { switch (winChildStatus) { case childStatus.ChildOfGH: setOwner(Grasshopper.Instances.DocumentEditor, mw); break; case childStatus.AlwaysOnTop: mw.Topmost = true; break; case childStatus.ChildOfRhino: setOwner(Rhino.RhinoApp.MainWindowHandle(), mw); break; default: break; } }