C# Class LitDev.LDShell

Exibir arquivo Open project: litdev1/LitDev

Public Methods

Method 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

Method 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 method

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).
return Primitive

CascadeWindows() public static method

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

DTIconsHide() public static method

Hides all desktop icons.
public static DTIconsHide ( ) : void
return void

DTIconsShow() public static method

Shows all hidden desktop icons again.
public static DTIconsShow ( ) : void
return void

DTIconsToggle() public static method

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

DateTimeSettings() public static method

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

ExploreFolder() public static method

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.
return void

GetAllDetailNamesFor() public static method

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).
return Primitive

GetAllDetailsFor() public static method

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.
return Primitive

GetAllVerbsFor() public static method

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.
return Primitive

GetDetail() public static method

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'.
return Primitive

GetSetting() public static method

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.).
return Primitive

GetSystemInfo() public static method

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").
return Primitive

LinkCreate() public static method

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.
return Primitive

LinkGetProperty() public static method

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
return Primitive

LinkSetProperty() public static method

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).
return Primitive

OpenFolder() public static method

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.
return void

RestoreWindows() public static method

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

RunBox() public static method

Shows the Run(box) Dialog.
public static RunBox ( ) : void
return void

SelectFolder() public static method

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).
return Primitive

ShellLink() public static method

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.
return Primitive

ShellLinkGet() public static method

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)
return Primitive

ShellLinkSet() public static method

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).
return Primitive

ShowDesktop() public static method

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

ShowFileProperties() public static method

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.
return void

SpecialFolderList() public static method

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).
return Primitive

StartSettings() public static method

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

Switch3D() public static method

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

TileAllHoriz() public static method

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

TileAllVert() public static method

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

ToggleDesktop() public static method

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