コード例 #1
0
            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;
            }
コード例 #2
0
 /// <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);
 }