C# Class LitDev.LDShell

Afficher le fichier Open project: litdev1/LitDev

Méthodes publiques

Méthode Description
ApplyVerbOn ( Primitive path, Primitive verb ) : Primitive

Apply the given Verb (contextmenu item) for the given file or folder. List of available Verbs (for a filetype or folder) under 'GetAllVerbsFor'.

CascadeWindows ( ) : void

Orders all opended windows in cascades on the desktop (Revert with RestoreWindows).

DTIconsHide ( ) : void

Hides all desktop icons.

DTIconsShow ( ) : void

Shows all hidden desktop icons again.

DTIconsToggle ( ) : void

Toggles the view of all desktop icons automatically (On/Off).

DateTimeSettings ( ) : void

Shows the dialog for date- and time settings.

ExploreFolder ( Primitive path ) : void

Opens a specified folder in a Windows Explorer window. (parent folder for existing file path). In new tab in QTTabBar.

GetAllDetailNamesFor ( Primitive path, Primitive step1 ) : Primitive

Gets the names of all available extended properties for a given file or folder as Array (up to max. 316, w/o -1=Infotip).

GetAllDetailsFor ( Primitive path ) : Primitive

Gets all available extended properties for the given file or folder as Array (up to max. 316, without -1=Infotip).

GetAllVerbsFor ( Primitive path ) : Primitive

Gets all available Verbs (contextmenu items) for a given filetype or folder as Array. Applying of a Verb on file/folder under see 'ApplyVerbOn'.

GetDetail ( Primitive path, Primitive infoType ) : Primitive

Gets the value of an extended property for a given file or folder.

GetSetting ( Primitive value ) : Primitive

Gets values for global Shell settings (s. folder opions-view, CheckedStatus).

GetSystemInfo ( Primitive info ) : Primitive

Gets a given Systeminformation.

LinkCreate ( Primitive shortcut, Primitive target ) : Primitive

Creates a new lnk/url shortcut (Shell32). Further editing with 'LinkSetProperty'.

LinkGetProperty ( Primitive shortcut, Primitive property ) : Primitive

Gets properties of a lnk/url shortcut link, like target pfad, arguments etc.

LinkSetProperty ( Primitive shortcut, Primitive target, Primitive args, Primitive folder, Primitive desc, Primitive icoPath, Primitive icoIdx, Primitive hotkey, Primitive style ) : Primitive

Modifies properties of an existing lnk/url shortcut link, like target path, arguments etc. (* for Urls).

OpenFolder ( Primitive path ) : void

Opens explorer with the given file-/folder path (parent folder for existing file path). In new tab in QTTabBar.

RestoreWindows ( ) : void

Restores all minimized windows in the taskbar (after ShowDesktop, TileAll.., CascadeWindows) again.

RunBox ( ) : void

Shows the Run(box) Dialog.

SelectFolder ( Primitive title, Primitive initDir ) : Primitive

Shows a folder selection dialog.

ShellLink ( Primitive shortcut, Primitive target ) : Primitive

Creates a new lnk/url shortcut (IWshRuntimeLibrary). Further editing with 'ShellLinkSet'.

ShellLinkGet ( Primitive shortcut, Primitive property ) : Primitive

Gets properties of a lnk/url shortcut link, like target pfad, arguments etc. (IWshRuntimeLibrary).

ShellLinkSet ( Primitive shortcut, Primitive target, Primitive args, Primitive folder, Primitive desc, Primitive icon, Primitive hotkey, Primitive style ) : Primitive

Modifies properties of an existing lnk/url shortcut link, like target path, arguments etc. (* for Urls) (IWshRuntimeLibrary).

ShowDesktop ( ) : void

Minimizes all opened windows into the taskbar and showes the desktop (Revert with RestoreWindows).

ShowFileProperties ( Primitive filePath ) : void

Opens the shell properties dialog for a given file or folder path (GW is needed for that, not available from TW or Console).

SpecialFolderList ( Primitive csidl ) : Primitive

Gets all items in a special system/shell folder (upper level only).

StartSettings ( ) : void

Shows the dialog for startmenü/taskbar settings.

Switch3D ( ) : void

Orders all opended windows in a 3D stack on the desktop to select through (with arrow keys).

TileAllHoriz ( ) : void

Orders all opened windows horizontally tiled on the desktop (Revert with RestoreWindows).

TileAllVert ( ) : void

Orders all opened windows vertically tiled on the desktop (Revert with RestoreWindows).

ToggleDesktop ( ) : void

Toggles the view of the (windowless) desktop on and off (s. ShowDesktop/RestoreWindows).

Private Methods

Méthode Description
FindWindowEx ( IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow ) : IntPtr
GetShell32NameSpace ( Object folder ) : Interop.Shell32.Folder
IsNumber ( string input ) : bool
IsNumeric ( string input ) : bool
IsWindowVisible ( IntPtr hWnd ) : bool
SHQueryRecycleBin ( string pszRootPath, SHQUERYRBINFO &pSHQueryRBInfo ) : int
ShellExecuteEx ( SHELLEXECUTEINFO &lpExecInfo ) : bool
ShowWindow ( IntPtr hWnd, int nCmdShow ) : bool

