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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
private void btn_Exporter_Click(object sender, EventArgs e)
{
try
{
FileStream fs = new FileStream(@"c:\LigueStats\data\TXT\Résultats.txt", FileMode.Create);
StreamWriter fichier = new StreamWriter(fs);
string E1 = txt_equipe1.Text;
string S1 = txt_score1.Text;
string S2 = txt_score2.Text;
string E2 = txt_equipe2.Text;
string R1 = E1 + " " + S1 + "-" + S2 + " " + E2 + "\r\n";
string E3 = txt_equipe3.Text;
string S3 = txt_score3.Text;
string S4 = txt_score4.Text;
string E4 = txt_equipe4.Text;
string R2 = E3 + " " + S3 + "-" + S4 + " " + E4 + "\r\n";
string E5 = txt_equipe5.Text;
string S5 = txt_score5.Text;
string S6 = txt_score6.Text;
string E6 = txt_equipe6.Text;
string R3 = E5 + " " + S5 + "-" + S6 + " " + E6 + "\r\n";
string E7 = txt_equipe7.Text;
string S7 = txt_score7.Text;
string S8 = txt_score8.Text;
string E8 = txt_equipe8.Text;
string R4 = E7 + " " + S7 + "-" + S8 + " " + E8 + "\r\n";
string E9 = txt_equipe9.Text;
string S9 = txt_score9.Text;
string S10 = txt_score10.Text;
string E10 = txt_equipe10.Text;
string R5 = E9 + " " + S9 + "-" + S10 + " " + E10 + "\r\n";
string E11 = txt_equipe11.Text;
string S11 = txt_score11.Text;
string S12 = txt_score12.Text;
string E12 = txt_equipe12.Text;
string R6 = E11 + " " + S11 + "-" + S12 + " " + E12 + "\r\n";
string E13 = txt_equipe13.Text;
string S13 = txt_score13.Text;
string S14 = txt_score14.Text;
string E14 = txt_equipe14.Text;
string R7 = E13 + " " + S13 + "-" + S14 + " " + E14;
string RTotal = R1 + R2 + R3 + R4 + R5 + R6 + R7;
fichier.Write(RTotal);
fichier.Close(); |
Partager