private void Settings_Click(object sender, EventArgs e) { PlayerOptions options = new PlayerOptions() { PlayerName = Player.Name }; if (options.ShowDialog() == DialogResult.OK) { Player.Name = options.PlayerName; PlayerNameLabel.Text = Player.Name; } }
public void Startup() { var PlayerOption = new PlayerOptions(); if (PlayerOption.ShowDialog() == DialogResult.OK) { if (String.IsNullOrEmpty(PlayerOption.PlayerName)) { MessageBox.Show("Please enter a name in the textfield."); } else { Name = PlayerOption.PlayerName; LaunchUserApp = true; } } }