コード例 #1
0
 public GeoShapePoints(ShapePoints points)
 {
     this.ShapePoints = points;
     //foreach (var point in points)
     //{
     //    this.Add(new GeoPoint(point));
     //}
 }
コード例 #2
0
 private ShapePoints GetShapePoints()
 {
     if (this.Count != _shapePoints.Count)
     {
         _shapePoints = new ShapePoints();
         foreach (var point in this)
         {
             _shapePoints.Add(point.ToPoint());
         }
     }
     return(_shapePoints);
 }
コード例 #3
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");
     }
 }
コード例 #4
0
 public GeoShapePoints()
 //: this(new ShapePoints())
 {
     _shapePoints = new ShapePoints();
     //this.CollectionChanged += OnCollectionChanged;
 }