1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
private: System::Void textBox4_TextChanged(System::Object^ sender, System::EventArgs^ e) {
ThreeStrings ^ThreeStrs;
List <String ^> ^ listChaine = gcnew List<String ^>();
listChaine->Add(ThreeStrs->first);
listChaine->Add(ThreeStrs->second);
for each (String ^ s in listChaine)
{
if (textBox4->Text == s) /// si le texte frappé dans la textbox4 egal a "s"
{
textBox5->Text = ThreeStrs->first; // j'affiche le texte First dans texbox5
textBox6->Text = ThreeStrs->second; //j'affiche le texte second dans la textbox6
}
else // si non
{
textBox5->Text = L"pas de correspondance";
}
} |