void variablePreviewForm_FormClosed(object sender, FormClosedEventArgs e) { variablePreviewForm = null; showVariablePreviewCheckbox.Checked = false; }
private void showVariablePreviewCheckbox_CheckedChanged(object sender, EventArgs e) { if (!this.isBackgroundRunform) { if (showVariablePreviewCheckbox.Checked) { variablePreviewForm = new Controls.VariablePreviewEditorForm(runningSequence.Variables); variablePreviewForm.FormClosed += new FormClosedEventHandler(variablePreviewForm_FormClosed); variablePreviewForm.Show(); } else { if (variablePreviewForm != null) variablePreviewForm.Close(); variablePreviewForm = null; } } }