示例#1
0
        private void Start3_Click(object sender, EventArgs e)
        {
            ReactionForm reactionForm = new ReactionForm(false, ReactionFirstTry, ReactionRecord);
            DialogResult result       = reactionForm.ShowDialog(this);

            ReactionFirstTry  = reactionForm.firstTry;
            ReactionRecord    = reactionForm.recod;
            Log3FirstTry.Text = ReactionFirstTry.logValue;
            Log3Record.Text   = ReactionRecord.logValue;
        }
示例#2
0
        private void Start4_Click(object sender, EventArgs e)
        {
            ReactionForm reactionForm = new ReactionForm(true, ReactionSoundFirstTry, ReactionSoundRecord);
            DialogResult result       = reactionForm.ShowDialog(this);

            ReactionSoundFirstTry = reactionForm.firstTry;
            ReactionSoundRecord   = reactionForm.recod;
            Log3FirstTry.Text     = ReactionSoundFirstTry.logValue;
            Log3Record.Text       = ReactionSoundRecord.logValue;
            reactionForm.Close();
        }
示例#3
0
 public ReactionForm(bool be, ReactionResult f, ReactionResult r)
 {
     InitializeComponent();
     arrow    = (Bitmap)Circle.Image;
     firstTry = f;
     recod    = r;
     if (be)
     {
         beeepEnable = be;
     }
 }
示例#4
0
 private void Start_Click(object sender, EventArgs e)
 {
     if (Timer.Enabled)
     {
         Timer.Enabled     = false;
         Start.Text        = "Старт";
         result[0]         = (int)Answer0.Value;
         result[1]         = (int)Answer1.Value;
         result[2]         = (int)Answer2.Value;
         lastTry           = new ReactionResult(radiants, result);
         Radiant0.Text     = radiants[0].ToString();
         Radiant1.Text     = radiants[1].ToString();
         Radiant2.Text     = radiants[2].ToString();
         Result0.Text      = lastTry.result[0].ToString();
         Result1.Text      = lastTry.result[1].ToString();
         Result2.Text      = lastTry.result[2].ToString();
         MiddleResult.Text = lastTry.middleValue.ToString();
         if (firstTry.middleValue == 0)
         {
             firstTry = lastTry;
         }
         if (recod.middleValue == 0 || recod.middleValue > lastTry.middleValue)
         {
             recod = lastTry;
         }
         Time.Text = lastTry.logValue;
     }
     else
     {
         Timer.Enabled = true;
         Start.Text    = "Стоп";
         radiants[0]   = rnd.Next(0, 100);
         radiants[1]   = rnd.Next(120, 220);
         radiants[2]   = rnd.Next(240, 340);
         if (beeepEnable)
         {
             beepValue = rnd.Next(0, 3);
         }
     }
 }