Method Details

ApplyVerbOn() public static méthode

Apply the given Verb (contextmenu item) for the given file or folder. List of available Verbs (for a filetype or folder) under 'GetAllVerbsFor'.
public static ApplyVerbOn ( Primitive path, Primitive verb ) : Primitive
path Primitive The full file- or folder path.
verb Primitive The Verb to apply (case- and '&' insensitive).
Résultat Primitive

CascadeWindows() public static méthode

Orders all opended windows in cascades on the desktop (Revert with RestoreWindows).
public static CascadeWindows ( ) : void
Résultat void

DTIconsHide() public static méthode

Hides all desktop icons.
public static DTIconsHide ( ) : void
Résultat void

DTIconsShow() public static méthode

Shows all hidden desktop icons again.
public static DTIconsShow ( ) : void
Résultat void

DTIconsToggle() public static méthode

Toggles the view of all desktop icons automatically (On/Off).
public static DTIconsToggle ( ) : void
Résultat void

DateTimeSettings() public static méthode

Shows the dialog for date- and time settings.
public static DateTimeSettings ( ) : void
Résultat void

ExploreFolder() public static méthode

Opens a specified folder in a Windows Explorer window. (parent folder for existing file path). In new tab in QTTabBar.
public static ExploreFolder ( Primitive path ) : void
path Primitive The folder path to open in explorer (file path opens parent folder). The folder must exist.
Résultat void

GetAllDetailNamesFor() public static méthode

Gets the names of all available extended properties for a given file or folder as Array (up to max. 316, w/o -1=Infotip).
public static GetAllDetailNamesFor ( Primitive path, Primitive step1 ) : Primitive
path Primitive The full file- or folder path.
step1 Primitive Indizes in speps by 1? "True" or "False" (default, real property ID).
Résultat Primitive

GetAllDetailsFor() public static méthode

Gets all available extended properties for the given file or folder as Array (up to max. 316, without -1=Infotip).
public static GetAllDetailsFor ( Primitive path ) : Primitive
path Primitive The full file- or folder path.
Résultat Primitive

GetAllVerbsFor() public static méthode

Gets all available Verbs (contextmenu items) for a given filetype or folder as Array. Applying of a Verb on file/folder under see 'ApplyVerbOn'.
public static GetAllVerbsFor ( Primitive path ) : Primitive
path Primitive The full file- or folder path.
Résultat Primitive

GetDetail() public static méthode

Gets the value of an extended property for a given file or folder.
public static GetDetail ( Primitive path, Primitive infoType ) : Primitive
path Primitive The full file- or folder path.
infoType Primitive The ID number or name of the property (eg. -1="Infotip"/"", 0="Name", 1="Size", etc.) /// ID numbers and names of available properties under s. 'AllDetails'.
Résultat Primitive

GetSetting() public static méthode

Gets values for global Shell settings (s. folder opions-view, CheckedStatus).
public static GetSetting ( Primitive value ) : Primitive
value Primitive An integer constant for the value to get (eg. 1, 2, 4, "8", "32" etc.).
Résultat Primitive

GetSystemInfo() public static méthode

Gets a given Systeminformation.
public static GetSystemInfo ( Primitive info ) : Primitive
info Primitive The name of the value to get. Options: /// "DirectoryServiceAvailable", "DoubleClickTime", "ProcessorLevel", "ProcessorSpeed", "ProcessorArchitecture", "PhysicalMemoryInstalled", "IsOS_DomainMember" /// (Only XP: "IsOS_Professional", "IsOS_Personal").
Résultat Primitive

LinkCreate() public static méthode

Creates a new lnk/url shortcut (Shell32). Further editing with 'LinkSetProperty'.
public static LinkCreate ( Primitive shortcut, Primitive target ) : Primitive
shortcut Primitive The full path for the new lnk/url shortcut file.
target Primitive The full path of the target file/-folder resp. URL address.
Résultat Primitive

LinkGetProperty() public static méthode

Gets properties of a lnk/url shortcut link, like target pfad, arguments etc.
public static LinkGetProperty ( Primitive shortcut, Primitive property ) : Primitive
shortcut Primitive The full path of the lnk/url shortcut link file.
property Primitive The property to get (case independent, * for Urls) like: /// "Target" target path * /// "Args" arguments /// "Folder" working directory /// "Desc" comment * /// "HotKey" shortcut key comb * (default: 0) /// "Style" window style * (1 normal, 3 max, 7 min) /// "Icon" icon path
Résultat Primitive

LinkSetProperty() public static méthode

