protected override async Task Execute() { if (_updater.HasUpdate()) { _updater.Update(); } }
/// <summary> /// Gets the user's selected fface Session and /// starts up the program. /// </summary> /// <param name="e"></param> protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); var updater = new LibraryUpdater(); updater.Update(); LogViewModel.Write("Resources loaded"); AbilityService = new AbilityService("resources"); LogViewModel.Write("Application starting"); Logger.Log(new LogEntry(LoggingEventType.Information, "EasyFarm Started ...")); }
protected override async Task Execute() { if (_updater.HasUpdate()) { var showDialogResult = await _dialogCoordinator.ShowMessageAsync( Application.Current.MainWindow.DataContext, "Update EliteAPI", "Would you like to update EliteAPI to its newest version?", MessageDialogStyle.AffirmativeAndNegative); if (showDialogResult == MessageDialogResult.Affirmative) { _updater.Update(); } } }
public async Task OnLoad() { MainWindowTitle = "EasyFarm"; StatusBarText = ""; if (_updater.HasUpdate()) { var showDialogResult = await _dialogCoordinator.ShowMessageAsync( Application.Current.MainWindow.DataContext, "Update EliteAPI", "Would you like to update EliteAPI to its newest version?", MessageDialogStyle.AffirmativeAndNegative); if (showDialogResult == MessageDialogResult.Affirmative) { _updater.Update(); } } }