public GameSettings(Config.CustomConfig customConfig, Config.LithTechConfig lithTechConfig)
        {
            InitializeComponent();

            this.customConfig   = customConfig;
            this.lithTechConfig = lithTechConfig;
        }
Beispiel #2
0
        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();
            }
        }
Beispiel #3
0
 private void B_DisplaySettings_Click(object sender, EventArgs e)
 {
     using (GameSettings _GraphicsSettings = new GameSettings(new Config.CustomConfig(customConfig), new Config.LithTechConfig(lithTechConfig)))
     {
         _GraphicsSettings.StartPosition = FormStartPosition.Manual;
         _GraphicsSettings.SetDesktopLocation(this.DesktopLocation.X + 20, this.DesktopLocation.Y + 20);
         if (_GraphicsSettings.ShowDialog() == DialogResult.OK)
         {
             lithTechConfig = _GraphicsSettings.lithTechConfig;
             customConfig   = _GraphicsSettings.customConfig;
         }
     }
 }