C# Class ImageGlass.ImageListView.ImageListView

Inheritance: System.Windows.Forms.Control, IComponent
Show file Open project: d2phap/ImageGlass Class Usage Examples

Private Properties

Property Type Description
CanPaint bool
GetVisibleItems bool>.Dictionary
IsItemDirty bool
IsItemVisible ItemVisibility
IsItemVisible bool
OnCacheErrorInternal void
OnItemCheckBoxClickInternal void
OnSelectionChangedInternal void
OnThumbnailCachedInternal void
OnThumbnailCachingInternal void
Refresh void
Refresh void
Refresh void
ResumePaint void
SuspendPaint void
UpdateItemDetailsInternal void
hScrollBar_Scroll void
lazyRefreshTimer_Tick void
vScrollBar_Scroll void

Public Methods

Method Description
CheckAll ( ) : void

Marks all items as checked.

ClearSelection ( ) : void

Marks all items as unselected.

ClearThumbnailCache ( ) : void

Clears the thumbnail cache.

DisableAll ( ) : void

Marks all items as disabled.

EnableAll ( ) : void

Marks all items as enabled.

EnsureVisible ( int itemIndex ) : bool

Scrolls the image list view to ensure that the item with the specified index is visible on the screen.

FindString ( string s ) : int

Finds the first item that starts with the specified string.

FindString ( string s, int startIndex ) : int

Finds the first item that starts with the specified string.

HitTest ( Point pt, HitInfo &hitInfo ) : void

Determines the image list view element under the specified coordinates.

ImageListView ( ) : System

Initializes a new instance of the ImageListView class.

InvertCheckState ( ) : void

Reverses the check state of all items.

InvertSelection ( ) : void

Reverses the selection state of all items.

IsItemVisible ( ImageListViewItem item ) : ItemVisibility

Determines whether the specified item is visible on the screen.

ResetColors ( ) : void

Resets the colors to their default value.

ResetDefaultImage ( ) : void

Resets the default image to its default value.

ResetEmptyRatingImage ( ) : void

Resets the empty rating image to its default value.

ResetErrorImage ( ) : void

Resets the error image to its default value.

ResetHeaderFont ( ) : void

Resets the header font to its default value.

ResetRatingImage ( ) : void

Resets the rating image to its default value.

ResumeLayout ( ) : void

Resumes usual layout logic.

ResumeLayout ( bool performLayout ) : void

Resumes usual layout logic, optionally forcing an immediate layout of pending layout requests.

SelectAll ( ) : void

Marks all items as selected.

SetRenderer ( ImageListViewRenderer renderer ) : void

Sets the renderer for this instance.

SetRenderer ( ImageListViewRenderer renderer, bool keepColors ) : void

Sets the renderer for this instance.

ShouldSerializeColors ( ) : bool

Determines if the colors should be serialized.

ShouldSerializeDefaultImage ( ) : bool

Determines if the default image should be serialized.

ShouldSerializeEmptyRatingImage ( ) : bool

Determines if the empty rating image should be serialized.

ShouldSerializeErrorImage ( ) : bool

Determines if the error image should be serialized.

ShouldSerializeHeaderFont ( ) : bool

Determines if the header font should be serialized.

ShouldSerializeRatingImage ( ) : bool

Determines if the rating image should be serialized.

Sort ( ) : void

Sorts the items.

SuspendLayout ( ) : void

Temporarily suspends the layout logic for the control.

UncheckAll ( ) : void

Marks all items as unchecked.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the control and its child controls and optionally releases the managed resources.

IsInputKey ( Keys keyData ) : bool

Handles the IsInputKey event.

OnCacheError ( CacheErrorEventArgs e ) : void

Raises the CacheError event.

OnColumnClick ( ColumnClickEventArgs e ) : void

Raises the ColumnClick event.

OnColumnHover ( ColumnHoverEventArgs e ) : void

Raises the ColumnHover event.

