private void btnPlayPhoto_Click(object sender, EventArgs e) { Card.oneCard oC = new Card.oneCard(); oC = c.Deal(); picDrawCard.Image = Image.FromFile(c.showCard(oC.getFacesuit())); txtValue.Text = oC.getValue().ToString(); }
public void funDeal() { oC = c.Deal(); string img = c.showCard(oC.getFacesuit()); if (gamecount % 2 == 0) { Dcount++; //Dealer iDscore += oC.getValue(); txtDscore.Text = iDscore.ToString(); switch (Dcount) { case 1: picD1.Image = Image.FromFile(img); break; case 2: picD2.Image = Image.FromFile(img); break; case 3: picD3.Image = Image.FromFile(img); break; default: MessageBox.Show("error"); break; } } else { Pcount++; //Player iPscore += oC.getValue(); txtPscore.Text = iPscore.ToString(); switch (Dcount) { case 1: picP1.Image = Image.FromFile(img); break; case 2: picP2.Image = Image.FromFile(img); break; case 3: picP3.Image = Image.FromFile(img); break; default: MessageBox.Show("error"); break; } } gamecount++; }