public void OnClosing(object sender, FormClosingEventArgs e) { if (dbManager != null) { dbManager.Dispose(); } }
public void Close() { if (dbManager != null) { dbManager.Dispose(); } }
private void formDB_Closing(object sender, System.ComponentModel.CancelEventArgs e) { e.Cancel = !(OnBeforeClosing() && AddonOnBeforeClosing()); if (dbManager != null && !e.Cancel) { dbManager.Dispose(); } }