private void lbGames_SelectedIndexChanged(object sender, System.EventArgs e) { IAdminGames igames = iserver.Games; object oidx = lbGames.SelectedIndex; igame = igames.get_Item(ref oidx); tbEvents.Text += "selected game = " + igame.Name + "\r\n"; }
private void btKillGame_Click(object sender, System.EventArgs e) { if (igame != null) { igame.Kill(); igame = null; btRefreshGames_Click(sender, e); } }
private void btRefreshGames_Click(object sender, System.EventArgs e) { IAdminGames igames = iserver.Games; lbGames.Items.Clear(); for (int i = 0; i < igames.Count; i++) { object oi = i; IAdminGame igame = igames.get_Item(ref oi); lbGames.Items.Add(igame.Name); } }