public void EditSystem() { if (this.editor == null) { this.editor = new SystemEditor(this); if (flowsheetPrefs != null) { flowsheetPrefs.RestoreGlobalEditorPrefs(this.editor); } // we need to subscribe to Dispose() and not to Close() // see SystemEditor.menuItemClose_Click() for details this.editor.Disposed += new EventHandler(editor_Disposed); this.editor.Owner = (Form)this.Parent; this.editor.Show(); } else { if (this.editor.WindowState.Equals(FormWindowState.Minimized)) { this.editor.WindowState = FormWindowState.Normal; } //this.editor.Activate(); this.editor.Visible = true; } }
internal void RestoreGlobalEditorPrefs(SystemEditor globalEditor) { if (hasGlobalEditorPrefs) { globalEditor.Location = globalEditorFormLocation; globalEditor.Size = globalEditorFormSize; globalEditor.SplitterPosition = globalEditorSplitterPosition; } }
private void CloseDependantsOfFlowsheet() { if (this.Editor != null) { this.Editor.Close(); this.Editor = null; } if (this.toolbox != null) { this.toolbox.Close(); } }
private void CloseDependantsOfFlowsheet() { if (this.editor != null) { this.editor.Close(); this.editor.Dispose(); this.editor = null; } if (this.customEditorForm != null) { this.customEditorForm.Close(); this.customEditorForm.Dispose(); this.customEditorForm = null; } }
public void EditSystem() { if (this.editor == null) { this.editor = new SystemEditor(this); // we need to subscribe to Dispose() and not to Close() // see SystemEditor.menuItemClose_Click() for details this.editor.Disposed += new EventHandler(editor_Disposed); this.editor.Owner = (Form)this.Parent; this.editor.Show(); } else { if (this.editor.WindowState.Equals(FormWindowState.Minimized)) { this.editor.WindowState = FormWindowState.Normal; } this.editor.Activate(); } }
private void editor_Disposed(object sender, EventArgs e) { this.editor.Disposed -= new EventHandler(editor_Disposed); this.editor = null; }