Пример #1
0
        public UIShapeBase CreateNewShape(UIShapeBase shape, UIShapeDialog parent, float PosX, float PosY)
        {
            UIShapeBase _newInst = (UIShapeBase)shape.Clone();
            _newInst.PosX = PosX;
            _newInst.PosY = PosY;

            EditorManager.Actions.Add(new AddShapeAction(_newInst, m_baseDialog, shape.ParentLayer, true));

            return _newInst;
        }
Пример #2
0
        public void SelectUIShape(UIShapeBase shape)
        {
            if (m_bCopying == true)
                return;

            if ( m_selectedShapeList.Contains( shape ) == false )
                m_selectedShapeList.Add(shape); // 선택에 넣음

            if (shape == m_baseDialog || shape.Parent == m_baseDialog) // 작업 다이얼로그는 그대로
            {
                m_UIShapeList.Clear();

                foreach (ShapeBase child in m_baseDialog.ChildCollection)
                {
                    if (child is UIShapeBase)
                    {
                        m_UIShapeList.Add(child as UIShapeBase);
                    }
                }

                m_UIShapeList.Add(m_baseDialog); // 다이얼로그는 제일 마지막에 추가 ( 나중에 검색할때 가장 나중에 검색되도록 )

                return;
            }

            // 작업 다이얼로그가 변경됨
            if (shape is UIShapeDialog)
            {
                m_baseDialog = shape as UIShapeDialog;
            }
            else if (shape.Parent is UIShapeDialog)
            {
                m_baseDialog = shape.Parent as UIShapeDialog;
            }
            else
            {
                return;
            }

            m_UIShapeList.Clear();
            foreach (ShapeBase child in m_baseDialog.ChildCollection)
            {
                if (child is UIShapeBase)
                {
                    m_UIShapeList.Add(child as UIShapeBase);
                }
            }

            m_UIShapeList.Add(m_baseDialog); // 다이얼로그는 제일 마지막에 추가 ( 나중에 검색할때 가장 나중에 검색되도록 )
        }