OnColumnWidthChanged ( ColumnEventArgs e ) : void

Raises the ColumnWidthChanged event.

OnDragDrop ( DragEventArgs e ) : void

Handles the DragDrop event.

OnDragEnter ( DragEventArgs e ) : void

Handles the DragEnter event.

OnDragLeave ( EventArgs e ) : void

Handles the DragLeave event.

OnDragOver ( DragEventArgs e ) : void

Handles the DragOver event.

OnDropFiles ( DropFileEventArgs e ) : void

Raises the DropFiles event.

OnGotFocus ( EventArgs e ) : void

Handles the GotFocus event.

OnItemCheckBoxClick ( ItemEventArgs e ) : void

Raises the ItemCheckBoxClick event.

OnItemClick ( ItemClickEventArgs e ) : void

Raises the ItemClick event.

OnItemCollectionChanged ( ItemCollectionChangedEventArgs e ) : void

Raises the ItemCollectionChanged event.

OnItemDoubleClick ( ItemClickEventArgs e ) : void

Raises the ItemDoubleClick event.

OnItemHover ( ItemHoverEventArgs e ) : void

Raises the ItemHover event.

OnKeyDown ( KeyEventArgs e ) : void

Handles the KeyDown event.

OnKeyUp ( KeyEventArgs e ) : void

Handles the KeyUp event.

OnLostFocus ( EventArgs e ) : void

Handles the LostFocus event.

OnMouseDoubleClick ( MouseEventArgs e ) : void

Handles the MouseDoubleClick event.

OnMouseDown ( MouseEventArgs e ) : void

Handles the MouseDown event.

OnMouseLeave ( EventArgs e ) : void

Handles the MouseLeave event.

OnMouseMove ( MouseEventArgs e ) : void

Handles the MouseMove event.

OnMouseUp ( MouseEventArgs e ) : void

Handles the MouseUp event.

OnMouseWheel ( MouseEventArgs e ) : void

Handles the MouseWheel event.

OnPaint ( PaintEventArgs e ) : void

Handles the Paint event.

OnPaneResized ( PaneResizedEventArgs e ) : void

Raises the PaneReszied event.

OnPaneResizing ( PaneResizingEventArgs e ) : void

Raises the PaneResizing event.

OnResize ( EventArgs e ) : void

Handles the Resize event.

OnSelectionChanged ( EventArgs e ) : void

Raises the SelectionChanged event.

OnThumbnailCached ( ThumbnailCachedEventArgs e ) : void

Raises the ThumbnailCached event.

OnThumbnailCaching ( ThumbnailCachingEventArgs e ) : void

Raises the ThumbnailCaching event.

Private Methods

Method Description
CanPaint ( ) : bool

Determines if the control can be painted.

GetVisibleItems ( ) : bool>.Dictionary

Gets the guids of visible items.

IsItemDirty ( Guid guid ) : bool

Determines whether the specified item is modified.

IsItemVisible ( int itemIndex ) : ItemVisibility

Determines whether the specified item is visible on the screen.

IsItemVisible ( Guid guid ) : bool

Determines whether the specified item is visible on the screen.

OnCacheErrorInternal ( Guid guid, Exception error, CacheThread cacheThread ) : void

Raises the CacheError event. This method is invoked from the thumbnail thread.

OnItemCheckBoxClickInternal ( ImageListViewItem item ) : void

Raises the ItemCheckBoxClick event.

OnSelectionChangedInternal ( ) : void

Raises the SelectionChanged event.

OnThumbnailCachedInternal ( Guid guid, Image thumbnail, Size size, bool thumbnailImage ) : void

Raises the ThumbnailCached event. This method is invoked from the thumbnail thread.

OnThumbnailCachingInternal ( Guid guid, Size size ) : void

Raises the ThumbnailCaching event. This method is invoked from the thumbnail thread.

Refresh ( ) : void

Redraws the owner control.

Refresh ( bool force ) : void

