示例#1
0
        private void OnGraphicBuilderCancelled(object sender, GraphicEventArgs e)
        {
            _graphicBuilder.GraphicComplete  -= OnGraphicBuilderComplete;
            _graphicBuilder.GraphicCancelled -= OnGraphicBuilderCancelled;

            _undoableCommand.Unexecute();
            _undoableCommand = null;

            _graphicBuilder = null;
        }
示例#2
0
        /// <summary>
        /// Fired when the graphic builder is also done setting text in the graphic, and thus we can decide if we want to unexecute
        /// the insert or save the command into the history.
        /// </summary>
        private void OnGraphicFinalCancelled(object sender, GraphicEventArgs e)
        {
            InteractiveTextGraphicBuilder graphicBuilder = sender as InteractiveTextGraphicBuilder;

            if (graphicBuilder != null)
            {
                graphicBuilder.GraphicFinalComplete  -= OnGraphicFinalComplete;
                graphicBuilder.GraphicFinalCancelled -= OnGraphicFinalCancelled;
            }

            _undoableCommand.Unexecute();
            _undoableCommand = null;
        }