public void NewPlayerCreated(object sender, NewPlayerCreatedArgs e) { if (e.playerName != null) { int playerID = currentGame.GetLowestEmptyPlayerID(); currentGame.players.Add(new Player(playerID, e.playerName)); currentGame.players.Sort(); PopulatePlayersField(); needToSave = true; } }
public virtual void OnNewPlayerCreated(NewPlayerCreatedArgs e) { EventHandler <NewPlayerCreatedArgs> handler = NewPlayerCreated; handler?.Invoke(this, e); }
public NewPlayer() { args = new NewPlayerCreatedArgs(); InitializeComponent(); }