Пример #1
0
 public static void Init()
 {
     instance = new WOMHeartbeat();
     worker = new BackgroundWorker();
     worker.DoWork += new DoWorkEventHandler(worker_DoWork);
     worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted);
     worker.RunWorkerAsync();
 }
Пример #2
0
 public static void Init()
 {
     if (instance == null)
     {
         instance                   = new WOMHeartbeat();
         worker                     = new BackgroundWorker();
         worker.DoWork             += new DoWorkEventHandler(worker_DoWork);
         worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted);
         worker.RunWorkerAsync();
     }
 }