private void AnswerTextBox_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { if (Transletors.SetAnswer(AnswerTextBox.Text)) { try { toolStripProgressBar1.PerformStep(); } catch { } AnswerTextBox.BackColor = Color.White; playsound(); nextWord(); } else { AnswerTextBox.BackColor = Color.Red; } } else if (e.KeyCode == Keys.F1) { TransactionTextBox.Text = Transletors.getTrainerWord().Transcription; PromptTextBox.Text = Transletors.getTrainerWord().Word; Transletors.F1(); playsound(); } }
private void textBoxAnswer_KeyDown(object sender, KeyEventArgs e) { if (Keys.F1 == e.KeyCode) { if (chek == false) { textBoxTranscription.Text = Transletors.getTrainerWord().Transcription; textBox1.Text = Transletors.getTrainerWord().Translete; } else { textBoxTranscription.Text = Transletors.getTrainerWord().Transcription; textBox1.Text = Transletors.getTrainerWord().Word; } Transletors.F1(); button7_Click(null, null); } else if (Keys.Enter == e.KeyCode) { button1_Click(null, null); } }