Modifies properties of an existing lnk/url shortcut link, like target path, arguments etc. (* for Urls).
public static LinkSetProperty ( Primitive shortcut, Primitive target, Primitive args, Primitive folder, Primitive desc, Primitive icoPath, Primitive icoIdx, Primitive hotkey, Primitive style ) : Primitive
shortcut Primitive The full path of an existing lnk/url shortcut link file.
target Primitive * The full path of the target file/-folder resp. URL address.
args Primitive Startparameter when launching the shortcut or "" (for url).
folder Primitive The full path of the start folder or "" (for url).
desc Primitive * Comment or description for the shortcut or "".
icoPath Primitive * Full path of the icon file for the shortcut or "".
icoIdx Primitive * Index of the icon in the icon file (default: 0, for .ico).
hotkey Primitive * keys combination to launch the shortcut link (default: 0).
style Primitive * Window style when launching the shortcut (default: 1 normal, 3 max, 7 min).
Résultat Primitive

OpenFolder() public static méthode

Opens explorer with the given file-/folder path (parent folder for existing file path). In new tab in QTTabBar.
public static OpenFolder ( Primitive path ) : void
path Primitive Opens the specified folder (file path opens parent folder). The folder must exist.
Résultat void

RestoreWindows() public static méthode

Restores all minimized windows in the taskbar (after ShowDesktop, TileAll.., CascadeWindows) again.
public static RestoreWindows ( ) : void
Résultat void

RunBox() public static méthode

Shows the Run(box) Dialog.
public static RunBox ( ) : void
Résultat void

SelectFolder() public static méthode

Shows a folder selection dialog.
public static SelectFolder ( Primitive title, Primitive initDir ) : Primitive
title Primitive The title to show on the dialog.
initDir Primitive The start folder when the dialog opens or "" for last selected folder (default: Computer).
Résultat Primitive

ShellLink() public static méthode

Creates a new lnk/url shortcut (IWshRuntimeLibrary). Further editing with 'ShellLinkSet'.
public static ShellLink ( Primitive shortcut, Primitive target ) : Primitive
shortcut Primitive The full path for the new lnk/url shortcut file.
target Primitive The full path of the target file/-folder resp. URL address.
Résultat Primitive

ShellLinkGet() public static méthode

Gets properties of a lnk/url shortcut link, like target pfad, arguments etc. (IWshRuntimeLibrary).
public static ShellLinkGet ( Primitive shortcut, Primitive property ) : Primitive
shortcut Primitive The full path of the lnk/url shortcut link file.
property Primitive The property to get (case independent, * for Urls) like: /// "Target" target path * /// "Args" arguments /// "Folder" working directory /// "Desc" comment * /// "HotKey" shortcut key comb * (default: 0) /// "Style" window style * (1 normal, 3 max, 7 min) /// "Icon" icon path,Idx (default: ,0)
Résultat Primitive

ShellLinkSet() public static méthode

Modifies properties of an existing lnk/url shortcut link, like target path, arguments etc. (* for Urls) (IWshRuntimeLibrary).
public static ShellLinkSet ( Primitive shortcut, Primitive target, Primitive args, Primitive folder, Primitive desc, Primitive icon, Primitive hotkey, Primitive style ) : Primitive
shortcut Primitive The full path of an existing lnk/url shortcut link file.
target Primitive * The full path of the target file/-folder resp. URL address.
args Primitive Startparameter when launching the shortcut or "" (for url).
folder Primitive The full path of the start folder or "" (for url).
desc Primitive * Comment or description for the shortcut or "".
icon Primitive * The full path (resp. path,Idx) of the icon for the shortcut link or "". 'Idx' is Index of the icon in in the file (default: 0, for .ico).
hotkey Primitive * keys combination to launch the shortcut link (default: 0).
style Primitive * Window style when launching the shortcut (default: 1 normal, 3 max, 7 min).
Résultat Primitive

ShowDesktop() public static méthode

Minimizes all opened windows into the taskbar and showes the desktop (Revert with RestoreWindows).
public static ShowDesktop ( ) : void
Résultat void

ShowFileProperties() public static méthode

Opens the shell properties dialog for a given file or folder path (GW is needed for that, not available from TW or Console).
public static ShowFileProperties ( Primitive filePath ) : void
filePath Primitive The full file- or folder path.
Résultat void

SpecialFolderList() public static méthode

Gets all items in a special system/shell folder (upper level only).
public static SpecialFolderList ( Primitive csidl ) : Primitive
csidl Primitive The CSIDL number of the system folder (0 to 47, constants and names of available folders under s. SpecialFolderConstants).
Résultat Primitive

StartSettings() public static méthode

Shows the dialog for startmenü/taskbar settings.
public static StartSettings ( ) : void
Résultat void

Switch3D() public static méthode

Orders all opended windows in a 3D stack on the desktop to select through (with arrow keys).
public static Switch3D ( ) : void
Résultat void

TileAllHoriz() public static méthode

Orders all opened windows horizontally tiled on the desktop (Revert with RestoreWindows).
public static TileAllHoriz ( ) : void
Résultat void

TileAllVert() public static méthode

Orders all opened windows vertically tiled on the desktop (Revert with RestoreWindows).
public static TileAllVert ( ) : void
Résultat void

ToggleDesktop() public static méthode

Toggles the view of the (windowless) desktop on and off (s. ShowDesktop/RestoreWindows).
public static ToggleDesktop ( ) : void
Résultat void