Beispiel #1
0
        private void TalonInitialisation(SavingInfo elem)
        {
            Card card;

            if (CardsExist(elem.TalonIndexes[0]))
            {
                for (int i = 0; i < elem.TalonIndexes.Count; i++)
                {
                    if (!elem.PictureBoxesIndexes.Contains(elem.DeckCardsIndexes[i]))
                    {
                        card = null;
                        card = new Card(elem.TalonIndexes[i]);
                        TalonPile.AddCard(card);
                    }
                    if (i == elem.TalonIndexes.Count - 1)
                    {
                        TalonBox.Image = imageList1.Images[elem.TalonIndexes[i]];
                    }
                }
            }
            else
            {
                TalonBox.Image = imageList2.Images[empCard];
            }
        }
Beispiel #2
0
 private void PictureBoxesInitialisation(SavingInfo elem)
 {
     for (int i = 0; i < boxes.Count; i++)
     {
         boxes[i].Image = imageList1.Images[elem.PictureBoxesIndexes[i]];
         boxes[i].Tag   = elem.PictureBoxesIndexes[i];
     }
     pictureBox5.Image = imageList1.Images["38.bmp"];
 }
Beispiel #3
0
        private void DeckInitialisation(SavingInfo elem)
        {
            Card card;

            if (CardsExist(elem.DeckCardsIndexes[0]))
            {
                for (int i = 0; i < elem.DeckCardsIndexes.Count; i++)
                {
                    card = null;
                    card = new Card(elem.DeckCardsIndexes[i]);
                    deck.AddCard(card);
                }
            }
        }
Beispiel #4
0
        private void SofaInitialisation(SavingInfo elem)
        {
            LEFT = 30;
            Card card;
            int  с = 0;

            for (int col = 0; col < elem.SofaIndexes.Count; col++)
            {
                Piles[0, col]   = new Pile();
                Piles[0, col].X = LEFT + H_SHIFT * col;
                Piles[0, col].Y = TOP;
                card            = new Card(elem.SofaIndexes[col]);
                Piles[0, col].AddCard(card);
                с++;
                if (с == 3)
                {
                    LEFT = 395;
                }
            }
        }