Exemplo n.º 1
0
        public override void Show()
        {
            for (int i = 0; i < Cards.Count; i++)
            {
                GraphicCard graphicCard = (GraphicCard)Cards[i];
                PictureBox  pb          = graphicCard.Pb;
                Panel.Controls.Add(pb);
                pb.BringToFront();
                pb.Location = new Point(i * 50, 0);
                pb.Size     = new Size(Panel.Width / Cards.Count, Panel.Height);
                pb.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pb.TabIndex = i;
                pb.TabStop  = false;

                graphicCard.Show();
            }
        }
Exemplo n.º 2
0
        public override void Show()
        {
            for (int i = 0; i < Cards.Count; i++)
            {
                int         dy          = 70;
                GraphicCard graphicCard = (GraphicCard)Cards[i];
                PictureBox  pb          = graphicCard.Pb;
                Panel.Controls.Add(pb);
                pb.BringToFront();
                pb.Location = new Point(1.0 * (Panel.Width - pb.Width) / Cards.Count < dy ? i * (Panel.Width - pb.Width) / Cards.Count : i * dy, 0);;
                pb.Size     = new Size(Panel.Height * pb.Image.Width / pb.Image.Height, Panel.Height);
                pb.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
                pb.TabIndex = i;
                pb.TabStop  = false;

                graphicCard.Show();
            }
        }
Exemplo n.º 3
0
 private void selectPlayer(Player activePlayer)
 {
     foreach (var player in game.Players)
     {
         if (player == activePlayer)
         {
             foreach (var card in player.Cards.Cards)
             {
                 GraphicCard graphicCard = (GraphicCard)card;
                 graphicCard.Opened = true;
             }
         }
         else
         {
             foreach (var card in player.Cards.Cards)
             {
                 GraphicCard graphicCard = (GraphicCard)card;
                 graphicCard.Opened = false;
             }
         }
     }
     game.Refresh();
 }