Beispiel #1
0
 private void Frm_RegistrationManager_FormClosing(object sender, FormClosingEventArgs e)
 {
     MonitorAllConfig.Instance().LedRegistationInfoEvent -= LedRegistationInfoCompletedEvent;
     MonitorAllConfig.Instance().CareServiceConnectionStatusChangedEvent -= Frm_MonitorConfigManager_CareServiceStatusChanged;
     _topmostTimer.Change(System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite);
     _topmostTimer.Dispose();
     if (_instance != null && !_instance.IsDisposed)
     {
         _instance.Dispose();
         _instance = null;
     }
 }
 public static Frm_RegistrationManager Instance(bool isOpen)
 {
     if (_instance == null || _instance.IsDisposed)
     {
         _instance = new Frm_RegistrationManager();
         _instance.Show();
     }
     if (isOpen)
     {
         _instance.BringToFront();
         if (_instance.WindowState == FormWindowState.Minimized)
         {
             _instance.WindowState = FormWindowState.Normal;
         }
     }
     return _instance;
 }
Beispiel #3
0
 public static Frm_RegistrationManager Instance(bool isOpen)
 {
     if (_instance == null || _instance.IsDisposed)
     {
         _instance = new Frm_RegistrationManager();
         _instance.Show();
     }
     if (isOpen)
     {
         _instance.BringToFront();
         if (_instance.WindowState == FormWindowState.Minimized)
         {
             _instance.WindowState = FormWindowState.Normal;
         }
     }
     return(_instance);
 }
 private void Frm_RegistrationManager_FormClosing(object sender, FormClosingEventArgs e)
 {
     MonitorAllConfig.Instance().LedRegistationInfoEvent -= LedRegistationInfoCompletedEvent;
     MonitorAllConfig.Instance().CareServiceConnectionStatusChangedEvent -= Frm_MonitorConfigManager_CareServiceStatusChanged;
     _topmostTimer.Change(System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite);
     _topmostTimer.Dispose();
     if (_instance != null && !_instance.IsDisposed)
     {
         _instance.Dispose();
         _instance = null;
     }
 }