AmountToString() public static method

public static AmountToString ( decimal amount ) : string
amount decimal
return string
Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }