private void FormSettings_Load(object sender, EventArgs e)
 {
     LinkedTweaks.LoadValues();
     UpdateGamesTab();
     RefreshNMUI();
     if (IniFiles.Config.GetBool("NexusMods", "bAutoUpdateProfile", true))
     {
         UpdateNMProfile();
     }
 }
Esempio n. 2
0
 private void FormSettings_Load(object sender, EventArgs e)
 {
     LinkedTweaks.LoadValues();
     UpdateGamesTab();
     RefreshNMUI();
     if (IniFiles.Config.GetBool("NexusMods", "bAutoUpdateProfile", true))
     {
         UpdateNMProfile();
     }
     this.checkBoxHandleNXMLinks.Checked = NXMHandler.IsRegistered();
 }
 private void buttonCameraPositionReset_Click(object sender, EventArgs e)
 {
     this.applyCameraNodeAnimationsTweak.ResetValue();
     this.cameraOverShoulderPosXTweak.ResetValue();
     this.cameraOverShoulderPosZTweak.ResetValue();
     this.cameraOverShoulderCombatPosXTweak.ResetValue();
     this.cameraOverShoulderCombatPosZTweak.ResetValue();
     this.cameraOverShoulderCombatAddYTweak.ResetValue();
     this.cameraOverShoulderMeleeCombatPosXTweak.ResetValue();
     this.cameraOverShoulderMeleeCombatPosZTweak.ResetValue();
     this.cameraOverShoulderMeleeCombatAddYTweak.ResetValue();
     LinkedTweaks.LoadValues();
 }
        private void OnProfileChanged(object sender, ProfileEventArgs e)
        {
            this.game = e.ActiveGameInstance;
            this.timerCheckFiles.Enabled = false;
            while (true)
            {
                try
                {
                    IniFiles.Load(game);
                    break;
                }
                catch (IniParsingException exc)
                {
                    DialogResult result = FormIniError.OpenDialog(exc);
                    if (result == DialogResult.Retry)
                    {
                        continue;
                    }
                    else if (result == DialogResult.Ignore)
                    {
                        continue;
                    }
                    else if (result == DialogResult.Abort)
                    {
                        Environment.Exit(-1);
                        return;
                    }
                    //MsgBox.Get("iniParsingError").FormatText(exc.Message).Show(MessageBoxIcon.Error);
                    //Application.Exit();
                    //return;
                }
            }
            LinkedTweaks.LoadValues();
            // TODO: For some reason, it won't update the resolution combobox, unless I add this workaround:
            numCustomRes_ValueChanged(null, null);

            // Change image
            switch (e.ActiveGameInstance.Edition)
            {
            case GameEdition.Steam:
                this.pictureBoxGameEdition.Image          = Resources.steam;
                this.toolStripStatusLabelEditionText.Text = "Steam";
                this.labelGameEdition.Text = "Steam";
                break;

            case GameEdition.BethesdaNet:
                this.pictureBoxGameEdition.Image          = Resources.bethesda;
                this.toolStripStatusLabelEditionText.Text = "Bethesda.net";
                this.labelGameEdition.Text = "Bethesda";
                break;

            case GameEdition.BethesdaNetPTS:
                this.pictureBoxGameEdition.Image          = Resources.bethesda_pts;
                this.toolStripStatusLabelEditionText.Text = "Bethesda.net (PTS)";
                this.labelGameEdition.Text = "Bethesda\n(PTS)";
                break;

            case GameEdition.MSStore:
                this.pictureBoxGameEdition.Image          = Resources.msstore;
                this.toolStripStatusLabelEditionText.Text = "Microsoft Store";
                this.labelGameEdition.Text = "Microsoft\nStore";
                break;

            default:
                this.pictureBoxGameEdition.Image          = Resources.help_128;
                this.toolStripStatusLabelEditionText.Text = Localization.GetString("unknown");
                this.labelGameEdition.Text = Localization.GetString("unknown");
                break;
            }

            LoadAccountProfile();
            LoadCustomTab();

            this.toolStripStatusLabelGameText.Text = e.ActiveGameInstance?.Title;
            this.timerCheckFiles.Enabled           = true;
        }