Пример #1
0
//=================================================================================================================
// Method to modify the hand given a list of cards
        private void updateHand(List <Card> lst)
        {
            for (int i = 0; i < 7; i++)
            {
                if (i >= lst.Count)
                {
                    Image img = (Image)playBoard.Children[(56 + i)];
                    img.Source = new BitmapImage(new Uri(@"pack://*****:*****@"pack://application:,,,/Images/Age" + game.getAge() + ".png", UriKind.RelativeOrAbsolute));
                    continue;
                }
                else
                {
                    Image img = (Image)playBoard.Children[(56 + i)];
                    img.Source = new BitmapImage(new Uri(@"pack://application:,,,/Images/" + lst[i].getName() + ".jpg", UriKind.RelativeOrAbsolute));
                }
            }
        }