public void Start(ACP.Updater updater) { this.updater = updater; this.updater.UpdateProgressChanged += Core_UpdateProgressChanged; this.updater.DownloadCompleted += Updater_DownloadCompleted; this.ShowDialog(); }
public static void CheckForUpdate() { ACP.Updater up = new ACP.Updater(); if (up.CheckForUpdate(UserSettings.LetztesUpdateAm, "ACP")) { if (MessageBox.Show(Constants.MessageBoxUpdateVerfuegbar, Constants.CaptionUpdateVerfuegbar, MessageBoxButton.YesNo) == MessageBoxResult.Yes) { ACP_GUI.Updater upd = new ACP_GUI.Updater(); upd.Start(up); } } }
private void Window_Loaded(object sender, RoutedEventArgs e) { this.addFranchise.ImageSource = ResourceConstants.AddIcon; this.delFranchise.ImageSource = ResourceConstants.DelIcon; this.addCosplan.ImageSource = ResourceConstants.AddIcon; this.Einstellungen.ImageSource = ResourceConstants.WheelIcon; this.version.Text = ApS.Version.StringAppVersion; if (UserSettings.Updates && UserSettings.LetztesUpdateAm.AddDays(UserSettings.UpdateAlleXTage) <= DateTime.Now.Date) { ACP_GUI.Updater.CheckForUpdate(); } ACP.Updater updater = new ACP.Updater(); updater.UpdateDatabase(); this.core = new Core(); if (!UserSettings.Settings.GetSetting("ErstelltAm_Fix").ToBoolean()) { using (Cosplans c = this.core.GetCosplans()) { c.Where = "ErstelltAm = '17.11.1858'"; c.ErstelltAm = DateTime.Today; c.Save(ApS.Databases.SqlAction.Update); UserSettings.Settings.SetSetting("ErstelltAm_Fix", true); } } this.ActualizeFanchises(); if (UserSettings.BeiProgrammstartLetztesFranchiseOeffnen && UserSettings.ZuletztGeoffnetesFranchise != 0) { this.SelectFranchise(UserSettings.ZuletztGeoffnetesFranchise); this.ActualizeData(); } this.SetSortingIcons(); }