Class ContextMenu
- Namespace
- ZeroInstall.DesktopIntegration.Windows
- Assembly
- ZeroInstall.DesktopIntegration.dll
Contains control logic for applying ContextMenu and ContextMenu on Windows systems.
public static class ContextMenu
- Inheritance
-
ContextMenu
- Inherited Members
Fields
Prefix
Prepended before programmatic identifiers used by Zero Install in the registry. This prevents conflicts with non-Zero Install installations.
public const string Prefix = "ZeroInstall.ContextMenu."
Field Value
RegKeyClassesAll
The HKCU registry key for registering things for all filesystem objects (files and directories).
public const string RegKeyClassesAll = "AllFilesystemObjects"
Field Value
RegKeyClassesDirectories
The HKCU registry key for registering things for all directories.
public const string RegKeyClassesDirectories = "Directory"
Field Value
RegKeyClassesExecutableFiles
The HKCU registry key for registering things for different kinds of executable files.
public static readonly string[] RegKeyClassesExecutableFiles
Field Value
- string[]
RegKeyClassesFiles
The HKCU registry key for registering things for all files.
public const string RegKeyClassesFiles = "*"
Field Value
Methods
Apply(FeedTarget, ContextMenu, IIconStore, bool)
Adds a context menu entry to the current system.
public static void Apply(FeedTarget target, ContextMenu contextMenu, IIconStore iconStore, bool machineWide)
Parameters
target
FeedTargetThe application being integrated.
contextMenu
ContextMenuThe context menu entry to add.
iconStore
IIconStoreA callback object used when the user is to be informed about the progress of long-running operations such as downloads.
machineWide
boolAdd the context menu entry machine-wide instead of just for the current user.
Exceptions
- OperationCanceledException
The user canceled the task.
- IOException
A problem occurred while writing to the filesystem or registry.
- WebException
A problem occurred while downloading additional data (such as icons).
- UnauthorizedAccessException
Write access to the filesystem or registry is not permitted.
Remove(ContextMenu, bool)
Removes a context menu entry from the current system.
public static void Remove(ContextMenu contextMenu, bool machineWide)
Parameters
contextMenu
ContextMenuThe context menu entry to remove.
machineWide
boolRemove the context menu entry machine-wide instead of just for the current user.
Exceptions
- IOException
A problem occurred while writing to the filesystem or registry.
- UnauthorizedAccessException
Write access to the filesystem or registry is not permitted.