Exemplo n.º 1
0
        private void buttonOptions_Click(object sender, EventArgs e)
        {
            OptionsForm        options = new OptionsForm();
            imProbabilityDrive drive   = new imProbabilityDrive();
            Random             rand    = new Random();
            TimeSpan           span    = DateTime.Now - settings.lastTry;

            if (drive.ShowDialog() == DialogResult.OK)
            {
                if (drive.numericUpDownPicker.Value == rand.Next(settings.probability + 1))
                {
                    options.ShowDialog();
                    settings = SettingsSystem.GetSettings(true);
                }
                else
                {
                    span = settings.incorrectWait;
                    MessageBox.Show("You have guessed incorrectly, you must wait " + span.Hours + ":" + span.Minutes + ":" + span.Seconds + " before trying again", "oops");
                }
            }
        }
Exemplo n.º 2
0
 private void buttonOptions_Click(object sender, EventArgs e)
 {
     OptionsForm options = new OptionsForm();
     imProbabilityDrive drive = new imProbabilityDrive();
     Random rand = new Random();
     TimeSpan span = DateTime.Now - settings.lastTry;
     if (drive.ShowDialog() == DialogResult.OK)
     {
         if (drive.numericUpDownPicker.Value == rand.Next(settings.probability + 1))
         {
             options.ShowDialog();
             settings = SettingsSystem.GetSettings(true);
         }
         else
         {
             span = settings.incorrectWait;
             MessageBox.Show("You have guessed incorrectly, you must wait " + span.Hours + ":" + span.Minutes + ":" + span.Seconds + " before trying again", "oops");
         }
     }
 }