GUI/Controls/TreeViewWithSearchResults.cs
/// <summary>
/// Initializes the TreeView in the control with the contents of the passed Package. Contents are sorted and expanded by default.
/// </summary>
/// <param name="name">Name of the package.</param>
/// <param name="package">Package object.</param>
Initializes the TreeView in the control with the contents of the passed Package. Contents are sorted and expanded by default.
Initializes the TreeView in the control with the contents of the passed Package . Contents are sorted and expanded by default .
internal void InitializeTreeViewFromPackage(string name, Package package)
        {
            mainListView.Tag = package;
            var control = mainTreeView;
            control.BeginUpdate();
            control.TreeViewNodeSorter = new TreeViewFileSorter();
            control.PathSeparator = Package.DirectorySeparatorChar.ToString();
            control.Name = name;
            control.Tag = package; 
            control.Dock = DockStyle.Fill;
            control.ImageList = imageList;
            control.GenerateIconList(package.Entries.Keys.ToList());
            foreach (var fileType in package.Entries)
            {
                foreach (var file in fileType.Value)
                {
                    control.AddFileNode(file);
                }
            }
            control.EndUpdate();
        }
internal void InitializeTreeViewFromPackage ( string name , Package package ) { mainListView . Tag = package ; var control = mainTreeView ; control . BeginUpdate ( ) ; control . TreeViewNodeSorter = new TreeViewFileSorter ( ) ; control . PathSeparator = Package . DirectorySeparatorChar . ToString ( ) ; control . Name = name ; control . Tag = package ; control . Dock = DockStyle . Fill ; control . ImageList = imageList ; control . GenerateIconList ( package . Entries . Keys . ToList ( ) ) ; foreach ( var fileType in package . Entries ) { foreach ( var file in fileType . Value ) { control . AddFileNode ( file ) ; } } control . EndUpdate ( ) ; }
Initializes the TreeView in the control with the contents of the passed Package.
Initializes the TreeView in the control with the contents of the passed Package .
//so we can access it later
name
string
Name of the package.
Name of the package .
package
Package
None