コード例 #1
0
 private void ResetBtn_Click(object sender, EventArgs e)
 {
     aiGame = new AiGame(null, null);
     countTime.stopWatch();
     gameBox.Visible       = false;
     finishBox.Visible     = false;
     rangeLabel.Text       = "Wybrany Zakres: " + aiGame.GetStartingNumber().ToString() + " - " + aiGame.GetEndingNumber().ToString();
     PickNumberBtn.Enabled = true;
 }
コード例 #2
0
 private void PickNumberBtn_Click(object sender, EventArgs e)
 {
     if (Int32.Parse(pickedNumberInp.Text) < aiGame.GetStartingNumber() || Int32.Parse(pickedNumberInp.Text) > aiGame.GetEndingNumber())
     {
         MessageBox.Show("Prosze wybrać numer z zakresu");
     }
     else
     {
         gameBox.Visible       = true;
         PickNumberBtn.Enabled = false;
         countTime             = new CountTime();
         countTime.startWatch(OnTimerTick);
         aiGame.PickedNumber    = Int32.Parse(pickedNumberInp.Text);
         pickedNumberLabel.Text = aiGame.PickFirstNumber().Value.ToString();
     }
 }
コード例 #3
0
 public ComputerForm()
 {
     InitializeComponent();
     aiGame          = new AiGame(null, null);
     rangeLabel.Text = "Wybrany Zakres: " + aiGame.GetStartingNumber().ToString() + " - " + aiGame.GetEndingNumber().ToString();
 }