Esempio n. 1
0
 private void CmDisplayStatus_Click(object sender, EventArgs e)
 {
     try
     {
         if (FrmConnectionSyncStatus.GetInstance(_contextGuid) == FindForm())
         {
             throw new Exception("FrmConnectionSyncStatus.GetInstance(ContextGuid) is parent of current!");
         }
         FrmConnectionSyncStatus.GetInstance(_contextGuid).ShowDialog(this);
     }
     catch (Exception ex) { WebErrorLog.ErrorInstence.StartErrorLog(ex); }
 }
 public static FrmConnectionSyncStatus GetInstance(string contextGuid)
 {
     try
     {
         if (_instances.TryGetValue(contextGuid, out var instance))
         {
             return(instance);
         }
         instance = new FrmConnectionSyncStatus();
         _instances.TryAdd(contextGuid, instance);
         return(instance);
     }
     catch (Exception ex)
     {
         WebErrorLog.ErrorInstence.StartErrorLog(ex);
         return(null);
     }
 }