示例#1
0
        private static void readComputerLocations()
        {
            string[] locations = File.ReadAllLines(@"C:\AppFiles\computercoords.txt");

            for (int i = 0; i < locations.Length; i++)
            {
                ComputerLocation loc  = new ComputerLocation();
                string[]         temp = locations[i].Split(';');
                loc.Name      = temp[0];
                loc.SubTitle  = temp[1];
                loc.Latitude  = double.Parse(temp[2]);
                loc.Longitude = double.Parse(temp[3]);
                LocationAPI.AddComputerLocation(loc);
            }
        }