예제 #1
0
            private Forms::DragDropEffects GetEffect_Node(TreeTreeNode <T> _dst, TreeNode src, Forms::DragDropEffects mask)
            {
                TreeTreeNode <T> _src = src as TreeTreeNode <T>;

                if (_src == null)
                {
                    return(Forms::DragDropEffects.None);
                }

                mask &= _src.DragEffectToTreeNode;
                if (_src.IsDescendant(_dst) || _src == _dst)
                {
                    mask &= ~Forms::DragDropEffects.Move;
                }

                return(mask);
            }
예제 #2
0
            private Forms::DragDropEffects GetEffect_List(TreeTreeNode <T> _dst, Gen::List <TreeNode> list, Forms::DragDropEffects mask)
            {
                foreach (TreeNode node2 in list)
                {
                    TreeTreeNode <T> _src = node2 as TreeTreeNode <T>;
                    if (_src == null)
                    {
                        return(Forms::DragDropEffects.None);
                    }

                    mask &= _src.DragEffectToTreeNode;
                    if (_src.IsDescendant(_dst) || _src == _dst)
                    {
                        mask &= ~Forms::DragDropEffects.Move;
                    }
                }

                return(mask);
            }