Ejemplo n.º 1
0
        private void UserForm_Load(object sender, EventArgs e)
        {
            using (StreamReader r = new StreamReader("MapPositions.json"))
            {
                string json = r.ReadToEnd();
                ListeMaps = JsonConvert.DeserializeObject <List <MapPosition> >(json);//Contient toutes les maps en fonction de l'id
            }

            using (StreamReader r = new StreamReader("PointOfInterest.json"))
            {
                string json = r.ReadToEnd();
                ListePointOfInterest = PointOfInterest.FromJson(json);//Contient tous les POI
            }

            using (StreamReader r = new StreamReader("indicesTxt.json"))
            {
                string json = r.ReadToEnd();
                ListeIndices = JsonConvert.DeserializeObject <List <IndicesTxt> >(json);//Contient tous les noms d'indices
            }

            using (StreamReader r = new StreamReader("DofusMapCorrespondances.json"))
            {
                string json = r.ReadToEnd();
                ListeCorrespondance = JsonConvert.DeserializeObject <List <IndicesCorrespondance> >(json);//Contient tous les noms d'indices
            }
        }