Пример #1
0
        private void BuildPoints()
        {
            PointVms.Clear();

            PointVms.Add(Parent.GetTrianglePoint(ModelObject.V1));
            PointVms.Add(Parent.GetTrianglePoint(ModelObject.V2));
            PointVms.Add(Parent.GetTrianglePoint(ModelObject.V3));
        }
Пример #2
0
        public DragablePointViewModel AddPoint(Point point)
        {
            DragablePoint          np       = new DragablePoint(1, point.X, point.Y);
            DragablePointViewModel newPoint = new DragablePointViewModel(MainVm, this, np);

            PointVms.Add(newPoint);
            PolygonObject.AddPoint(newPoint.ModelObject);

            OnPropertyChanged("");
            Parent.OnPropertyChanged("");

            return(newPoint);
        }
Пример #3
0
        public LfDragablePointViewModel AddPoint(Point point)
        {
            if (LocalModelObject == null)
            {
                return(null);
            }

            LfDragablePoint          np       = new LfDragablePoint(GetFreeVertexIndex(), point.X, point.Y);
            LfDragablePointViewModel newPoint = new LfDragablePointViewModel(this, ParentVm, MainVm, this, np);

            PointVms.Add(newPoint);
            LocalModelObject.AddPoint(newPoint.ModelObject);

            InvalidateAll();
            ParentVm.OnPropertyChanged("");

            return(newPoint);
        }