示例#1
0
 /// <summary>
 /// Adds the specified destination to the application's
 /// recent destinations list.
 /// </summary>
 /// <remarks>
 /// If the recent and frequent categories are disabled,
 /// this method has no visual effect on the jump list
 /// in the recent and frequent categories respectively.
 /// </remarks>
 /// <param name="destination">An object implementing
 /// <see cref="IJumpListDestination"/> such as <see cref="ShellLink"/>
 /// or <see cref="ShellItem"/>.</param>
 public void AddToRecent(IJumpListDestination destination)
 {
     if (destination is ShellItem)
     {
         SHARDAPPIDINFO info = new SHARDAPPIDINFO
         {
             psi = (VistaBridgeInterop.IShellItem)destination.GetShellRepresentation(),
             pszAppID = _appId
         };
         UnsafeNativeMethods.SHAddToRecentDocs(ref info);
     }
     else if (destination is ShellLink)
     {
         //TODO: This doesn't actually work
         SHARDAPPIDINFOLINK info = new SHARDAPPIDINFOLINK
         {
             psl = (IShellLinkW)destination.GetShellRepresentation(),
             pszAppID = _appId
         };
         UnsafeNativeMethods.SHAddToRecentDocs(ref info);
     }
     Thread.Sleep(200);
 }
示例#2
0
 public static void SHAddToRecentDocs(ref SHARDAPPIDINFOLINK appIDInfoLink)
 {
     UnsafeNativeMethods.SHAddToRecentDocs(SHARD.SHARD_APPIDINFOLINK, ref appIDInfoLink);
 }
示例#3
0
 public static void SHAddToRecentDocs(ref SHARDAPPIDINFOLINK appIDInfoLink)
 {
     UnsafeNativeMethods.SHAddToRecentDocs(SHARD.SHARD_APPIDINFOLINK, ref appIDInfoLink);
 }
示例#4
0
 public static extern void SHAddToRecentDocs(
     SHARD flags,
     ref SHARDAPPIDINFOLINK appIDInfoLink);
示例#5
0
 public static extern void SHAddToRecentDocs(
     SHARD flags,
     ref SHARDAPPIDINFOLINK appIDInfoLink);