protected override void LoadChildren()
 {
     foreach (SasCatalog cat in _library.GetSasCatalogMembers())
     {
         base.Children.Add(new CatalogViewModel(cat, this));
     }
 }
Exemplo n.º 2
0
        // read list of catalogs for the given library (in the tree node)
        private void PopulateCatalogs(TreeNode tn)
        {
            Cursor c = Cursor.Current;

            Cursor.Current = Cursors.WaitCursor;

            tvLibsCats.BeginUpdate();

            if (tn != null)
            {
                SasLibrary l = new SasLibrary(currentServer, tn.Text);
                if (l != null)
                {
                    foreach (SasCatalog cat in l.GetSasCatalogMembers())
                    {
                        TreeNode catNode = tn.Nodes.Add(cat.Name);
                        catNode.ImageIndex         = (int)CatImages.Catalog;
                        catNode.SelectedImageIndex = (int)CatImages.Catalog;
                        catNode.Tag = "CATALOG";
                    }
                }
            }

            tvLibsCats.EndUpdate();

            Cursor.Current = c;

            UpdateToolbar();
        }