private void OnUpdaterDownloadCompleted(object sender, UpdaterActionEventArgs e) { // using the synchronous "Invoke". This marshals from the eventing thread--which comes from the Updater and should not // be allowed to enter and "touch" the UI's window thread // so we use Invoke which allows us to block the Updater thread at will while only allowing window thread to update UI this.Invoke( new MarshalEventDelegate(this.OnUpdaterDownloadCompletedHandler), new object[] { sender, e }); }
private void OnUpdaterDownloadCompletedHandler(object sender, UpdaterActionEventArgs e) { Log.Info("Main: Update - Download completed"); StartNewVersion(); }
private void OnUpdaterDownloadStarted(object sender, UpdaterActionEventArgs e) { this.Invoke( new MarshalEventDelegate(this.OnUpdaterDownloadStartedHandler), new object[] { sender, e }); }
private void OnUpdaterUpdateAvailable(object sender, UpdaterActionEventArgs e) { Log.Info("Main: Update - New version available: {0}", e.ApplicationName); m_strNewVersion = e.ServerInformation.AvailableVersion; m_bNewVersionAvailable = true; while (m_bNewVersionAvailable) System.Threading.Thread.Sleep(100); if (m_bCancelVersion) { _updater.StopUpdater(e.ApplicationName); } }
private void OnUpdaterDownloadStartedHandler(object sender, UpdaterActionEventArgs e) { Log.Info("Main: Update - Download started for: {0}",e.ApplicationName); }