C# Class ZeroInstall.DesktopIntegration.Windows.Shortcut

显示文件 Open project: 0install/0install-win

Public Methods

Method Description
Create ( AutoStart autoStart, FeedTarget target, ITaskHandler handler, bool machineWide ) : void

Creates a new Windows shortcut in the "Startup" menu.

Create ( QuickLaunch quickLaunch, FeedTarget target, ITaskHandler handler ) : void

Creates a new Windows shortcut in the quick launch bar.

Create ( SendTo sendTo, FeedTarget target, ITaskHandler handler ) : void

Creates a new Windows shortcut in the "Send to" menu.

Create ( [ desktopIcon, FeedTarget target, [ handler, bool machineWide ) : void

Creates a new Windows shortcut on the desktop.

Create ( [ path, [ targetPath, [ arguments = null, [ iconLocation = null, [ description = null ) : void

Creates a new Windows shortcut.

Remove ( AutoStart autoStart, bool machineWide ) : void

Removes a Windows shortcut from the "Startup" menu.

Remove ( QuickLaunch quickLaunch ) : void

Removes a Windows shortcut from the quick launch bar.

Remove ( SendTo sendTo ) : void

Removes a Windows shortcut from the "Send to" menu.

Remove ( [ desktopIcon, bool machineWide ) : void

Removes a Windows shortcut from the desktop.

Private Methods

Method Description
CheckName ( [ name ) : void

Ensures that the given name can be used as a file name.

Create ( [ path, FeedTarget target, [ command, [ handler, bool machineWide ) : void

Creates a new Windows shortcut.

GetDesktopPath ( [ name, bool machineWide ) : string
GetQuickLaunchPath ( string name ) : string
GetSendToPath ( string name ) : string
GetStartMenuCategoryPath ( [ category, bool machineWide ) : string
GetStartMenuPath ( [ category, [ name, bool machineWide ) : string
GetStartupPath ( string name, bool machineWide ) : string

Method Details

Create() public static method

Creates a new Windows shortcut in the "Startup" menu.
public static Create ( AutoStart autoStart, FeedTarget target, ITaskHandler handler, bool machineWide ) : void
autoStart AutoStart Information about the shortcut to be created.
target ZeroInstall.Store.FeedTarget The target the shortcut shall point to.
handler ITaskHandler A callback object used when the the user is to be informed about the progress of long-running operations such as downloads.
machineWide bool Create the shortcut machine-wide instead of just for the current user.
return void

Create() public static method

Creates a new Windows shortcut in the quick launch bar.
public static Create ( QuickLaunch quickLaunch, FeedTarget target, ITaskHandler handler ) : void
quickLaunch QuickLaunch Information about the shortcut to be created.
target ZeroInstall.Store.FeedTarget The target the shortcut shall point to.
handler ITaskHandler A callback object used when the the user is to be informed about the progress of long-running operations such as downloads.
return void

Create() public static method

Creates a new Windows shortcut in the "Send to" menu.
public static Create ( SendTo sendTo, FeedTarget target, ITaskHandler handler ) : void
sendTo SendTo Information about the shortcut to be created.
target ZeroInstall.Store.FeedTarget The target the shortcut shall point to.
handler ITaskHandler A callback object used when the the user is to be informed about the progress of long-running operations such as downloads.
return void

Create() public static method

Creates a new Windows shortcut on the desktop.
public static Create ( [ desktopIcon, FeedTarget target, [ handler, bool machineWide ) : void
desktopIcon [ Information about the shortcut to be created.
target ZeroInstall.Store.FeedTarget The target the shortcut shall point to.
handler [ A callback object used when the the user is to be informed about the progress of long-running operations such as downloads.
machineWide bool Create the shortcut machine-wide instead of just for the current user.
return void

Create() public static method

Creates a new Windows shortcut.
public static Create ( [ path, [ targetPath, [ arguments = null, [ iconLocation = null, [ description = null ) : void
path [ The location to place the shorcut at.
targetPath [ The target path the shortcut shall point to.
arguments [ Additional arguments to pass to the target; can be null.
iconLocation [ The path of the icon to use for the shortcut; leave null ot get the icon from .
description [ A short human-readable description; can be null.
return void

Remove() public static method

Removes a Windows shortcut from the "Startup" menu.
public static Remove ( AutoStart autoStart, bool machineWide ) : void
autoStart AutoStart Information about the shortcut to be removed.
machineWide bool The shortcut was created machine-wide instead of just for the current user.
return void

Remove() public static method

Removes a Windows shortcut from the quick launch bar.
public static Remove ( QuickLaunch quickLaunch ) : void
quickLaunch QuickLaunch Information about the shortcut to be removed.
return void

Remove() public static method

Removes a Windows shortcut from the "Send to" menu.
public static Remove ( SendTo sendTo ) : void
sendTo SendTo Information about the shortcut to be removed.
return void

Remove() public static method

Removes a Windows shortcut from the desktop.
public static Remove ( [ desktopIcon, bool machineWide ) : void
desktopIcon [ Information about the shortcut to be removed.
machineWide bool The shortcut was created machine-wide instead of just for the current user.
return void