/// <summary> /// Releases all resources used by the <see cref="NotifierApplicationContext"/> class /// </summary> protected override void Dispose(bool disposing) { if (_disposeDone) { return; } if (disposing) { // Free managed resources MainForm.Dispose(); NotifierInstance.Dispose(); GC.SuppressFinalize(this); } // Add class finalizer if unmanaged resources are added to the class // Free unmanaged resources if there are any _disposeDone = true; }
protected override void OnMainFormClosed(object sender, EventArgs e) { NotifierInstance.ForceExit(); base.OnMainFormClosed(sender, e); }