Beispiel #1
0
        public void CopyMultiSelected(int dx, int dy)
        {
            ArrayList tmpList = new ArrayList();

            foreach (Ele elem in List)
            {
                if (elem.selected)
                {
                    Ele eL = elem.Copy();
                    elem.selected = false;
                    eL.Move(dx, dy);
                    tmpList.Add(eL);
                    //
                    sRec   = new SelRect(eL);
                    selEle = eL;
                    selEle.EndMoveRedim();
                }
            }
            foreach (Ele tmpElem in tmpList)
            {
                List.Add(tmpElem);
                // Uloz operaci do undo/redo bufferu
                StoreDo("I", tmpElem);
            }
        }
Beispiel #2
0
        // Kopiruje oznaceny objekt, oznaci ho jako vybrany
        public void CopySelected(int dx, int dy)
        {
            if (selEle != null)
            {
                Ele L = CpSelected();
                L.Move(dx, dy);
                DeSelect();
                List.Add(L);

                // uklada operaci do undo/redo bufferu
                StoreDo("I", L);

                sRec = new SelRect(L);
                //sRec.sonoUnaLinea = L.sonoUnaLinea;
                selEle = L;
                selEle.EndMoveRedim();
            }
        }