C# Class BExplorer.Shell.ShellView

The ShellFileListView class that visualize contents of a directory
Inheritance: System.Windows.Forms.UserControl
Mostra file Open project: Gainedge/BetterExplorer Class Usage Examples

Public Properties

Property Type Description
AllAvailableColumns Collumns>.Dictionary
BadgesData Dictionary>>
Collumns List
CurrentRefreshedItemIndex Int32
Groups List
IsCancelRequested Boolean
IsFocusAllowed Boolean
IsNavigationCancelRequested Boolean
IsNavigationInProgress Boolean
IsRenameInProgress Boolean
IsSearchNavigating Boolean
IsViewSelectionAllowed Boolean
LargeImageList ImageListEx
SmallImageList ImageListEx
ToolTip ToolTip

Private Properties

Property Type Description
AutosizeColumn void
Column_OnClick void
Do_Copy_OR_Move_Helper void
Do_Copy_OR_Move_Helper_2 void
Drag_SetEffect void
DrawComputerTiledModeView void
DrawNormalFolderSubitemsInTiledView void
EndLabelEdit void
GenerateGroupsFromColumn void
GetBadgeForPath IListItemEx
GetFilePropertiesString String
GetFirstIndexOf Int32
GetFirstSelectedItem IListItemEx
InitializeComponent void
LoadSettingsFromDatabase Boolean
Navigate void
NavigateSearch void
OnItemMiddleClick void
OnSelectionChanged void
PrepareSearchQuery String
ProcessCustomDraw void
ProcessCustomDrawPostPaint void
ProcessShellNotifications void
QueueDeleteItem void
RedrawWindow void
RedrawWindow void
RenameItem void
ResortListViewItems void
RetrieveThumbnailByIndex void
SetSortIcon void
ShellView_GotFocus void
ShellView_KeyDown Boolean
ShellView_MouseUp void
StartProcessInCurrentDirectory void
ThreadRun_Helper Boolean
ToLvItemIndex LVITEMINDEX
UpdateColsInView void
UpdateIconCacheForFolder void
WndProc void
_MaintenanceTimer_Tick void
_UnvalidateTimer_Tick void
resetTimer_Tick void
selectionTimer_Tick void

Public Methods

Method Description
AutosizeAllColumns ( Int32 autosizeParam ) : void

Automatically resize all controls

CancelNavigation ( ) : void

Cancels navigation

ClearFolderIcon ( String wszPath ) : HResult

Removes the folder's icon

CopySelectedFiles ( ) : void
CreateNewFolder ( String name ) : String

Creates a new folder in the current directory and assigns a default name if none is specified. Returns the name

CreateNewLibrary ( String name ) : ShellLibrary

Creates a new library folder

CutSelectedFiles ( ) : void
DeSelectAllItems ( ) : void

Sets focus to tis control then deselects all items

DeleteSelectedFiles ( Boolean isRecycling ) : void
DisableGroups ( ) : void

Disables/Removes grouping

DoCopy ( System.Windows.Forms dataObject, IListItemEx destination ) : void
DoCopy ( IListItemEx destination ) : void
DoCopy ( System dataObject, IListItemEx destination ) : void
DoMove ( System.Windows.Forms dataObject, IListItemEx destination ) : void
DoMove ( IListItemEx destination ) : void
DoMove ( System dataObject, IListItemEx destination ) : void
EnableGroups ( ) : void

Enables/Adds groupings

Focus ( Boolean isActiveCheck = true, Boolean isForce = false ) : void

Gives the ShellListView focus

GetFirstSelectedItemIndex ( ) : Int32

Returns the first selected item's index OR -1 if there is no selected item

GetGroupIndex ( Int32 itemIndex ) : Int32
GetIntPtrFromData ( Object data ) : IntPtr
GetSelectedCount ( ) : Int32
InsertNewItem ( IListItemEx obj ) : Int32

Inserts a new item into the control If and only If it is new. Returns the item's index OR -1 if already existing

InvertSelection ( ) : void

Inverse the selection of items

IsDropDescriptionValid ( System dataObject ) : Boolean
IsShowingLayered ( System.Windows.Forms dataObject ) : Boolean
NavigateParent ( ) : void

Navigates to the parent of the currently displayed folder.

Navigate_Full ( IListItemEx destination, Boolean saveFolderSettings, Boolean isInSameTab = false, Boolean refresh = false ) : void

Navigate to a folder, set it as the current folder and optionally save the folder's settings to the database.

Navigate_Full ( String SearchQuery, Boolean saveFolderSettings, Boolean isInSameTab = false, Boolean refresh = false ) : void

