Beispiel #1
0
 private ShapePoints GetShapePoints()
 {
     if (this.Count != _shapePoints.Count)
     {
         _shapePoints = new ShapePoints();
         foreach (var point in this)
         {
             _shapePoints.Add(point.ToPoint());
         }
     }
     return(_shapePoints);
 }
Beispiel #2
0
 private void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
 {
     //var gp = e.NewItems[0] as GeoPoint;
     //System.Diagnostics.Debug.WriteLine("GeoShape[" + this.Count + "] OnCollectionChanged" + e.Action + " " + e.NewItems.Count + " " + gp.ToPoint().ToString());
     if (!this.IsUpdating)
     {
         this.IsUpdating = true;
         System.Diagnostics.Debug.WriteLine("GeoShape[" + this.Count + "] Updating Points");
         var points = new ShapePoints();
         foreach (var point in this)
         {
             points.Add(point.ToPoint());
         }
         this.ShapePoints = points;
         this.IsUpdating  = false;
         System.Diagnostics.Debug.WriteLine("GeoShape[" + this.Count + "] Updating Points finished");
     }
 }