C# Class GUI.Controls.TreeViewWithSearchResults

Exibir arquivo Open project: SteamDatabase/ValveResourceFormat Class Usage Examples

Public Methods

Method Description
TreeViewWithSearchResults ( ) : System

Initializes a new instance of the TreeViewWithSearchResults class. Require a default constructor for the designer.

TreeViewWithSearchResults ( ImageList imageList ) : System

Initializes a new instance of the TreeViewWithSearchResults class. Constructor to require an image list for display on listed TreeView nodes and ListView items.

Private Methods

Method Description
AddNodeToListView ( TreeNode node ) : void
InitializeTreeViewFromPackage ( string name, Package package ) : void

Initializes the TreeView in the control with the contents of the passed Package. Contents are sorted and expanded by default.

MainListView_MouseDoubleClick ( object sender, MouseEventArgs e ) : void

If the user double clicks (with left mouse button) on a ListViewItem, send up an event to subscribers that such an action has occurred. Also send up whatever object is represented by the ListViewItem.

MainListView_MouseDown ( object sender, MouseEventArgs e ) : void

When the user clicks in the ListView, check if the user clicks outside of a ListViewItem. If so, de-select any previously selected ListViewItems. In addition, if the user right clicked an item in the ListView, let our subscribers know what was clicked and where in case a context menu is needed to be shown.

MainListView_Resize ( object sender, EventArgs e ) : void
ResizeListViewColumns ( ) : void
SearchAndFillResults ( string searchText, SearchType selectedSearchType ) : void

Performs a search for the entered text and search types. Before a search is performed, the contents of the ListView (previous search results) are cleared. Results of whatever search function is used are displayed in the ListView with name, file size, and file type.

TreeViewWithSearchResults_Load ( object sender, EventArgs e ) : void

When the form loads, create the columns that we want to see such as name, file size, and file type.

Method Details

TreeViewWithSearchResults() public method

Initializes a new instance of the TreeViewWithSearchResults class. Require a default constructor for the designer.
public TreeViewWithSearchResults ( ) : System
return System

TreeViewWithSearchResults() public method

Initializes a new instance of the TreeViewWithSearchResults class. Constructor to require an image list for display on listed TreeView nodes and ListView items.
public TreeViewWithSearchResults ( ImageList imageList ) : System
imageList ImageList
return System