private void DoUpdateAvailable(UpdateAvailabledEventArgs e) { DoCompleted(); if (OnUpdateAvailable != null) { OnUpdateAvailable(this, e); } }
private void OnUpdateAvailable(object sender, UpdateAvailabledEventArgs e) { Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Background, (MethodInvokerNoArg) delegate() { ProgramSettings.Instance.AppUpdateAvailable = true; ProgramSettings.Instance.AppUpdateVersion = e.Release.Number; ProgramSettings.Instance.Save(); miNewVersionAvailable.Visibility = System.Windows.Visibility.Visible; Updater updater = new Updater(); updater.Execute(e.Release); }); }