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