private void DoUpdateCheck() { if (updater != null && updater.Running) { return; } updater = new Updater(); updater.Completed += (sender, e) => { MainWindow.Invoke( (sender2, e2) => { updateVersion = updater.NewVersion; if (updateVersion != null && updater.NewVersion.CompareTo(AppUtils.GetVersion()) > 0) { DownloadNewVersion(); } }); }; Console.WriteLine("Checking for updates..."); StartTask(updater); }
private void DoUpdateCheck() { updater = new Updater(); updater.Completed += (sender, e) => { updateVersion = updater.NewVersion; if (updateVersion != null && updater.NewVersion.CompareTo(AppUtils.GetVersion()) > 0) { DownloadNewVersion(); } }; StartTask(updater); }