private void receiveGameList() { lobbyTunnel.Send("requestroomlist"); rooms.Clear(); listView1.Items.Clear(); while (true) { string tmp; lobbyTunnel.Receive(out tmp); if (tmp == "endaddgame") { listView1.Columns[0].Width = listView1.Width * 5 / 100; listView1.Columns[1].Width = listView1.Width * 59 / 100; listView1.Columns[2].Width = listView1.Width * 15 / 100; listView1.Columns[3].Width = listView1.Width * 20 / 100; return; } else { GameListEntry gle = new GameListEntry(); string[] game = tmp.Split(','); if (game.Length == 4) { gle.gameID = game[0]; gle.gameName = game[1]; gle.playerCount = game[2]; gle.totalChips = game[3]; rooms.Add(gle); ListViewItem lvi = new ListViewItem(game); listView1.Items.Add(lvi); } } } }
public GameManagementViewModel(IGameManagementModel model) { _model = model; _entry = _model.GetEntry(); SaveGameCommand = new RelayCommand(param => SaveGame()); CancelCommand = new RelayCommand(param => Cancel()); }
private void PlayerList() { GUILayout.Label("Players in game " + selectedGame, headingStyle); GameListEntry gle = server.gameList[selectedGame]; foreach (string player in gle.players) { GUILayout.Label(player); } }
public static void AddGameListEntry(GameListEntry entry) { SectionData GameData = new SectionData(entry.TitleID); if (entry.AppName != null) { KeyData AppName = new KeyData("AppName") { Value = entry.AppName }; GameData.Keys.SetKeyData(AppName); } if (entry.Publisher != null) { KeyData Publisher = new KeyData("Publisher") { Value = entry.Publisher }; GameData.Keys.SetKeyData(Publisher); } if (entry.TitleID != null) { KeyData TitleID = new KeyData("TitleID") { Value = entry.TitleID }; GameData.Keys.SetKeyData(TitleID); } if (entry.GamePath != null) { KeyData GamePath = new KeyData("GamePath") { Value = entry.GamePath }; GameData.Keys.SetKeyData(GamePath); } GameListData.Sections.Add(GameData); Parser.WriteFile("./Gamelist.ini", GameListData); Games = GetAllEntrysFromINI(); }
public GameListEntryViewModel(GameListEntry entry) { Model = entry; }