/// <summary> /// Removes a Windows shortcut from the quick launch bar. /// </summary> /// <param name="quickLaunch">Information about the shortcut to be removed.</param> public static void Remove(QuickLaunch quickLaunch) { #region Sanity checks if (quickLaunch == null) throw new ArgumentNullException("quickLaunch"); #endregion string filePath = GetQuickLaunchPath(quickLaunch.Name); if (File.Exists(filePath)) File.Delete(filePath); }
private void getPinnedApps() { // add Windows taskbar pinned apps to QuickLaunch string pinnedPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar"; if (ShellHelper.Exists(pinnedPath)) { QuickLaunch.AddRange(generateAppList(pinnedPath)); } }
/// <summary> /// Creates a new Windows shortcut in the quick launch bar. /// </summary> /// <param name="quickLaunch">Information about the shortcut to be created.</param> /// <param name="target">The target the shortcut shall point to.</param> /// <param name="handler">A callback object used when the the user is to be informed about the progress of long-running operations such as downloads.</param> public static void Create(QuickLaunch quickLaunch, FeedTarget target, ITaskHandler handler) { #region Sanity checks if (quickLaunch == null) throw new ArgumentNullException("quickLaunch"); if (handler == null) throw new ArgumentNullException("handler"); #endregion string filePath = GetQuickLaunchPath(quickLaunch.Name); Create(filePath, target, quickLaunch.Command, handler, machineWide: false); }
public void AddToQuickLaunch(ApplicationInfo app) { if (!QuickLaunch.Contains(app)) { ApplicationInfo appClone = app.Clone(); appClone.Icon = null; QuickLaunch.Add(appClone); Save(); } }
/// <summary> /// Removes a Windows shortcut from the quick launch bar. /// </summary> /// <param name="quickLaunch">Information about the shortcut to be removed.</param> public static void Remove(QuickLaunch quickLaunch) { #region Sanity checks if (quickLaunch == null) { throw new ArgumentNullException(nameof(quickLaunch)); } #endregion string filePath = GetQuickLaunchPath(quickLaunch.Name); if (File.Exists(filePath)) { File.Delete(filePath); } }
/// <summary> /// Creates a new Windows shortcut in the quick launch bar. /// </summary> /// <param name="quickLaunch">Information about the shortcut to be created.</param> /// <param name="target">The target the shortcut shall point to.</param> /// <param name="iconStore">Stores icon files downloaded from the web as local files.</param> public static void Create(QuickLaunch quickLaunch, FeedTarget target, IIconStore iconStore) { #region Sanity checks if (quickLaunch == null) { throw new ArgumentNullException(nameof(quickLaunch)); } if (iconStore == null) { throw new ArgumentNullException(nameof(iconStore)); } #endregion string filePath = GetQuickLaunchPath(quickLaunch.Name); Create(filePath, target, quickLaunch.Command, iconStore); }
/// <summary> /// Creates a new Windows shortcut in the quick launch bar. /// </summary> /// <param name="quickLaunch">Information about the shortcut to be created.</param> /// <param name="target">The target the shortcut shall point to.</param> /// <param name="handler">A callback object used when the the user is to be informed about the progress of long-running operations such as downloads.</param> public static void Create(QuickLaunch quickLaunch, FeedTarget target, ITaskHandler handler) { #region Sanity checks if (quickLaunch == null) { throw new ArgumentNullException(nameof(quickLaunch)); } if (handler == null) { throw new ArgumentNullException(nameof(handler)); } #endregion string filePath = GetQuickLaunchPath(quickLaunch.Name); Create(filePath, target, quickLaunch.Command, handler, machineWide: false); }
public abstract void DrawQuickLaunch(QuickLaunch quickLaunch, Graphics g);
public async Task <IActionResult> SaveQuickLaunch([FromBody] QuickLaunch launch) { await _service.SaveQuickLaunch(await GetUserIdOrThrow(), launch); return(Ok()); }