Exemple #1
0
        private void MetroWindow_Loaded(object sender, RoutedEventArgs e)
        {
            ViewModel = new MainViewModel();
            AddonManager = new AddonManager(ViewModel);

            DataContext = ViewModel;
            Statics.AddonManager = AddonManager;

            Statics.GetFirefallPatchData();

            if (Statics.ShouldUpdate)
                SelfUpdater.Update();

            SelfUpdater.ThreadUpdateAndCheck();
        }
Exemple #2
0
        public AddonManager(MainViewModel _MainView)
        {
            Self = this;

            MainView = _MainView;
            Providers.Add(AddonProviderType.FirefallForums, new FirefallForums());
            Providers.Add(AddonProviderType.DirectDownload, new DirectDownload());
            Providers.Add(AddonProviderType.Git, new GitRepository());

            GetLocalAddons();
            CheckAddonsForUpdates();
            GetInstalledAddons();
            SetupFolderWatchers();

            if (Statics.OneClickAddonToInstall != null)
            {
                Providers[Statics.OneClickInstallProvider].DownloadAddon(Statics.OneClickAddonToInstall);
                App.Current.Shutdown();
            }
        }