private void btn_Restart_Click(object sender, EventArgs e) { SinglePlayer sp = new SinglePlayer(); sp.Show(); this.Hide(); }
private void submitbtn_Click(object sender, RoutedEventArgs e) { if (firstbox.Text == "") { MessageBox.Show("Please Fill The Name Boxes"); } else { Player1Name = firstbox.Text.ToString(); if (playtype == "SinglePlayer") { SinglePlayer sp = new SinglePlayer(); sp.ShowDialog(); } else { if (secondbox.Text == "") { MessageBox.Show("Please Fill The Name Boxes"); } else { Player2Name = secondbox.Text.ToString(); MultiPlayer mp = new MultiPlayer(); mp.ShowDialog(); } } } }