Redraws the owner control.

Refresh ( bool force, bool lazy ) : void

Refreshes the control.

ResumePaint ( ) : void

Resumes painting. This call must be matched by a prior SuspendPaint call.

SuspendPaint ( ) : void

Suspends painting until a matching ResumePaint call is made.

UpdateItemDetailsInternal ( Guid guid, Utility details ) : void

Updates item details. This method is invoked from the item cache thread.

hScrollBar_Scroll ( object sender, ScrollEventArgs e ) : void

Handles the Scroll event of the hScrollBar control.

lazyRefreshTimer_Tick ( object sender, EventArgs e ) : void

Handles the Tick event of the lazyRefreshTimer control.

vScrollBar_Scroll ( object sender, ScrollEventArgs e ) : void

Handles the Scroll event of the vScrollBar control.

Method Details

CheckAll() public method

Marks all items as checked.
public CheckAll ( ) : void
return void

ClearSelection() public method

Marks all items as unselected.
public ClearSelection ( ) : void
return void

ClearThumbnailCache() public method

Clears the thumbnail cache.
public ClearThumbnailCache ( ) : void
return void

DisableAll() public method

Marks all items as disabled.
public DisableAll ( ) : void
return void

Dispose() protected method

Releases the unmanaged resources used by the control and its child controls and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; /// false to release only unmanaged resources.
return void

EnableAll() public method

Marks all items as enabled.
public EnableAll ( ) : void
return void

EnsureVisible() public method

Scrolls the image list view to ensure that the item with the specified index is visible on the screen.
public EnsureVisible ( int itemIndex ) : bool
itemIndex int The index of the item to make visible.
return bool

FindString() public method

Finds the first item that starts with the specified string.
public FindString ( string s ) : int
s string The text to search for.
return int

FindString() public method

Finds the first item that starts with the specified string.
public FindString ( string s, int startIndex ) : int
s string The text to search for.
startIndex int The zero-based index of the first /// item to be searched. Set to zero to search from the /// beginning of the control.
return int

HitTest() public method

Determines the image list view element under the specified coordinates.
public HitTest ( Point pt, HitInfo &hitInfo ) : void
pt Point The client coordinates of the point to be tested.
hitInfo HitInfo Details of the hit test.
return void

ImageListView() public method

Initializes a new instance of the ImageListView class.
public ImageListView ( ) : System
return System

InvertCheckState() public method

Reverses the check state of all items.
public InvertCheckState ( ) : void
return void

InvertSelection() public method

Reverses the selection state of all items.
public InvertSelection ( ) : void
return void

IsInputKey() protected method

Handles the IsInputKey event.
protected IsInputKey ( Keys keyData ) : bool
keyData Keys One of the values.
return bool

IsItemVisible() public method

Determines whether the specified item is visible on the screen.
public IsItemVisible ( ImageListViewItem item ) : ItemVisibility
item ImageListViewItem The item to test.
return ItemVisibility

OnCacheError() protected method

Raises the CacheError event.
protected OnCacheError ( CacheErrorEventArgs e ) : void
e CacheErrorEventArgs A CacheErrorEventArgs that contains event data.
return void

OnColumnClick() protected method

Raises the ColumnClick event.
protected OnColumnClick ( ColumnClickEventArgs e ) : void
e ColumnClickEventArgs A ColumnClickEventArgs that contains event data.
return void

OnColumnHover() protected method

Raises the ColumnHover event.
protected OnColumnHover ( ColumnHoverEventArgs e ) : void
e ColumnHoverEventArgs A ColumnClickEventArgs that contains event data.
return void

OnColumnWidthChanged() protected method

Raises the ColumnWidthChanged event.
protected OnColumnWidthChanged ( ColumnEventArgs e ) : void
e ColumnEventArgs A ColumnEventArgs that contains event data.
return void

OnDragDrop() protected method

