Begin
If Vocabulary.Count > 0
Then
Begin
If GermanEnglish = True
Then
Begin
Input:= E_UserGuess.Text;
E_UserGuess.Text:= '
';
Answer:=AnsiCompareStr(Vocabulary.Names[RandomNumber], Input);
If Answer=0
Then
Begin
L_CorrectAnswer.Caption:='
';
Img_FeedBack.Picture.Bitmap.Assign(jpgCorrect);
//jpgCorrect.free;
Vocabulary.Delete(RandomNumber);
End
Else
Begin
L_CorrectAnswer.Caption:='
Deine Antwort: '+(Input)+'
'+'
Richtige Antwort: '+(Vocabulary.ValueFromIndex[RandomNumber]);
Img_FeedBack.Picture.Bitmap.Assign(jpgWrong);
//jpgWrong.free;
End;
RepetitionCheck:=RandomNumber;
While RepetitionCheck = RandomNumber
Do RandomNumber:=random(Vocabulary.Count);
try
L_UnknownWord.Caption:= Vocabulary.ValueFromIndex[RandomNumber];
L_RemainingWords.Caption:= '
Verbleibende Vokabeln: '+IntToStr(Vocabulary.Count);
L_RemainingWords.Font.
Name:='
Helvetica LT Std';
L_RemainingWords.Font.Size:= 16;
L_RemainingWords.Font.Color:=
RGB(170,220,70);
finally
end;
end
Else
Begin
Input:= E_UserGuess.Text;
E_UserGuess.Text:= '
';
Answer:=AnsiCompareStr(Vocabulary.ValueFromIndex[RandomNumber], Input);
If Answer=0
Then
Begin
L_CorrectAnswer.Caption:='
';
Img_FeedBack.Picture.Bitmap.Assign(jpgCorrect);
jpgCorrect.free;
Vocabulary.Delete(RandomNumber);
End
Else
Begin
L_CorrectAnswer.Caption:='
Deine Antwort: '+(Input)+'
'+'
Richtige Antwort: '+(Vocabulary.Names[RandomNumber]);
Img_FeedBack.Picture.Bitmap.Assign(jpgWrong);
jpgWrong.free;
End;
RepetitionCheck:=RandomNumber;
While RepetitionCheck = RandomNumber
Do RandomNumber:=random(Vocabulary.Count);
try
L_UnknownWord.Caption:= Vocabulary.Names[RandomNumber];
L_RemainingWords.Caption:= '
Verbleibende Vokabeln: '+IntToStr(Vocabulary.Count);
L_RemainingWords.Font.
Name:='
Helvetica LT Std';
L_RemainingWords.Font.Size:= 16;
L_RemainingWords.Font.Color:=
RGB(170,220,70);
finally
//Vocabulary.Free;
end;
End;
End
Else
Begin
Form3 := TForm3.Create(self);
try
Form3.ShowModal;
finally
Form3.Free;
Vocabulary.Free;
end;
End;
End;