示例#1
0
        // arrow routing - just create a composite of arrow modifications

        internal void onStartRoute()
        {
            if (!undoEnabled)
            {
                return;
            }
            currRouteCmd = new CompositeCmd(document, "Route");
        }
示例#2
0
        // tree collapse or expand

        internal void onStartExpand()
        {
            if (!undoEnabled)
            {
                return;
            }

            currExpandCmd = new CompositeCmd(document, "Expand");
        }
示例#3
0
        // save positions of all items on layout

        internal void onStartLayout(string title)
        {
            if (!undoEnabled)
            {
                return;
            }

            currLayoutCmd = new CompositeCmd(document, title);
            foreach (ChartObject item in document.Objects)
            {
                currLayoutCmd.AddSubCmd(new ModifyItemCmd(item));
            }
        }
示例#4
0
        public CompositeCmd StartComposite(string title, bool saveZOrder)
        {
            if (!undoEnabled)
            {
                return(null);
            }

            if (currCompositeCmd != null)
            {
                return(currCompositeCmd);
            }

            currCompositeCmd = new CompositeCmd(document, title, saveZOrder);
            currCompositeCmd.setContext(defaultCmdContext);
            return(currCompositeCmd);
        }
示例#5
0
        public void CutToClipboard()
        {
            CopyToClipboard();

            // that returns the active composite if somebody has already created one
            CompositeCmd composite = frmFlowChart.FlowChart.UndoManager.StartComposite("_Kenwalt.SysCAD_");

            // delete selected items
            frmFlowChart.State.Remove(frmFlowChart.FlowChart);

            if (composite != null && composite.Title == "_Kenwalt.SysCAD_")
            {
                // this is our own composite cmd
                composite.Title = "Cut";
                composite.Execute();
            }
        }
示例#6
0
 public bool PasteSelection(Diagram doc, SelectionCopy data, CompositeCmd cmd, Vector offset);