Пример #1
0
        public static async void UpdateAll()
        {
            UpdatingViewModel viewModel = UpdatingViewModel.GetInstance;

            LoaderSetup settingUp = new LoaderSetup(new ConfigurationManager());
            await settingUp.HandleLoaderUpdate();

            List <AddonInfoFromYaml> addons = (List <AddonInfoFromYaml>)Application.Current.Properties["Selected"];

            var configurationManager = new ConfigurationManager();

            foreach (AddonInfoFromYaml addon in addons.Where(add => add != null))
            {
                GenericUpdater updater = new GenericUpdater(addon, configurationManager);

                if (!(addon.additional_flags != null && addon.additional_flags.Contains("self-updating") &&
                      configurationManager.UserConfig.AddonsList.FirstOrDefault(a => a.Name == addon.addon_name)?.Installed == true))
                {
                    await updater.Update();
                }
            }

            viewModel.ProgBarLabel     = "Updates Complete";
            viewModel.DownloadProgress = 100;
            viewModel.CloseBtnEnabled  = true;
            viewModel.BackBtnEnabled   = true;
        }
Пример #2
0
        /// <summary>
        /// Sets the page's DataContext, initializes it, and begins the update process.
        /// </summary>
        public UpdatingView()
        {
            DataContext = UpdatingViewModel.GetInstance;
            InitializeComponent();

            LoaderSetup settingUp = new LoaderSetup();

            Task.Run(() => UpdateHelpers.UpdateAll());
        }
Пример #3
0
        /// <summary>
        /// Sets the page's DataContext, initializes it, and begins the update process.
        /// </summary>
        public UpdatingView()
        {
            theViewModel = new UpdatingViewModel();
            DataContext  = theViewModel;
            InitializeComponent();

            LoaderSetup settingUp = new LoaderSetup(theViewModel);

            Task.Run(() => UpdateHelpers.UpdateAll(theViewModel));
        }
        /// <summary>
        /// Sets the page's DataContext, initializes it, and begins the update process.
        /// </summary>
        public UpdatingView()
        {
            DataContext = UpdatingViewModel.GetInstance;
            InitializeComponent();

            LoaderSetup settingUp = new LoaderSetup();

            Task.Run(() => UpdateHelpers.UpdateAll());

            launchOnClose.IsChecked = Configuration.getConfigAsYAML().launch_game;
        }
Пример #5
0
        /// <summary>
        /// Sets the page's DataContext, initializes it, and begins the update process.
        /// </summary>
        public UpdatingView()
        {
            _configurationManager = new ConfigurationManager();
            DataContext           = UpdatingViewModel.GetInstance;
            InitializeComponent();

            LoaderSetup settingUp = new LoaderSetup(new ConfigurationManager());

            Task.Run(() => UpdateHelper.UpdateAll());

            launchOnClose.IsChecked = _configurationManager.UserConfig.LaunchGame;
        }
Пример #6
0
        public static async void UpdateAll(UpdatingViewModel viewModel)
        {
            LoaderSetup settingUp = new LoaderSetup(viewModel);
            await settingUp.handleLoaderInstall();

            List <AddonInfo> addons = (List <AddonInfo>)Application.Current.Properties["Selected"];

            foreach (AddonInfo addon in addons.Where(add => add != null))
            {
                GenericUpdater updater = new GenericUpdater(addon, viewModel);
                await updater.Update();
            }

            viewModel.label              = "Updates Complete";
            viewModel.showProgress       = 100;
            viewModel.closeButtonEnabled = true;
        }
Пример #7
0
        public static async void UpdateAll()
        {
            UpdatingViewModel viewModel = UpdatingViewModel.GetInstance;

            LoaderSetup settingUp = new LoaderSetup();
            await settingUp.HandleLoaderUpdate();

            List <AddonInfoFromYaml> addons = (List <AddonInfoFromYaml>)Application.Current.Properties["Selected"];

            foreach (AddonInfoFromYaml addon in addons.Where(add => add != null))
            {
                GenericUpdater updater = new GenericUpdater(addon);
                await updater.Update();
            }

            viewModel.ProgBarLabel     = "Updates Complete";
            viewModel.DownloadProgress = 100;
            viewModel.CloseBtnEnabled  = true;
        }
        public static async void UpdateAll()
        {
            UpdatingViewModel viewModel = UpdatingViewModel.GetInstance;

            LoaderSetup settingUp = new LoaderSetup();
            await settingUp.HandleLoaderUpdate();

            List <AddonInfoFromYaml> addons = (List <AddonInfoFromYaml>)Application.Current.Properties["Selected"];

            foreach (AddonInfoFromYaml addon in addons.Where(add => add != null))
            {
                GenericUpdater updater = new GenericUpdater(addon);

                if (!(addon.additional_flags != null && addon.additional_flags.Contains("self-updating") && Configuration.getConfigAsYAML().installed.ContainsKey(addon.folder_name)))
                {
                    await updater.Update();
                }
            }

            viewModel.ProgBarLabel     = "Updates Complete";
            viewModel.DownloadProgress = 100;
            viewModel.CloseBtnEnabled  = true;
            viewModel.BackBtnEnabled   = true;
        }