public Game(String playerName, Landing landing) { this.server = new ServiceReference1.ECCI_GamePortClient(); this.server.resetGame(); this.landing = landing; InitializeComponent(); if (!string.IsNullOrEmpty(playerName)) { player_name_label.Text = playerName; } tries_count.Text = server.getTries(); word_label.Text = server.getWord(); }
private void fillTable() { ServiceReference1.ECCI_GamePortClient server = new ServiceReference1.ECCI_GamePortClient(); string records = server.getRecords(); string[] items = records.Split('\n'); foreach (string item in items) { if (!item.Equals("")) { Console.WriteLine(item + "!"); string[] singleValue = item.Split('-'); this.playersList.Items.Add(singleValue[0]); this.timesList.Items.Add(singleValue[1]); } } }