Handles the DragDrop event.
protected OnDragDrop ( DragEventArgs e ) : void
e DragEventArgs A that contains the event data.
return void

OnDragEnter() protected method

Handles the DragEnter event.
protected OnDragEnter ( DragEventArgs e ) : void
e DragEventArgs A that contains the event data.
return void

OnDragLeave() protected method

Handles the DragLeave event.
protected OnDragLeave ( EventArgs e ) : void
e EventArgs An that contains the event data.
return void

OnDragOver() protected method

Handles the DragOver event.
protected OnDragOver ( DragEventArgs e ) : void
e DragEventArgs A that contains the event data.
return void

OnDropFiles() protected method

Raises the DropFiles event.
protected OnDropFiles ( DropFileEventArgs e ) : void
e DropFileEventArgs A DropFileEventArgs that contains event data.
return void

OnGotFocus() protected method

Handles the GotFocus event.
protected OnGotFocus ( EventArgs e ) : void
e EventArgs An that contains the event data.
return void

OnItemCheckBoxClick() protected method

Raises the ItemCheckBoxClick event.
protected OnItemCheckBoxClick ( ItemEventArgs e ) : void
e ItemEventArgs A ItemEventArgs that contains event data.
return void

OnItemClick() protected method

Raises the ItemClick event.
protected OnItemClick ( ItemClickEventArgs e ) : void
e ItemClickEventArgs A ItemClickEventArgs that contains event data.
return void

OnItemCollectionChanged() protected method

Raises the ItemCollectionChanged event.
protected OnItemCollectionChanged ( ItemCollectionChangedEventArgs e ) : void
e ItemCollectionChangedEventArgs A ItemCollectionChangedEventArgs that contains event data.
return void

OnItemDoubleClick() protected method

Raises the ItemDoubleClick event.
protected OnItemDoubleClick ( ItemClickEventArgs e ) : void
e ItemClickEventArgs A ItemClickEventArgs that contains event data.
return void

OnItemHover() protected method

Raises the ItemHover event.
protected OnItemHover ( ItemHoverEventArgs e ) : void
e ItemHoverEventArgs A ItemClickEventArgs that contains event data.
return void

OnKeyDown() protected method

Handles the KeyDown event.
protected OnKeyDown ( KeyEventArgs e ) : void
e KeyEventArgs A that contains the event data.
return void

OnKeyUp() protected method

Handles the KeyUp event.
protected OnKeyUp ( KeyEventArgs e ) : void
e KeyEventArgs A that contains the event data.
return void

OnLostFocus() protected method

Handles the LostFocus event.
protected OnLostFocus ( EventArgs e ) : void
e EventArgs An that contains the event data.
return void

OnMouseDoubleClick() protected method

Handles the MouseDoubleClick event.
protected OnMouseDoubleClick ( MouseEventArgs e ) : void
e MouseEventArgs An that contains the event data.
return void

OnMouseDown() protected method

Handles the MouseDown event.
protected OnMouseDown ( MouseEventArgs e ) : void
e MouseEventArgs A that contains the event data.
return void

OnMouseLeave() protected method

Handles the MouseLeave event.
protected OnMouseLeave ( EventArgs e ) : void
e EventArgs An that contains the event data.
return void

OnMouseMove() protected method

Handles the MouseMove event.
protected OnMouseMove ( MouseEventArgs e ) : void
e MouseEventArgs A that contains the event data.
return void

OnMouseUp() protected method

Handles the MouseUp event.
protected OnMouseUp ( MouseEventArgs e ) : void
e MouseEventArgs A that contains the event data.
return void

OnMouseWheel() protected method

Handles the MouseWheel event.
protected OnMouseWheel ( MouseEventArgs e ) : void
e MouseEventArgs A that contains the event data.
return void

OnPaint() protected method

Handles the Paint event.
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs A that contains the event data.
return void

OnPaneResized() protected method

