public void SetAmount(decimal totalAmount) { _totalAmount = totalAmount; StackPanel_Chips.Children.Clear(); List <List <Image> > chipsSorted = new List <List <Image> >(); string temp = ""; foreach (var image in ReplayerBet.GetChipImages(totalAmount)) { var imageStr = image.Source.ToString(); if (!imageStr.Equals(temp)) { chipsSorted.Add(new List <Image>()); } chipsSorted.Last().Add(image); temp = imageStr; } foreach (var chips in chipsSorted) { Grid grid = new Grid(); for (int i = 0; i < chips.Count; i++) { var image = chips[i]; image.VerticalAlignment = VerticalAlignment.Bottom; image.Margin = new Thickness(0, 0, 0, i * 4); grid.Children.Add(image); } StackPanel_Chips.Children.Add(grid); } TextBlock_Amount.Text = ReplayerBet.AmountToString(totalAmount); }
public void SetAmount(decimal totalAmount) { _totalAmount = totalAmount; ReplayerBet.SetAmount(_totalAmount, Grid_Chips, Label_Amount); }
private void SetPotTotal(decimal amount) { var amountStr = ReplayerBet.AmountToString(amount); TextBlock_PotTotal.Text = "Pot: " + (string.IsNullOrEmpty(amountStr) ? "0" : amountStr); }
public void SetPlayerStack(decimal amount) { var amountStr = ReplayerBet.AmountToString(amount); TextBlock_PlayerStack.Text = (string.IsNullOrEmpty(amountStr) ? "0" : amountStr); }