Пример #1
0
 public void OnClosing(object sender, FormClosingEventArgs e)
 {
     if (dbManager != null)
     {
         dbManager.Dispose();
     }
 }
Пример #2
0
 public void Close()
 {
     if (dbManager != null)
     {
         dbManager.Dispose();
     }
 }
Пример #3
0
 private void formDB_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     e.Cancel = !(OnBeforeClosing() && AddonOnBeforeClosing());
     if (dbManager != null && !e.Cancel)
     {
         dbManager.Dispose();
     }
 }