void client1_GetStateCompleted(object sender, ServiceReference1.GetStateCompletedEventArgs e) { try { // lst2.Items.Clear(); Dices.Clear(); Dat.Clear(); foreach (var item in e.Result.lastDieRoll) { Dat.Add(new Dicies() { Dieces = item }); } Dices.Add(new Dice() { TileName = e.Result.ActiveTileName }); } catch (Exception ex) { // MessageBox.Show(ex.ToString()); } }
/// <summary> /// Removes all elements from the <see cref="DicesCup"/>. /// </summary> public void Clear() { Dices.Clear(); }