Navigates to a search folder

OpenOrNavigateItem ( ) : void

If the Current item IsFolder Then navigate to it Else open item

OpenShareUI ( ) : void
PasteAvailableFiles ( ) : void
RaiseItemUpdated ( ItemUpdateType type, IListItemEx old, IListItemEx newItem, Int32 index ) : void
RaiseMiddleClickOnItem ( IListItemEx item ) : void
RaiseRecycleBinUpdated ( ) : void
RedrawItem ( Int32 index, Int32 delay = -1 ) : void
RefreshContents ( ) : void

Refreshes the contact (by navigating to the current folder If and only If the current folder is not null)

RefreshItem ( Int32 index, Boolean isForceRedraw = false ) : void

Refreshes a single item

RemoveAllCollumns ( ) : void
RenameSelectedItem ( ) : void

Renames the first selected item

RenameSelectedItem ( Int32 index ) : void

Renames the item at the specified index

RenameShellItem ( IShellItem item, String newName, Boolean isAddFileExtension, String extension = "" ) : void
ResetFolderSettings ( ) : void

Resets the current folder's settings by deting it from the SQLIte database

ResizeIcons ( Int32 value ) : void

Resizes the icons

SaveSettingsToDatabase ( IListItemEx destination ) : void

Saves the current destination settings to the SQLite database

SelectAll ( ) : void

Selects all items and sets this to focus

SelectItemByIndex ( Int32 index, Boolean ensureVisability = false, Boolean deselectOthers = false ) : void

Set this to focus then select an item by its index

SelectItems ( IListItemEx shellObjectArray ) : void

Selects only the specified items. First runs DeSelectAllItems Then selects all items on a separate thread.

SetColInView ( Collumns col, Boolean remove ) : void
SetFolderIcon ( String wszPath, String wszExpandedIconPath, Int32 iIcon ) : void

Sets the folder's icon

SetGroupOrder ( Boolean reverse = true ) : void

Sets the Sort order of the Groups

SetSortCollumn ( Boolean isReorder, Collumns column, SortOrder order, Boolean reverseOrder = true ) : void
ShellView ( ) : BExplorer.Shell._Plugin_Interfaces

Main constructor

ShowPropPage ( IntPtr HWND, String filename, String proppage ) : void
UnvalidateDirectory ( ) : void

Invalidates the director

Starts restarts _UnvalidateTimer

