Beispiel #1
0
 protected override async Task Execute()
 {
     if (_updater.HasUpdate())
     {
         _updater.Update();
     }
 }
Beispiel #2
0
        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();
                }
            }
        }