Example #1
0
 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;
     }
 }
Example #2
0
 internal void RestoreGlobalEditorPrefs(SystemEditor globalEditor)
 {
     if (hasGlobalEditorPrefs)
     {
         globalEditor.Location         = globalEditorFormLocation;
         globalEditor.Size             = globalEditorFormSize;
         globalEditor.SplitterPosition = globalEditorSplitterPosition;
     }
 }
Example #3
0
 private void CloseDependantsOfFlowsheet()
 {
     if (this.Editor != null)
     {
         this.Editor.Close();
         this.Editor = null;
     }
     if (this.toolbox != null)
     {
         this.toolbox.Close();
     }
 }
Example #4
0
        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;
            }
        }
Example #5
0
 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();
     }
 }
Example #6
0
 private void editor_Disposed(object sender, EventArgs e)
 {
     this.editor.Disposed -= new EventHandler(editor_Disposed);
     this.editor           = null;
 }