示例#1
0
 private void dragEnter(object sender, DragEventArgs args)
 {
     if (args.Data.GetData(typeof(LibraryTreeNode)) is LibraryTreeNode)
     {
         LibraryTreeNode node  = (LibraryTreeNode)args.Data.GetData(typeof(LibraryTreeNode));
         FileDescriptor  fDesc = FileManager.Instance.lookUp(node.FilePath);
         if (fDesc != null && (fDesc is TypeDescriptor || fDesc.GetType().IsSubclassOf(typeof(TypeDescriptor))))
         {
             args.Effect = DragDropEffects.All;
         }
         if (fDesc != null && (fDesc is ArtDescriptor))
         {
             args.Effect = DragDropEffects.All;
         }
     }
 }