コード例 #1
0
 TreeNode SelectTreeNode(TreeNode treenode, PIDL pidl)
 {
     if (treenode == null)
     {
         return(null);
     }
     if (treenode.Tag == null)
     {
         return(null);
     }
     if (pidl != null)
     {
         if (pidl.Equals(treenode.Tag))
         {
             return(treenode);
         }
     }
     if (pidl != null)
     {
         if (pidl.DisplayName == ((PIDL)treenode.Tag).DisplayName && pidl.PhysicalPath == ((PIDL)treenode.Tag).PhysicalPath)
         {
             return(treenode);
         }
     }
     foreach (TreeNode node in treenode.Nodes)
     {
         TreeNode found = SelectTreeNode(node, pidl);
         if (found != null)
         {
             return(found);
         }
     }
     return(null);
 }
コード例 #2
0
 internal static string PIDLToPath(PIDL pidlFull)
 {
     if (DirectoryInfoEx.DesktopDirectory.RequestPIDL(desktopPIDL => pidlFull.Equals(desktopPIDL)))
     {
         return("::{00021400-0000-0000-C000-000000000046}");
     }
     using (ShellFolder2 _desktopShellFolder = getDesktopShellFolder())
         return(loadName(_desktopShellFolder, pidlFull, ShellAPI.SHGNO.FORPARSING));
 }
コード例 #3
0
        internal static string PIDLToPath(PIDL pidlFull)
        {
            PIDL desktopPIDL = DirectoryInfoEx.DesktopDirectory.PIDL;

            if (pidlFull.Equals(desktopPIDL))
            {
                return("::{00021400-0000-0000-C000-000000000046}");
            }
            if (desktopPIDL != null)
            {
                desktopPIDL.Free();
            }
            desktopPIDL = null;

            using (ShellFolder2 _desktopShellFolder = getDesktopShellFolder())
                return(loadName(_desktopShellFolder, pidlFull, ShellAPI.SHGNO.FORPARSING));
        }