private ClockForm BuildMainForm() { var systemPlayer = PlayerUtilities.LoadSystemPlayer(); return(new ClockForm() { GameRepository = gamesRepo, SystemPlayer = systemPlayer }); }
private void LoadPlayers() { var players = GameRepository.AllPlayers().ToList(); var systemPlayer = PlayerUtilities.LoadSystemPlayer(); if (!players.Contains(systemPlayer)) { players.Add(systemPlayer); } var playerListBox = playerCheckedListBox as ListBox; var obsPlayers = new BindingList <Player>(players); playerListBox.DataSource = obsPlayers; playerListBox.DisplayMember = "Name"; playerListBox.ValueMember = "Id"; }