public CustomEditorElementControl(CustomEditorForm editorForm, Flowsheet flowsheet, ProcessVar var) { InitializeComponent(); this.editorForm = editorForm; this.var = var; this.labelSolvable.InitializeSolvable(var.Owner as Solvable); this.labelVariable.InitializeVariable(var); this.textBoxValue.InitializeVariable(flowsheet.ApplicationPrefs, var); this.IsSelected = false; }
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 ShowCustomEditor() { if (customEditorForm == null) { this.customEditorForm = new CustomEditorForm(this, this.customEditor); if (flowsheetPrefs != null) { flowsheetPrefs.RestoreCustomEditorPrefs(this.customEditorForm); } customEditorForm.Owner = this.Parent as Form; customEditorForm.Show(); } else { this.customEditorForm.Visible = true; } }