void ReadConfigValues()
        {
            LauncherFuncs.ReadConfigValues("config.txt");

            if (GlobalVars.CloseOnLaunch == true)
            {
                checkBox1.Checked = true;
            }
            else if (GlobalVars.CloseOnLaunch == false)
            {
                checkBox1.Checked = false;
            }

            if (GlobalVars.UserID == 0)
            {
                GeneratePlayerID();
                WriteConfigValues();
            }
            else
            {
                textBox5.Text = GlobalVars.UserID.ToString();
            }

            textBox2.Text         = GlobalVars.PlayerName;
            label26.Text          = GlobalVars.SelectedClient;
            label28.Text          = GlobalVars.Map;
            listBox1.SelectedItem = GlobalVars.Map;
            textBox4.Text         = GlobalVars.RobloxPort.ToString();
            label37.Text          = GlobalVars.IP;
            label38.Text          = GlobalVars.RobloxPort.ToString();
            ConsolePrint("Config loaded.", 3);
            ReadClientValues(GlobalVars.SelectedClient);
        }
        void ReadClientValues(string ClientName)
        {
            string clientpath = GlobalVars.ClientDir + @"\\" + ClientName + @"\\clientinfo.txt";

            if (!File.Exists(clientpath))
            {
                ConsolePrint("ERROR 1 - No clientinfo.txt detected with the client you chose. The client either cannot be loaded, or it is not available.", 2);
                MessageBox.Show("No clientinfo.txt detected with the client you chose. The client either cannot be loaded, or it is not available.", "RBXPri2 Launcher - Error while loading client", MessageBoxButtons.OK, MessageBoxIcon.Error);
                GlobalVars.SelectedClient = "2008";
            }

            LauncherFuncs.ReadClientValues(clientpath);

            if (GlobalVars.UsesPlayerName == true)
            {
                textBox2.Enabled = true;
            }
            else if (GlobalVars.UsesPlayerName == false)
            {
                textBox2.Enabled = false;
            }

            if (GlobalVars.UsesID == true)
            {
                textBox5.Enabled = true;
                button4.Enabled  = true;
            }
            else if (GlobalVars.UsesID == false)
            {
                textBox5.Enabled = false;
                button4.Enabled  = false;
            }

            if (GlobalVars.LoadsAssetsOnline == false)
            {
                label30.Visible = false;
            }
            else if (GlobalVars.LoadsAssetsOnline == true)
            {
                label30.Visible = true;
            }

            textBox6.Text = GlobalVars.SelectedClientDesc;
            label26.Text  = GlobalVars.SelectedClient;
            ConsolePrint("Client '" + GlobalVars.SelectedClient + "' successfully loaded.", 3);
        }
 void ResetConfigValues()
 {
     LauncherFuncs.ResetConfigValues();
     WriteConfigValues();
     ReadConfigValues();
 }
 void GeneratePlayerID()
 {
     LauncherFuncs.GeneratePlayerID();
     textBox5.Text = Convert.ToString(GlobalVars.UserID);
 }
 void WriteConfigValues()
 {
     LauncherFuncs.WriteConfigValues("config.txt");
     ConsolePrint("Config Saved.", 3);
 }