protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                _shapeCtrl = new ClosedPathShapeController()
                {
                    UseDocumentCopy = UseDocument.Directly
                };
                _shapeCtrl.InitializeDocument(_doc);
            }
            if (null != _view)
            {
                if (null == _shapeCtrl.ViewObject)
                {
                    _shapeCtrl.ViewObject = _view.ShapeGraphicView;
                }

                _splinePointsCtrl = new CardinalSplinePointsController(_view.SplinePointsView, _doc.CurvePoints, _doc.Tension, _doc);
            }
        }
Пример #2
0
        protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                _shapeCtrl = new ClosedPathShapeController()
                {
                    UseDocumentCopy = UseDocument.Directly
                };
                _shapeCtrl.InitializeDocument(_doc);
            }
            if (null != _view)
            {
                if (null == _shapeCtrl.ViewObject)
                {
                    _shapeCtrl.ViewObject = _view.ShapeGraphicView;
                }

                _view.Vertices       = _doc.NumberOfVertices;
                _view.CornerRadiusPt = _doc.CornerRadius;
            }
        }
 public override IEnumerable <ControllerAndSetNullMethod> GetSubControllers()
 {
     yield return(new ControllerAndSetNullMethod(_shapeCtrl, () => _shapeCtrl = null));
     //yield return new ControllerAndSetNullMethod(_splinePointsCtrl, () => _splinePointsCtrl = null);
 }