public ResliceToolGraphic(ResliceTool owner) { LineGraphic lineGraphic = new LineGraphic(); MprMoveControlGraphic moveControlGraphic = new MprMoveControlGraphic(lineGraphic); moveControlGraphic.UndoableOperationStart += OnControlGraphicUndoableOperationStart; moveControlGraphic.UndoableOperationStop += OnControlGraphicUndoableOperationStop; moveControlGraphic.UndoableOperationCancel += OnControlGraphicUndoableOperationCancel; MprLineStretchControlGraphic lineControlGraphic = new MprLineStretchControlGraphic(moveControlGraphic); lineControlGraphic.UndoableOperationStart += OnControlGraphicUndoableOperationStart; lineControlGraphic.UndoableOperationStop += OnControlGraphicUndoableOperationStop; lineControlGraphic.UndoableOperationCancel += OnControlGraphicUndoableOperationCancel; SliceControlGraphic sliceControlGraphic = new SliceControlGraphic(lineControlGraphic, this); StandardStatefulGraphic statefulGraphic = new StandardStatefulGraphic(sliceControlGraphic); statefulGraphic.State = statefulGraphic.CreateInactiveState(); base.Graphics.Add(statefulGraphic); _stateControlGraphic = statefulGraphic; _sliceControlGraphic = sliceControlGraphic; _lineGraphic = lineGraphic; _owner = owner; }
/// <summary> /// Cloning constructor. /// </summary> /// <param name="source">The source object from which to clone.</param> /// <param name="context">The cloning context object.</param> private MprMoveControlGraphic(MprMoveControlGraphic source, ICloningContext context) : base(source, context) { context.CloneFields(source, this); }