internal override DialogResult RunDialog(IWin32Window owner) { // If the dialog is already visible, then bail out. if (form != null) { return(DialogResult.Cancel); } // Construct the color dialog form. form = new ColorDialogForm(this); // Run the dialog and get its result. DialogResult result; try { result = form.ShowDialog(owner); } finally { form.DisposeDialog(); form = null; } // Return the final dialog result to the caller. return(result); }
internal override DialogResult RunDialog(IWin32Window owner) { // If the dialog is already visible, then bail out. if(form != null) { return DialogResult.Cancel; } // Construct the color dialog form. form = new ColorDialogForm(this); // Run the dialog and get its result. DialogResult result; try { result = form.ShowDialog(owner); } finally { form.DisposeDialog(); form = null; } // Return the final dialog result to the caller. return result; }