Example #1
0
        public static City FromString(string s)
        {
            City city = null;
              if (!string.IsNullOrEmpty(s))
              {
            string[] ss = s.Split('\t');
            if (ss.Length == 4)
            {
              city = new City()
              {
            Name = ss[0],
            GeoPoint = PointFromString(ss[1]),
            Population = int.Parse(ss[2]),
            Country = ss[3]
              };
            }
              }

              return city;
        }
Example #2
0
 private void C1VectorPlacemark_Loaded(object sender, RoutedEventArgs e)
 {
     C1VectorPlacemark pl = (C1VectorPlacemark)sender;
     City city = (City)pl.DataContext;
     ToolTipService.SetToolTip(pl, city.Name + ":\n" + city.Population.ToString());
 }