private void GameSettings_Load(object sender, EventArgs e) { //Setup bindings - screw events! this.TB_FOV.DataBindings.Add("Text", customConfig, "FOV", false, DataSourceUpdateMode.OnPropertyChanged); this.C_EnableAspectRatioMemoryWrite.DataBindings.Add("Checked", customConfig, "AspectRatioFix", false, DataSourceUpdateMode.OnPropertyChanged); this.C_Windowed.DataBindings.Add("Checked", customConfig, "Windowed", false, DataSourceUpdateMode.OnPropertyChanged); this.C_DisableSound.DataBindings.Add("Checked", customConfig, "DisableSound", false, DataSourceUpdateMode.OnPropertyChanged); this.C_DisableMusic.DataBindings.Add("Checked", customConfig, "DisableMusic", false, DataSourceUpdateMode.OnPropertyChanged); this.C_DisableLogos.DataBindings.Add("Checked", customConfig, "DisableLogos", false, DataSourceUpdateMode.OnPropertyChanged); this.C_DisableTripleBuffering.DataBindings.Add("Checked", customConfig, "DisableTrippleBuffering", false, DataSourceUpdateMode.OnPropertyChanged); this.C_DisableJoystick.DataBindings.Add("Checked", customConfig, "DisableJoystick", false, DataSourceUpdateMode.OnPropertyChanged); this.C_DisableHardwareCursor.DataBindings.Add("Checked", customConfig, "DisableHardwareCursor", false, DataSourceUpdateMode.OnPropertyChanged); this.C_LithFix_ENABLED.DataBindings.Add("Checked", customConfig, "LithFixEnabled", false, DataSourceUpdateMode.OnPropertyChanged); //LithTech stuff this.T_ResolutionX.DataBindings.Add("Text", lithTechConfig, "GameScreenWidth", false, DataSourceUpdateMode.OnPropertyChanged); this.T_ResolutionY.DataBindings.Add("Text", lithTechConfig, "GameScreenHeight", false, DataSourceUpdateMode.OnPropertyChanged); this.num_LithFix_FPSCAP.DataBindings.Add("Value", lithTechConfig, "lf_max_fps", false, DataSourceUpdateMode.OnPropertyChanged); //Other stuff that has to be done manually unless there is some magical way to bind those this.RB_ManualEdit.Lines = lithTechConfig.OtherLines.ToArray(); this.C_32color.Checked = lithTechConfig.GameBitDepth > 16; this.C_LithFix_Borderless.Checked = lithTechConfig.lf_borderless_window > 0; notificationToBig = false; notificationWindowed = false; this.C_LithFix_ENABLED.Enabled = customConfig.CheckLithFix(); ToggleHackSpecificEnable(); ToggleLithFixSpecificEnable(); }
private void Mainform_Load(object sender, EventArgs e) { CheckForRequiredGameFiles(); if (!File.Exists("autoexec.cfg")) { ConfigChoice _ConfigChoice = new ConfigChoice(); _ConfigChoice.ShowDialog(); } customConfig = Config.CustomConfig.Load(); lithTechConfig = Config.LithTechConfig.Load(); if (customConfig.LithFixEnabled) { customConfig.LithFixEnabled = customConfig.CheckLithFix(); } if (!File.Exists("avp2cmds.txt")) { MessageBox.Show("No avp2cmds.txt found. The launcher will try to create it based on files in your current directory.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); CreateGenericAVP2Cmds(); } SetPositionFromConfig(); if (skipLauncher) { this.WindowState = FormWindowState.Minimized; StartGame(); } }