private void button2_Click(object sender, EventArgs e) { Console.WriteLine("DEBUG--in button getoggled"); Config con = new Config(); /*con.getPlayers();*/ List<Player> pList = new List<Player>(); Player tmP = new Player(textBox2.Text, Convert.ToChar(textBox1.Text), 0, 0, colorBtn.BackColor , button1.BackgroundImage); pList.Add(tmP); con.saveConfig(pList); }
private void GameUI_Load(object sender, EventArgs e) { if(debug) {MessageBox.Show("Er geht in die load", "DEBUG"); } foreach(Control b in tableLayoutPanel1.Controls) { if (debug) { MessageBox.Show("Er geht in die Schleife", "DEBUG"); } if (b is Button) { if (debug) { MessageBox.Show("Button gefunden", "DEBUG"); } b.Text = ""; if (activGame == false) { b.Enabled = false; } } } Config con = new Config(); con.loadConfig(); playerList = con.getPlayers(); }