/// <summary> /// Releases the unmanaged resources used by the <see cref="T:System.Windows.Forms.Control" /> and its child controls and optionally releases the managed resources. /// </summary> /// <param name="disposing"><see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources.</param> protected override void Dispose(bool disposing) { if (IsDisposed) { return; } if (MSDialog != null) { MSDialog.FileOk -= new CancelEventHandler(DialogClosing); MSDialog.Disposed -= new EventHandler(DialogDisposed); MSDialog.HelpRequest -= new EventHandler(HelpRequest); MSDialog.Dispose(); MSDialog = null; } if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); }
/// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (IsDisposed) { return; } if (MSDialog != null) { MSDialog.FileOk -= new System.ComponentModel.CancelEventHandler(FileDialogControlBase_ClosingDialog); MSDialog.Disposed -= new EventHandler(FileDialogControlBase_DialogDisposed); //if (MSDialog.ShowHelp) MSDialog.HelpRequest -= new EventHandler(FileDialogControlBase_HelpRequest); MSDialog.Dispose(); MSDialog = null; } if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); }