Ejemplo n.º 1
0
 public void StopDrog(EditorControl arg1, EditorEvent arg2, IEditorSeletable arg3)
 {
     if (arg3 == this)
     {
         ReCalculateNode();
         _dragingNode = null;
         arg2.Use();
     }
 }
Ejemplo n.º 2
0
        public void ShowNodeDetial(EditorControl arg1, EditorEvent arg2)
        {
            if (_dragingNode != null)
            {
                return;
            }
            BeTreeNode node = arg1 as BeTreeNode;

            OnNodeClick?.Invoke(node);
            arg2.Use();
        }
Ejemplo n.º 3
0
 public void StartDrag(EditorControl ec, EditorEvent e)
 {
     if (e.Event.button != 0)
     {
         return;
     }
     if (e.Event.control)
     {
         _mouseOffset = e.Event.mousePosition - NodePanels.LocalPosition - ec.LocalPosition;
         EditorControlDragEventManager.Instance.StartDragEvent(ec);
         e.Use();
         _isChildDrag = NodeDragType.CtrlDrag;
         _dragingNode = ec;
     }
     else if (e.Event.shift)
     {
         _mouseOffset = e.Event.mousePosition - NodePanels.LocalPosition - ec.LocalPosition;
         EditorControlDragEventManager.Instance.StartDragEvent(ec);
         _isChildDrag = NodeDragType.ShiftDrag;
         _dragingNode = ec;
         e.Use();
     }
 }
Ejemplo n.º 4
0
        public void DropIn(EditorControl root1, EditorEvent e, IEditorSeletable node1)
        {
            BeTreeNode node = node1 as BeTreeNode;
            BeTreeNode root = root1 as BeTreeNode;

            if (node == null || root == null || node == root)
            {
                return;
            }
            switch (_isChildDrag)
            {
            case NodeDragType.CtrlDrag:
                NodeSetToChild?.Invoke(root, node);
                break;

            case NodeDragType.ShiftDrag:
                NodeInsert?.Invoke(root, node);
                break;
            }
            _isChildDrag = NodeDragType.None;
            _dragingNode = null;
            ReCalculateNode();
            e.Use();
        }
 private void UseEvent(EditorControl ec, EditorEvent ee)
 {
     ee.Use();
 }