Beispiel #1
0
        private void TargetText_TextChanged(object sender, EventArgs e)
        {
            if (!typingStarted)
            {
                TypingTimer.Start();
                typingStarted = true;
            }

            if (TextsAreIdentical())
            {
                AllowTyping();
                TypingProgress.Value = TargetText.Text.Length;
                if (TargetText.Text.Length == SourceText.Text.Length)
                {
                    TypingOver();
                }
            }
            else
            {
                BlockTyping();
            }
            UpdateCurrentCPM();
        }
Beispiel #2
0
 private void TypingOver()
 {
     TypingTimer.Stop();
     TargetText.Enabled = false;
     MessageBox.Show("Time is up! Your result is " + CalculateCPM());
 }