Raises the PaneReszied event.
protected OnPaneResized ( PaneResizedEventArgs e ) : void
e PaneResizedEventArgs A PaneResizedEventArgs that contains event data.
return void

OnPaneResizing() protected method

Raises the PaneResizing event.
protected OnPaneResizing ( PaneResizingEventArgs e ) : void
e PaneResizingEventArgs A PaneResizingEventArgs that contains event data.
return void

OnResize() protected method

Handles the Resize event.
protected OnResize ( EventArgs e ) : void
e EventArgs An that contains the event data.
return void

OnSelectionChanged() protected method

Raises the SelectionChanged event.
protected OnSelectionChanged ( EventArgs e ) : void
e EventArgs A EventArgs that contains event data.
return void

OnThumbnailCached() protected method

Raises the ThumbnailCached event.
protected OnThumbnailCached ( ThumbnailCachedEventArgs e ) : void
e ThumbnailCachedEventArgs A ThumbnailCachedEventArgs that contains event data.
return void

OnThumbnailCaching() protected method

Raises the ThumbnailCaching event.
protected OnThumbnailCaching ( ThumbnailCachingEventArgs e ) : void
e ThumbnailCachingEventArgs A ThumbnailCachingEventArgs that contains event data.
return void

ResetColors() public method

Resets the colors to their default value.
public ResetColors ( ) : void
return void

ResetDefaultImage() public method

Resets the default image to its default value.
public ResetDefaultImage ( ) : void
return void

ResetEmptyRatingImage() public method

Resets the empty rating image to its default value.
public ResetEmptyRatingImage ( ) : void
return void

ResetErrorImage() public method

Resets the error image to its default value.
public ResetErrorImage ( ) : void
return void

ResetHeaderFont() public method

Resets the header font to its default value.
public ResetHeaderFont ( ) : void
return void

ResetRatingImage() public method

Resets the rating image to its default value.
public ResetRatingImage ( ) : void
return void

ResumeLayout() public method

Resumes usual layout logic.
public ResumeLayout ( ) : void
return void

ResumeLayout() public method

Resumes usual layout logic, optionally forcing an immediate layout of pending layout requests.
public ResumeLayout ( bool performLayout ) : void
performLayout bool true to execute pending layout requests; otherwise, false.
return void

SelectAll() public method

Marks all items as selected.
public SelectAll ( ) : void
return void

SetRenderer() public method

Sets the renderer for this instance.
public SetRenderer ( ImageListViewRenderer renderer ) : void
renderer ImageListViewRenderer An to assign to the control.
return void

SetRenderer() public method

Sets the renderer for this instance.
public SetRenderer ( ImageListViewRenderer renderer, bool keepColors ) : void
renderer ImageListViewRenderer An to assign to the control.
keepColors bool true to keep current colors; otherwise false.
return void

ShouldSerializeColors() public method

Determines if the colors should be serialized.
public ShouldSerializeColors ( ) : bool
return bool

ShouldSerializeDefaultImage() public method

Determines if the default image should be serialized.
public ShouldSerializeDefaultImage ( ) : bool
return bool

ShouldSerializeEmptyRatingImage() public method

Determines if the empty rating image should be serialized.
public ShouldSerializeEmptyRatingImage ( ) : bool
return bool

ShouldSerializeErrorImage() public method

Determines if the error image should be serialized.
public ShouldSerializeErrorImage ( ) : bool
return bool

ShouldSerializeHeaderFont() public method

Determines if the header font should be serialized.
public ShouldSerializeHeaderFont ( ) : bool
return bool

ShouldSerializeRatingImage() public method

Determines if the rating image should be serialized.
public ShouldSerializeRatingImage ( ) : bool
return bool

Sort() public method

Sorts the items.
public Sort ( ) : void
return void

SuspendLayout() public method

Temporarily suspends the layout logic for the control.
public SuspendLayout ( ) : void
return void

UncheckAll() public method

Marks all items as unchecked.
public UncheckAll ( ) : void
return void