UpdateItem ( IListItemEx obj1, IListItemEx obj2 ) : void
UpdateItem ( Int32 index ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

OnDragDrop ( System.Windows.Forms e ) : void
OnDragEnter ( System.Windows.Forms e ) : void
OnDragLeave ( EventArgs e ) : void
OnDragOver ( System.Windows.Forms e ) : void
OnGiveFeedback ( System.Windows.Forms e ) : void
OnHandleCreated ( EventArgs e ) : void
OnHandleDestroyed ( EventArgs e ) : void
OnQueryContinueDrag ( System.Windows.Forms e ) : void
OnSizeChanged ( EventArgs e ) : void

Private Methods

Method Description
AutosizeColumn ( Int32 index, Int32 autosizeStyle ) : void
Column_OnClick ( Int32 iItem ) : void
Do_Copy_OR_Move_Helper ( Boolean copy, IListItemEx destination, IShellItem items ) : void
Do_Copy_OR_Move_Helper_2 ( Boolean copy, IListItemEx destination, System.Windows.Forms dataObject ) : void
Drag_SetEffect ( System.Windows.Forms e ) : void
DrawComputerTiledModeView ( IListItemEx sho, Graphics g, RectangleF lblrectTiles, StringFormat fmt ) : void
DrawNormalFolderSubitemsInTiledView ( IListItemEx sho, RectangleF lblrectTiles, Graphics g, StringFormat fmt ) : void
EndLabelEdit ( Boolean isCancel = false ) : void
GenerateGroupsFromColumn ( Collumns col, Boolean reversed = false ) : void
GetBadgeForPath ( String path ) : IListItemEx
GetFilePropertiesString ( Object value ) : String
GetFirstIndexOf ( String search, Int32 startindex ) : Int32

Returns the index of the first item whose display name starts with the search string.

GetFirstSelectedItem ( ) : IListItemEx
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

LoadSettingsFromDatabase ( IListItemEx directory, FolderSettings &folderSettings ) : Boolean
Navigate ( IListItemEx destination, Boolean isInSameTab = false, Boolean refresh = false, Boolean isCancel = false ) : void
NavigateSearch ( IListItemEx destination, Boolean isInSameTab = false, Boolean refresh = false, Boolean isCancel = false ) : void
OnItemMiddleClick ( ) : void
OnSelectionChanged ( ) : void
PrepareSearchQuery ( String query ) : String
ProcessCustomDraw ( Message &m, NMHDR &nmhdr ) : void
ProcessCustomDrawPostPaint ( Message &m, User32 nmlvcd, Int32 index, IntPtr hdc, IListItemEx sho, Color textColor ) : void
ProcessShellNotifications ( Message &m ) : void
QueueDeleteItem ( FileSystemEventArgs args ) : void
RedrawWindow ( ) : void
RedrawWindow ( User32 rect ) : void
RenameItem ( Int32 index ) : void
ResortListViewItems ( ) : void
RetrieveThumbnailByIndex ( Int32 index ) : void
SetSortIcon ( Int32 columnIndex, SortOrder order ) : void

This is only to be used in SetSortCollumn(...)

ShellView_GotFocus ( ) : void
ShellView_KeyDown ( Keys e ) : Boolean
ShellView_MouseUp ( Object sender, MouseEventArgs e ) : void
StartProcessInCurrentDirectory ( IListItemEx item ) : void
ThreadRun_Helper ( SyncQueue queue, Boolean useComplexCheck, Int32 &index ) : Boolean
ToLvItemIndex ( Int32 index ) : LVITEMINDEX
UpdateColsInView ( Boolean isDetails = false ) : void
UpdateIconCacheForFolder ( String wszPath ) : void
WndProc ( Message &m ) : void
_MaintenanceTimer_Tick ( Object sender, EventArgs e ) : void
_UnvalidateTimer_Tick ( Object sender, EventArgs e ) : void
resetTimer_Tick ( Object sender, EventArgs e ) : void
selectionTimer_Tick ( Object sender, EventArgs e ) : void

Method Details

AutosizeAllColumns() public method

Automatically resize all controls
public AutosizeAllColumns ( Int32 autosizeParam ) : void
autosizeParam System.Int32 ??
return void

CancelNavigation() public method

Cancels navigation
public CancelNavigation ( ) : void
return void

ClearFolderIcon() public method

Removes the folder's icon
public ClearFolderIcon ( String wszPath ) : HResult
wszPath String ??
return HResult

CopySelectedFiles() public method

public CopySelectedFiles ( ) : void
return void

CreateNewFolder() public method

Creates a new folder in the current directory and assigns a default name if none is specified. Returns the name
public CreateNewFolder ( String name ) : String
name String The name of the new folder
return String

CreateNewLibrary() public method

Creates a new library folder
public CreateNewLibrary ( String name ) : ShellLibrary
name String The name of the lbrary folder youi want
return ShellLibrary

CutSelectedFiles() public method

public CutSelectedFiles ( ) : void
return void

DeSelectAllItems() public method

Sets focus to tis control then deselects all items
public DeSelectAllItems ( ) : void
return void

DeleteSelectedFiles() public method

public DeleteSelectedFiles ( Boolean isRecycling ) : void
isRecycling Boolean
return void

DisableGroups() public method

Disables/Removes grouping
public DisableGroups ( ) : void
return void

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

DoCopy() public method

public DoCopy ( System.Windows.Forms dataObject, IListItemEx destination ) : void
dataObject System.Windows.Forms
destination IListItemEx
return void

DoCopy() public method

public DoCopy ( IListItemEx destination ) : void
destination IListItemEx
return void

DoCopy() public method

public DoCopy ( System dataObject, IListItemEx destination ) : void
dataObject System
destination IListItemEx
return void

DoMove() public method

public DoMove ( System.Windows.Forms dataObject, IListItemEx destination ) : void
dataObject System.Windows.Forms
destination IListItemEx
return void

DoMove() public method

public DoMove ( IListItemEx destination ) : void
destination IListItemEx
return void

DoMove() public method

public DoMove ( System dataObject, IListItemEx destination ) : void
dataObject System
destination IListItemEx
return void

EnableGroups() public method

Enables/Adds groupings
public EnableGroups ( ) : void
return void

Focus() public method

Gives the ShellListView focus
public Focus ( Boolean isActiveCheck = true, Boolean isForce = false ) : void
isActiveCheck Boolean Require this application's MainWindow to be activate the control
isForce Boolean Force this to make the control active no matter what
return void

GetFirstSelectedItemIndex() public method

Returns the first selected item's index OR -1 if there is no selected item
public GetFirstSelectedItemIndex ( ) : Int32
return Int32

GetGroupIndex() public method

public GetGroupIndex ( Int32 itemIndex ) : Int32
itemIndex Int32
return Int32

GetIntPtrFromData() public static method

public static GetIntPtrFromData ( Object data ) : IntPtr
data Object
return IntPtr

GetSelectedCount() public method

public GetSelectedCount ( ) : Int32
return Int32

InsertNewItem() public method

Inserts a new item into the control If and only If it is new. Returns the item's index OR -1 if already existing
public InsertNewItem ( IListItemEx obj ) : Int32
obj IListItemEx The item you want to insert
return Int32

InvertSelection() public method

Inverse the selection of items
public InvertSelection ( ) : void
return void

IsDropDescriptionValid() public static method

public static IsDropDescriptionValid ( System dataObject ) : Boolean
dataObject System
return Boolean

IsShowingLayered() public static method

public static IsShowingLayered ( System.Windows.Forms dataObject ) : Boolean
dataObject System.Windows.Forms
return Boolean

NavigateParent() public method

Navigates to the parent of the currently displayed folder.
public NavigateParent ( ) : void
return void

Navigate_Full() public method

Navigate to a folder, set it as the current folder and optionally save the folder's settings to the database.
public Navigate_Full ( IListItemEx destination, Boolean saveFolderSettings, Boolean isInSameTab = false, Boolean refresh = false ) : void
destination IListItemEx The folder you want to navigate to.
saveFolderSettings Boolean Should the folder's settings be saved?
isInSameTab Boolean
refresh Boolean Should the List be Refreshed?
return void

Navigate_Full() public method

Navigates to a search folder
public Navigate_Full ( String SearchQuery, Boolean saveFolderSettings, Boolean isInSameTab = false, Boolean refresh = false ) : void
SearchQuery String The query of the search
saveFolderSettings Boolean Should the folder's settings be saved?
isInSameTab Boolean
refresh Boolean Should the List be Refreshed?
return void

OnDragDrop() protected method

protected OnDragDrop ( System.Windows.Forms e ) : void
e System.Windows.Forms
return void

OnDragEnter() protected method

protected OnDragEnter ( System.Windows.Forms e ) : void
e System.Windows.Forms
return void

OnDragLeave() protected method

protected OnDragLeave ( EventArgs e ) : void
e EventArgs
return void

OnDragOver() protected method

protected OnDragOver ( System.Windows.Forms e ) : void
e System.Windows.Forms
return void

OnGiveFeedback() protected method

protected OnGiveFeedback ( System.Windows.Forms e ) : void
e System.Windows.Forms
return void

OnHandleCreated() protected method

protected OnHandleCreated ( EventArgs e ) : void
e EventArgs
return void

OnHandleDestroyed() protected method

protected OnHandleDestroyed ( EventArgs e ) : void
e EventArgs
return void

OnQueryContinueDrag() protected method

protected OnQueryContinueDrag ( System.Windows.Forms e ) : void
e System.Windows.Forms
return void

OnSizeChanged() protected method

protected OnSizeChanged ( EventArgs e ) : void
e EventArgs
return void

OpenOrNavigateItem() public method

If the Current item IsFolder Then navigate to it Else open item
public OpenOrNavigateItem ( ) : void
return void

OpenShareUI() public method

public OpenShareUI ( ) : void
return void

PasteAvailableFiles() public method

public PasteAvailableFiles ( ) : void
return void

RaiseItemUpdated() public method

public RaiseItemUpdated ( ItemUpdateType type, IListItemEx old, IListItemEx newItem, Int32 index ) : void
type ItemUpdateType
old IListItemEx
newItem IListItemEx
index Int32
return void

RaiseMiddleClickOnItem() public method

public RaiseMiddleClickOnItem ( IListItemEx item ) : void
item IListItemEx
return void

RaiseRecycleBinUpdated() public method

public RaiseRecycleBinUpdated ( ) : void
return void

RedrawItem() public method

public RedrawItem ( Int32 index, Int32 delay = -1 ) : void
index Int32
delay Int32
return void

RefreshContents() public method

Refreshes the contact (by navigating to the current folder If and only If the current folder is not null)
public RefreshContents ( ) : void
return void

RefreshItem() public method

Refreshes a single item
public RefreshItem ( Int32 index, Boolean isForceRedraw = false ) : void
index Int32 The index of the item you want to refresh
isForceRedraw Boolean If True Resets everything in the Item to indicate that it needs to be refreshed/reloaded
return void

RemoveAllCollumns() public method

public RemoveAllCollumns ( ) : void
return void

RenameSelectedItem() public method

Renames the first selected item
public RenameSelectedItem ( ) : void
return void

RenameSelectedItem() public method

Renames the item at the specified index
public RenameSelectedItem ( Int32 index ) : void
index Int32 The index of the item you want to rename
return void

RenameShellItem() public method

public RenameShellItem ( IShellItem item, String newName, Boolean isAddFileExtension, String extension = "" ) : void
item IShellItem
newName String
isAddFileExtension Boolean
extension String
return void

ResetFolderSettings() public method

Resets the current folder's settings by deting it from the SQLIte database
public ResetFolderSettings ( ) : void
return void

ResizeIcons() public method

Resizes the icons
public ResizeIcons ( Int32 value ) : void
value Int32 The icon size you want
return void

SaveSettingsToDatabase() public method

Saves the current destination settings to the SQLite database
public SaveSettingsToDatabase ( IListItemEx destination ) : void
destination IListItemEx The destination whos settings you want to save
return void

SelectAll() public method

Selects all items and sets this to focus
public SelectAll ( ) : void
return void

SelectItemByIndex() public method

Set this to focus then select an item by its index
public SelectItemByIndex ( Int32 index, Boolean ensureVisability = false, Boolean deselectOthers = false ) : void
index Int32 Index of item
ensureVisability Boolean Ensure that the item is visible?
deselectOthers Boolean Deselect all other items?
return void

SelectItems() public method

Selects only the specified items. First runs DeSelectAllItems Then selects all items on a separate thread.
public SelectItems ( IListItemEx shellObjectArray ) : void
shellObjectArray IListItemEx
return void

SetColInView() public method

public SetColInView ( Collumns col, Boolean remove ) : void
col Collumns
remove Boolean
return void

SetFolderIcon() public method

Sets the folder's icon
public SetFolderIcon ( String wszPath, String wszExpandedIconPath, Int32 iIcon ) : void
wszPath String ??
wszExpandedIconPath String ??
iIcon Int32 ??
return void

SetGroupOrder() public method

Sets the Sort order of the Groups
public SetGroupOrder ( Boolean reverse = true ) : void
reverse Boolean Reverse the Current Sort Order?
return void

SetSortCollumn() public method

public SetSortCollumn ( Boolean isReorder, Collumns column, SortOrder order, Boolean reverseOrder = true ) : void
isReorder Boolean
column Collumns
order SortOrder
reverseOrder Boolean
return void

ShellView() public method

Main constructor
public ShellView ( ) : BExplorer.Shell._Plugin_Interfaces
return BExplorer.Shell._Plugin_Interfaces

ShowPropPage() public method

public ShowPropPage ( IntPtr HWND, String filename, String proppage ) : void
HWND IntPtr
filename String
proppage String
return void

UnvalidateDirectory() public method

Invalidates the director
Starts restarts _UnvalidateTimer
public UnvalidateDirectory ( ) : void
return void

UpdateItem() public method

public UpdateItem ( IListItemEx obj1, IListItemEx obj2 ) : void
obj1 IListItemEx
obj2 IListItemEx
return void

UpdateItem() public method

public UpdateItem ( Int32 index ) : void
index Int32
return void

Property Details

AllAvailableColumns public_oe property

public Dictionary AllAvailableColumns
return Collumns>.Dictionary

BadgesData public_oe property

public Dictionary>> BadgesData
return Dictionary>>

Collumns public_oe property

public List Collumns
return List

CurrentRefreshedItemIndex public_oe property

public Int32 CurrentRefreshedItemIndex
return Int32

Groups public_oe property

public List Groups
return List

IsCancelRequested public_oe property

public Boolean IsCancelRequested
return Boolean

IsFocusAllowed public_oe property

public Boolean IsFocusAllowed
return Boolean

IsNavigationCancelRequested public_oe property

public Boolean IsNavigationCancelRequested
return Boolean

IsNavigationInProgress public_oe property

public Boolean IsNavigationInProgress
return Boolean

IsRenameInProgress public_oe property

public Boolean IsRenameInProgress
return Boolean

IsSearchNavigating public_oe property

Are we/have we navigated to a search folder
public Boolean IsSearchNavigating
return Boolean

IsViewSelectionAllowed public_oe property

public Boolean IsViewSelectionAllowed
return Boolean

LargeImageList public_oe property

public ImageListEx LargeImageList
return ImageListEx

SmallImageList public_oe property

public ImageListEx SmallImageList
return ImageListEx

ToolTip public_oe property

public ToolTip ToolTip
return ToolTip