Example #1
0
        private void DownloadWorker_DoWork_1(object sender, DoWorkEventArgs e) //When installwindow is activated
        {
            CurrentWorker.Text = "Base Skin";
            List <bool> InstallerArguments = e.Argument as List <bool>;

            DownloadOfficial(InstallActions.GetLatestMetro());

            if (InstallActions.err_ARCHIVE)
            {
                page1.Visible         = true;
                InstallerPage.Visible = false;
                return;
            }

            InstallActions.InstallSkin(SteamSkinPath);

            installProgress.Value += 5;
            if (InstallerArguments[0])
            {
                CurrentWorker.Text = "Unofficial Patch";
                InstallActions.InstallPatch(SteamSkinPath);
                installProgress.Value += 25;
                InstallExtras();
            }
            CurrentWorker.Text = "Cleaning Up";
            InstallActions.Cleanup();
            installProgress.Value = 100;
            CurrentWorker.Text    = "Finished";
            button1.Enabled       = true;
            button1.ForeColor     = Color.White;
            button1.Image         = Properties.Resources.close_button;
        }