Ejemplo n.º 1
0
 private void MakeUsers(TreeNode treeNode, MongoDB.Driver.MongoDatabase mongoDatabase, bool bRefresh)
 {
     //throw new NotImplementedException();
     if (bRefresh) treeNode.Nodes.Clear();
     if (treeNode.Nodes.Count <= 0)
     {
         Log("db.system.users.find()");
         foreach (MongoDB.Driver.MongoUser mu in mongoDatabase.FindAllUsers())
         {
             Data.MTag mt = new Data.MTag(Data.Data.DbCludes.user);
             mt.tag = mu;
             TreeNode tn = new TreeNode(mu.Username);
             tn.ImageIndex = (int)Data.Data.DbCludes.user;
             tn.SelectedImageIndex = (int)Data.Data.DbCludes.user;
             tn.Tag = mt;
             treeNode.Nodes.Add(tn);
         }
         treeNode.ExpandAll();
     }
 }