Beispiel #1
0
 public static void checkForUpdate(updateTypes type, bool download, dynamic _completeFunctionObj, completeDelegate _completeFunctionDelegate)
 {
     updateType = type;
     updateCompleteFunctionObj      = _completeFunctionObj;
     updateCompleteFunctionDelegate = _completeFunctionDelegate;
     updateDownloadNew = download;
     if (bgwrkUpdate == null)
     {
         bgwrkUpdate                     = new BackgroundWorker();
         bgwrkUpdate.DoWork             += bgwrkUpdate_DoWork;
         bgwrkUpdate.RunWorkerCompleted += bgwrkUpdate_RunWorkerCompleted;
     }
     bgwrkUpdate.RunWorkerAsync();
 }
Beispiel #2
0
        public static void checkForUpdates(frmMain mainWin, dynamic _completeFunctionObj, completeDelegate _completeFunctionDelegate)
        {
            mainFrm                  = mainWin;
            completeFunctionObj      = _completeFunctionObj;
            completeFunctionDelegate = _completeFunctionDelegate;
            success                  = false;

            if (bgwrk == null)
            {
                bgwrk                     = new BackgroundWorker();
                bgwrk.DoWork             += bgwrk_DoWork;
                bgwrk.RunWorkerCompleted += bgwrk_RunWorkerCompleted;
            }
            mainFrm.enableForm(false);
            mainFrm.updateProgressLabel("checking for updates");
            bgwrk.RunWorkerAsync();
        }