Begin
Input:= E_UserGuess.Text;
E_UserGuess.Text:= '';
Answer:=AnsiCompareStr(VocabularyEnglish[RandomNumber], Input);
If Answer=0
Then
Begin
L_CorrectAnswer.Caption:='';
jpg:= TJpegImage.Create;
jpg.LoadFromFile('True.jpg');
Img_FeedBack.Picture.Bitmap.Assign(jpg);
jpg.free;
End
Else
Begin
L_CorrectAnswer.Caption:='Deine Antwort: '+(Input)+' '+'Richtige Antwort: '+(VocabularyEnglish[RandomNumber]);
jpg:= TJpegImage.Create;
jpg.LoadFromFile('False.jpg');
Img_FeedBack.Picture.Bitmap.Assign(jpg);
jpg.free;
End;
RepetitionCheck:=RandomNumber;
While RepetitionCheck = RandomNumber Do RandomNumber:=random(WordCount);
VocabularyEnglish:= TStringList.Create;
VocabularyGerman:= TStringList.Create;
try
VocabularyEnglish.LoadFromFile('Vocabulary.txt');
VocabularyGerman.LoadFromFile('Vocabulary2.txt');
VocabularyGerman.Delete(RandomNumber);
VocabularyEnglish.Delete(RandomNumber);
L_RemainingWords.Caption:= 'Verbleibende Vokabeln: '+IntToStr(VocabularyGerman.Count);
L_RemainingWords.Font.Name:='Helvetica LT Std';
L_RemainingWords.Font.Size:= 16;
L_RemainingWords.Font.Color:=
RGB(170,220,70);
finally
VocabularyGerman.Free;
end;