Пример #1
0
 private void OnActionButtonClicked(object sender, RoutedEventArgs e)
 {
     if (mUpdates.RestartPending)
     {
         //Restart
         App.RestartOnExit = true;
         Application.Current.Shutdown();
     }
     else
     {
         //Update
         mUpdates.DownloadSelectedScriptUpdates(mUpdates.ScriptUpdates);
         DisplayRestartPending();
     }
 }
Пример #2
0
        private void OnActionButtonClicked(object sender, RoutedEventArgs e)
        {
            if (mUpdates.RestartPending)
            {
                //Restart
                App.RestartOnExit = true;
                Application.Current.Shutdown();
            }
            else
            {
                //Update
                mUpdates.DownloadSelectedScriptUpdates(mUpdates.AvailableScripts);

                if (!mUpdates.AvailableScripts.Where(s => !s.Selected).Any())
                {
                    //All scripts were selected and downloaded, so there are therefore no more available new scripts
                    Properties.Settings.Default.NewScriptsAvailable = false;
                }

                DisplayRestartPending();
            }
        }