コード例 #1
0
        public static void ReadLandPointFromFile(string path)
        {
            List <LandPoint> landPoints = new List <LandPoint>();
            StreamReader     reader     = new StreamReader(path);

            while (true)
            {
                string adress, coordinates;
                //id = reader.ReadLine();
                adress = reader.ReadLine();
                if (adress == null)
                {
                    reader.Close();
                    return;
                }

                coordinates = reader.ReadLine();
                string[]  args = coordinates.Split(' ');
                LandPoint temp = new LandPoint(count, count.ToString(), adress, Convert.ToDouble(args[0]), Convert.ToDouble(args[1]));
                Deliverer.Adresses.Add(temp);
                count++;
            }
        }