Esempio n. 1
0
 public void AddCx(Repository repos, Repository child, bool selectNode, bool expandNode, bool delaySchemaPopulation, bool updateAllNodeText)
 {
     if (repos.DriverLoader.IsValid)
     {
         RepositoryNode node;
         base.HideSelection = false;
         bool flag = false;
         if (!repos.DynamicSchema)
         {
             node = new StaticSchemaNode(repos);
         }
         else if (repos.IsQueryable)
         {
             node = new DynamicSchemaNode(repos);
         }
         else
         {
             node = new ServerNode(repos);
         }
         try
         {
             base.BeginUpdate();
             base.Nodes.Add(node);
             flag = (!repos.IsQueryable || expandNode) || !delaySchemaPopulation;
             node.ExpandOnUpdate = expandNode;
             DynamicSchemaNode node2 = null;
             if (child != null)
             {
                 DynamicSchemaNode node3 = new DynamicSchemaNode(child) {
                     ExpandOnUpdate = expandNode
                 };
                 node.Nodes.Add(node2 = node3);
             }
             if (flag)
             {
                 node.Init();
             }
             if (selectNode)
             {
                 base.SelectedNode = (node2 != null) ? node2 : node;
             }
             if (updateAllNodeText)
             {
                 this.UpdateAllNodeText();
             }
         }
         finally
         {
             base.EndUpdate();
         }
     }
 }
Esempio n. 2
0
 private void SaveAndUpdateNode()
 {
     this._node.Repository.SaveToDisk();
     this._node.UpdateText();
     foreach (TreeNode node in this._node.Nodes)
     {
         DynamicSchemaNode node2 = node as DynamicSchemaNode;
         if (node2 != null)
         {
             node2.Repository.DisplayName = this._node.Repository.DisplayName;
         }
     }
     this._tree.InvokeCxEdited();
 }