private void InitDelegates()
 {
     clearLogD   += ClearLog;
     writeLogD   += WriteLog;
     addFileD    += AddFile;
     removeFileD += RemoveFile;
 }
Ejemplo n.º 2
0
 private void InitControls()
 {
     txtMsg.Text          = string.Empty;
     progressBar1.Visible = false;
     _progressHandler     = new ProgressHandler(DoProgress);
     _writeLogHandler     = new WriteLogHandler(DoLog);
     _finishedHandler     = new FinishedHandler(Finished);
     FormClosing         += new FormClosingEventHandler(frmActionExecutor_FormClosing);
 }
 /// <summary>
 /// Инициализирует все делегаты
 /// </summary>
 private void InitDelegates()
 {
     WriteLogD               += WriteLog;
     ClearLogD               += ClearLog;
     InsertClientInListD     += InsertClientInList;
     RemoveClientFromListD   += RemoveClientFromList;
     InsertServerInListD     += InsertServerInList;
     RemoveServerFromListD   += RemoveServerFromList;
 }
Ejemplo n.º 4
0
 public bool WriteTxt(string str)
 {
     try
     {
         WXLOG l = new WXLOG();
         l.CON  = str;
         l.TIME = DateTime.Now;
         // sbo.AddLog(l);
         WriteLogHandler handler = new WriteLogHandler(sbo.AddLog);
         int             result  = handler.Invoke(l);
     }
     catch (Exception)
     {
         return(false);
     }
     return(true);
 }
Ejemplo n.º 5
0
 public static void WriteLog(string log)
 {
     WriteLogHandler?.Invoke(log);
 }
Ejemplo n.º 6
0
 public void WriteLog(string jobId, string message)
 {
     WriteLogHandler?.Invoke(jobId, message);
 }