コード例 #1
0
        public bool OnDirKeyPressed(Keys shortcutKey)
        {
            if (!m_selectionList.IsSelectionDraggable())
            {
                return(false);
            }

            Point offset = ucore.Const.ZERO_POINT;

            switch (shortcutKey)
            {
            case Keys.Left:
                offset = new Point(-1, 0);
                break;

            case Keys.Right:
                offset = new Point(1, 0);
                break;

            case Keys.Up:
                offset = new Point(0, -1);
                break;

            case Keys.Down:
                offset = new Point(0, 1);
                break;
            }

            if (offset == ucore.Const.ZERO_POINT)
            {
                return(false);
            }

            Action_Move act;

            act = new Action_Move(m_selectionList.Selection);
            act.EndUpdatePosition(offset);
            ActionQueue.Instance.PushAction(act);
            return(true);
        }
コード例 #2
0
 public void DragLeft_EndMoving(Point location)
 {
     m_dragAction.EndUpdatePosition(location - (Size)(m_beginDragPos));
     ActionQueue.Instance.PushAction(m_dragAction);
     m_dragAction = null;
 }