1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
String^ result = comboBox1->Text;
String^ result2 = comboBox2->Text;
String^ result4 = "";
array<String ^> ^tab1 = gcnew array<String ^> { "message1"};
array<String ^> ^tab2 = gcnew array<String ^> { "message2"};
array<String ^> ^tab3 = gcnew array<String ^> {"TexteZ", "TexteY", "TexteU"};
result4 = String::Format("{0},{1},{2}",tab3[0],tab3[1],tab1[1],Environment::NewLine);
{
if (tab1[0] == result && tab2[0] == result2)
{
textBox1->Text += result4;
textBox1->SelectionStart = textBox1->TextLength;
textBox1->ScrollToCaret();
}
else if (tab1[0] == result && tab2[1] == result2)
{
textBox1->Text = tab3[0],tab3[2];
}
else
{
textBox1->Text = L"Pas message";
}
}
}
};
} |