diff --git a/JeuHoyEtudiants/JeuHoy_WPF_Natif/Model/GestionFichiersSorties.cs b/JeuHoyEtudiants/JeuHoy_WPF_Natif/Model/GestionFichiersSorties.cs index 0627f33..2e52337 100644 --- a/JeuHoyEtudiants/JeuHoy_WPF_Natif/Model/GestionFichiersSorties.cs +++ b/JeuHoyEtudiants/JeuHoy_WPF_Natif/Model/GestionFichiersSorties.cs @@ -10,7 +10,7 @@ namespace JeuHoy_WPF_Natif.Model { public List ChargerCoordonnees(string fichier) { List lstSql = new List(); string sLigne = ""; - string[] sTabElements = null; + string[] sTabAttributs = null; if (!File.Exists(fichier)) return lstSql; @@ -25,13 +25,13 @@ namespace JeuHoy_WPF_Natif.Model { int nbAttributs = Convert.ToInt32(sLigne); for (int i = 0; i < nbElements; i++) { - double[] doubles = new double[nbElements - 1]; + double[] doubles = new double[nbAttributs]; sLigne = lecteur.ReadLine(); - sTabElements = sLigne.Split('\t'); - for (int j = 0; j < sTabElements.Length - 1; j++) { - doubles[j] = Convert.ToDouble(sTabElements[j]); + sTabAttributs = sLigne.Split('\t'); + for (int j = 0; j < sTabAttributs.Length - 1; j++) { + doubles[j] = Convert.ToDouble(sTabAttributs[j]); } - string rep = Convert.ToInt32(sTabElements[sTabElements.Length - 1]).ToString(); + string rep = Convert.ToInt32(sTabAttributs[sTabAttributs.Length - 1]).ToString(); lstSql.Add(new Squelette(doubles, rep)); } } @@ -47,7 +47,7 @@ namespace JeuHoy_WPF_Natif.Model { } try { sw.WriteLine(lstData.Count); - sw.WriteLine(CstApplication.SKELETONCOUNT); + sw.WriteLine(CstApplication.SKELETONCOUNT * 2); foreach (Squelette s in lstData) { foreach (double point in s.Points) { sw.Write(point.ToString() + "\t");