public void LoadTreeView()
        {
            if (InvokeRequired)
            {
                MethodInvoker mi = delegate { LoadTreeView(); };
                Controller.SafeInvoke(this, mi);
                return;
            }
            treeList1.BeginUpdate();
            treeList1.Nodes.Clear();

            if (RootPreviewObjects != null)
            {
                foreach (object rootObject in RootPreviewObjects)
                {
                    AddObjectToTreeview(rootObject, null);
                }
            }
            else
            {
                MessageBox.Show(this, string.Format("The following ArchAngel Provider ({0}) has not \nimplemented the RootPreviewObjects method correctly - it is returning 'null'. \nPlease contact the vendor of this provider.", Path.GetFileName(TypeOfObject.Assembly.CodeBase)), "Invalid ArchAngel Provider", MessageBoxButtons.OK, MessageBoxIcon.Error);
                this.Close();
            }
            Slyce.Common.TreelistUtility.TreelistNodeComparer comparer = new Slyce.Common.TreelistUtility.TreelistNodeComparer(Slyce.Common.TreelistUtility.TreelistNodeComparer.SortDirection.Ascending, 0);
            Slyce.Common.TreelistUtility.SortNodes(treeList1, comparer);

            treeList1.EndUpdate();
            IsPopulated = true;
        }
        public void LoadTreeView()
        {
            if (InvokeRequired)
            {
                MethodInvoker mi = delegate { LoadTreeView(); };
                Controller.SafeInvoke(this, mi);
                return;
            }
            treeList1.BeginUpdate();
            treeList1.Nodes.Clear();

            if (RootPreviewObjects != null)
            {
                foreach (object rootObject in RootPreviewObjects)
                {
                    AddObjectToTreeview(rootObject, null);
                }
            }
            else
            {
                MessageBox.Show(this, string.Format("The following ArchAngel Provider ({0}) has not \nimplemented the RootPreviewObjects method correctly - it is returning 'null'. \nPlease contact the vendor of this provider.", Path.GetFileName(TypeOfObject.Assembly.CodeBase)), "Invalid ArchAngel Provider", MessageBoxButtons.OK, MessageBoxIcon.Error);
                this.Close();
            }
            Slyce.Common.TreelistUtility.TreelistNodeComparer comparer = new Slyce.Common.TreelistUtility.TreelistNodeComparer(Slyce.Common.TreelistUtility.TreelistNodeComparer.SortDirection.Ascending, 0);
            Slyce.Common.TreelistUtility.SortNodes(treeList1, comparer);

            treeList1.EndUpdate();
            IsPopulated = true;
        }