コード例 #1
0
 protected override async Task Execute()
 {
     if (_updater.HasUpdate())
     {
         _updater.Update();
     }
 }
コード例 #2
0
        /// <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 ..."));
        }
コード例 #3
0
ファイル: UpdateAPI.cs プロジェクト: rpetit3-fun/EasyFarm
        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();
                }
            }
        }
コード例 #4
0
        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();
                }
            }
        }