Exemple #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            Program.MasterForm.Size = new System.Drawing.Size(577, 455);
            version_lbl.Text        = Config.version;
            int r = Config.LoadCfg();

            if (r == 3)     // Config error, user refused to regenerate config
            {
                Utility.ShowMsg("MCC Mod Manager cannot load because there are problems with the configuration file.", "Error");
                Environment.Exit(1);
            }
            Backups.LoadBackups();

            if (r == 2)     // User refused to stabilize the game
            {
                patchButton.Enabled        = false;
                delModpack.Enabled         = false;
                restoreSelectedBtn.Enabled = false;
                restoreAllBaksBtn.Enabled  = false;
                delSelectedBak.Enabled     = false;
                delAllBaksBtn.Enabled      = false;
                manualOverride.Enabled     = false;

                megaCaution.Visible = true;
                tt.SetToolTip(megaCaution, "MCC Mod Manager has detected an update and needs to stabilize the game. Please restart the app.");
            }
            else if (r == 1)        // User allowed the manager to stabilize the game
            {
                Modpacks.StabilizeGame();
                Backups.LoadBackups();
            }
            MyMods.LoadModpacks();
            LoadEventHandlers();
            PBar_init();
        }
Exemple #2
0
 private void txtRename_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)    // if enter key pressed
     {
         Path.Combine(Config.Modpack_dir, this.modpackName);
         File.Move(
             Path.Combine(Config.Modpack_dir, this.modpackName + ".zip"),
             Path.Combine(Config.Modpack_dir, txtRename.Text + ".zip")
             );
         MyMods.LoadModpacks();
         Close();
     }
 }
Exemple #3
0
 private void RefreshButton_Click(object sender, EventArgs e)
 {
     Config.LoadCfg();
     Backups.LoadBackups();
     MyMods.LoadModpacks();
 }