Ejemplo n.º 1
0
        private void Form2_Load(object sender, EventArgs e)
        {
            foreach (Control c in this.Controls)//遍历所有label控件存入数组
            {
                if (c is Label)
                {
                    Label d = c as Label;
                    LabelName.Add(d);
                }
            }

            foreach (Control c in this.Controls)//遍历所有table控件存入数组
            {
                if (c is TableLayoutPanel)
                {
                    TableLayoutPanel d = c as TableLayoutPanel;
                    Table.Add(d);
                }
            }

            for (int i = 0; i < Table.Count; i++)
            {
                NameTable.Add(Player.AllName[i], Table[i]);
            }

            ShowMsg.ShowName(LabelName, Player.AllName);//显示所有玩家名字
            Resource1 s = new Resource1();

            foreach (PropertyInfo pr in s.GetType().GetProperties(BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Instance).Where(c => c.Name != "ResourceManager" && c.Name != "Culture"))
            {
                if (pr.GetValue(s, null) is Bitmap)
                {
                    Bitmap b = pr.GetValue(s, null) as Bitmap;
                    img.Add(b);
                }
            }
            labelChip.Text = "筹码:" + Player.Chip.ToString();
            Player.Init();
            ShowMsg.ShowBack(Table);
            Thread thGround = new Thread(MyGround);

            thGround.IsBackground = true;
            thGround.Start();
        }
Ejemplo n.º 2
0
 private void btnSeeCard_Click(object sender, EventArgs e)
 {
     btnSeeCard.Enabled = false;
     ShowMsg.ShowCards(Player.MyCards, NameTable[Player.MyName]);
 }