/// <summary> /// 刷新手牌显示 /// </summary> /// <param name="player"></param> /// <param name="cardPanel"></param> /// <param name="isBack">是否显示背面</param> private void RefreshHandleCards(GamePlayer player, StackPanel cardPanel, bool isBack) { cardPanel.Children.Clear(); foreach (var card in player.HandleCard) { CardView view = null; if (!isBack) { view = CardView.CreateFromCard(card); } else { view = CardView.CreateBack(); } cardPanel.Children.Add(view); } }