private void btnReplay_Click(object sender, EventArgs e) { pCard = cCard = -1; myval = hisval = 0; mypoints = hispoints = 0; for (int i = 0; i < 52; ++i) { FillDeck[i] = false; } lblResult.Text = null; tbMyScore.Text = null; tbHisScore.Text = null; pbDeck.Image = WarGUI.Properties.Resources.back; pbpCard1.Image = pbpCard2.Image = pbpCard3.Image = pbpCard4.Image = pbpCard5.Image = null; pbcCard1.Image = pbcCard2.Image = pbcCard3.Image = pbcCard4.Image = pbcCard5.Image = null; Betting bettingForm = new Betting(); bettingForm.StartPosition = FormStartPosition.CenterParent; bettingForm.ShowDialog(); lblBalance.Text = Betting.Balance.ToString("$0.00"); btnDrawCard.Visible = true; btnReplay.Visible = false; button1.Visible = true; btnDrawCard.Visible = true; hit.Visible = true; hit2.Visible = false; btnDrawCard.Visible = true; btnReplay.Visible = true; btnDrawCard.Visible = true; hit.Visible = false; hit2.Visible = false; }
public Form1() { InitializeComponent(); Betting bettingForm = new Betting(); bettingForm.StartPosition = FormStartPosition.CenterParent; bettingForm.ShowDialog(); //lblBet.Text = "Bet: " + Betting.Bet.ToString("$0.00"); lblBalance.Text = Betting.Balance.ToString("$0.00"); // Start.Visible = false; btnDrawCard.Visible = true; btnReplay.Visible = false; button1.Visible = false; hit.Visible = false; hit2.Visible = false; hit3.Visible = false; dobledown.Visible = false; stay.Visible = false; lblBalance.Visible = true; group.Visible = true; pCard = cCard = -1; myval = hisval = 0; pbpCard1.SizeMode = PictureBoxSizeMode.StretchImage; pbcCard1.SizeMode = PictureBoxSizeMode.StretchImage; pbpCard2.SizeMode = PictureBoxSizeMode.StretchImage; pbcCard2.SizeMode = PictureBoxSizeMode.StretchImage; pbpCard3.SizeMode = PictureBoxSizeMode.StretchImage; pbcCard3.SizeMode = PictureBoxSizeMode.StretchImage; pbpCard4.SizeMode = PictureBoxSizeMode.StretchImage; pbcCard4.SizeMode = PictureBoxSizeMode.StretchImage; pbpCard5.SizeMode = PictureBoxSizeMode.StretchImage; pbcCard5.SizeMode = PictureBoxSizeMode.StretchImage; SelectCard = new PictureBox[52]; ResourceManager rm = WarGUI.Properties.Resources.ResourceManager; for (int i = 0; i < 52; ++i) { SelectCard[i] = new PictureBox(); SelectCard[i].Image = (Image)rm.GetObject("_" + (i + 1).ToString()); } for (int a = 0; a < 52; a++) { if (deckValue[a] == 11) { } } }