当前位置: 首页>>代码示例>>C#>>正文


C# TreeView.EndUpdate方法代码示例

本文整理汇总了C#中System.Windows.Forms.TreeView.EndUpdate方法的典型用法代码示例。如果您正苦于以下问题:C# TreeView.EndUpdate方法的具体用法?C# TreeView.EndUpdate怎么用?C# TreeView.EndUpdate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.TreeView的用法示例。


在下文中一共展示了TreeView.EndUpdate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LoadCategoriesView

        public static void LoadCategoriesView(TreeView target, PosData.CategoriesDataTable source)
        {
            var roots = from p in source
                        select p;
            target.BeginUpdate();
            TreeNode currentNode = null;
            foreach (PosData.CategoriesRow row in roots)
            {
                if (row.ParentId == 0)//root nodes only
                {
                    currentNode = new TreeNode(row.CategoryName, 0, 0);
                    currentNode.Tag = row.CategoryId;
                    target.Nodes.Add(currentNode);
                }

                var current = from c in source
                              where c.ParentId == row.CategoryId && c.ParentId != 0L
                              select c;
                if (current != null && current.Count<PosData.CategoriesRow>() > 0)
                {
                    _LoadCategoriesView(currentNode, current, source);
                }

            }
            target.EndUpdate();
        }
开发者ID:okyereadugyamfi,项目名称:okerospos,代码行数:26,代码来源:CategoryBLL.cs

示例2: RefreshTreeView

 public static void RefreshTreeView(TreeView treeView)
 {
     treeView.BeginUpdate();
     foreach (NodeBase node in treeView.Nodes)
         node.Refresh();
     treeView.EndUpdate();
 }
开发者ID:BackupTheBerlios,项目名称:puzzle-svn,代码行数:7,代码来源:TreeViewManager.cs

示例3: OnSynchronizationClick_All

 public void OnSynchronizationClick_All(TextBox tboxPhonePath, TextBox tboxComputerPath,TreeView treeViewPhone, TreeView treeViewComputer)
 {
     SynchronAll synAll = new SynchronAll();
     synAll.Synhronization(tboxPhonePath.Text, tboxComputerPath.Text);
     treeViewPhone.EndUpdate();
     treeViewComputer.EndUpdate();
 }
开发者ID:demchenko23,项目名称:Synchronization,代码行数:7,代码来源:SynchronizationPresenter.cs

示例4: DrawTree

        public void DrawTree(TreeView treeView)
        {
            treeView.BeginUpdate();
            treeView.Nodes["All"].Nodes.Clear();
            foreach (Site site in SiteCollection)
            {
                TreeNode siteNode = new TreeNode(site.Dto.DescriptionName);
                siteNode.Tag = site;
                treeView.Nodes["All"].Nodes.Add(siteNode);
                foreach (Team team in site.TeamColl)
                {
                    TreeNode teamNode = new TreeNode(team.Dto.Description);
                    teamNode.Tag = team;
                    siteNode.Nodes.Add(teamNode);
                    foreach (Agent agent in team.AgentColl)
                    {
                        TreeNode agentNode = new TreeNode(agent.Dto.Name);
                        agentNode.Tag = agent;
                        teamNode.Nodes.Add(agentNode);
                    }
                }
            }

            treeView.EndUpdate();
        }
开发者ID:YuriKorchun,项目名称:TeleoptiTibcoProcessor,代码行数:25,代码来源:Organization.cs

示例5: DisplayTo

 public static void DisplayTo( TreeView tree )
 {
     tree.BeginUpdate();
     tree.Nodes.Clear();
     Recurse( tree.Nodes, Config.GetUserDirectory( "Macros" ) );
     tree.EndUpdate();
     tree.Refresh();
     tree.Update();
 }
开发者ID:herculesjr,项目名称:razor,代码行数:9,代码来源:MacroManager.cs

示例6: RecordStep

 public static void RecordStep(TreeView tree, string step)
 {
     if (tree.Nodes[0] != null)
     {
         tree.BeginUpdate();
         tree.Nodes[0].Nodes.Insert(tree.Nodes[0].Nodes.Count, step);
         tree.EndUpdate();
         tree.ExpandAll();
     }
 }
开发者ID:krishnakanthms,项目名称:recordanywhere,代码行数:10,代码来源:StepRecorder.cs

示例7: OnSynchronizationClick_CP

 public void OnSynchronizationClick_CP(TextBox tboxPhonePath, TextBox tboxComputerPath, TreeView treeViewPhone, TreeView treeViewComputer)
 {
     CheckedNodes check = new CheckedNodes();
     FromCompToPhone synComPhon = new FromCompToPhone();
     SynchronizationFolder synFolder = new SynchronizationFolder();
     synFolder.SynchronFolder(check.CheckedFolder(treeViewComputer.Nodes), tboxPhonePath.Text);
     synComPhon.Synchronization(check.CheckedFiles(treeViewComputer.Nodes), tboxPhonePath.Text, tboxComputerPath.Text);
     treeViewPhone.EndUpdate();
     treeViewComputer.EndUpdate();
 }
开发者ID:demchenko23,项目名称:Synchronization,代码行数:10,代码来源:SynchronizationPresenter.cs

示例8: AddPageTree

 public static void AddPageTree(TreeView tvPages)
 {
     var dal = DALFacade.GetPageSchemeDAL();
     var schemes = dal.SelectAll();
     tvPages.BeginUpdate();
     tvPages.Nodes.Clear();
     foreach (var scheme in schemes)
     {
         var node = new TreeNode(scheme.Name);
         node.Tag = node;
         tvPages.Nodes.Add(node);
     }
     Cursor.Current = Cursors.Default;
     tvPages.EndUpdate();
 }
开发者ID:dalinhuang,项目名称:tdcodes,代码行数:15,代码来源:GeneratePages.cs

示例9: Print

        //-----------------------------------------------------------------------------
        // Print the value to the treeview
        // This will clear out the TreeView and repopulate it with the Value.
        //-----------------------------------------------------------------------------
        void Print(MDbgValue val, TreeView t)
        {
            t.BeginUpdate();

            t.Nodes.Clear();

            if (val == null)
            {
                t.Nodes.Add("(Error:Expression not valid in this scope)");
            }
            else
            {
                PrintInternal(val, t.Nodes, 0);
            }

            t.EndUpdate();
        }
开发者ID:ppatoria,项目名称:SoftwareDevelopment,代码行数:21,代码来源:QuickViewWindow.cs

示例10: AddComputerToView

        /// <summary>
        /// Adds a Computer object to the specified TreeView.
        /// </summary>
        /// <param name="treeView">TreeView to add Computer to</param>
        /// <param name="computer">Computer added as a node to the TreeView</param>
        public static void AddComputerToView(TreeView treeView, Computer computer)
        {
            TreeNode computerNode = new TreeNode(computer.Name);

            AddOperatingSystemNode(computerNode, computer.OperatingSystem);
            AddPrintersNode(computerNode, computer.Printers);
            AddProcessesNode(computerNode, computer.Processes);
            AddSharesNode(computerNode, computer.Shares);
            AddLogicalDisksNode(computerNode, computer.LogicalDisks);
            AddComputerSystemNode(computerNode, computer.System);
            AddProcessorsNode(computerNode, computer.Processors);
            AddNetworkAdaptersNode(computerNode, computer.NetworkAdapters);

            // Add computer node and its related nodes to this tree view control
            treeView.BeginUpdate();
            treeView.Nodes.Add(computerNode);
            treeView.EndUpdate();
        }
开发者ID:amoskahiga,项目名称:ComputerBrowser,代码行数:23,代码来源:ComputerView.cs

示例11: Build

        public void Build(TreeView tree)
        {
            tree.BeginUpdate();
            tree.Nodes.Clear();
            tree.Nodes.Add(ReadHeader(objectFile.Header));
            tree.Nodes.Add(ReadReferences(objectFile.References));
            tree.Nodes.Add(ReadGlobals(objectFile.Globals));
            tree.Nodes.Add(ReadLateBounds(objectFile.LateBounds));
            tree.Nodes.Add(ReadLayouts(objectFile.Layouts));
            tree.Nodes.Add(ReadStrings(objectFile.Strings));
            tree.Nodes.Add(ReadTypes(objectFile.Types));
            tree.Nodes.Add(ReadClasses(objectFile.Classes));
            tree.Nodes.Add(ReadInstances(objectFile.Instances));
            tree.Nodes.Add(ReadConstructors(objectFile.Constructors));

            if (config.DisplayFlatOpCodes)
                tree.Nodes.Add(ReadCode(objectFile.OpCodes));

            tree.EndUpdate();
        }
开发者ID:rizwan3d,项目名称:elalang,代码行数:20,代码来源:TreeBuilder.cs

示例12: PopulateTreeView

        public static void PopulateTreeView(DatabaseSchema schema, TreeView treeView1)
        {
            // Suppress repainting the TreeView until all the objects have been created.
            treeView1.BeginUpdate();

            treeView1.Nodes.Clear(); //clear out anything that exists
            treeView1.ShowNodeToolTips = true;

            var treeRoot = new TreeNode("Schema");
            treeView1.Nodes.Add(treeRoot);

            FillTables(treeRoot, schema);
            FillViews(treeRoot, schema);
            FillSprocs(treeRoot, schema.StoredProcedures);
            FillFunctions(treeRoot, schema);
            if (schema.Packages.Count > 0) FillPackages(treeRoot, schema);
            FillUsers(treeRoot, schema);

            treeView1.EndUpdate();
        }
开发者ID:Petran15,项目名称:dbschemareader,代码行数:20,代码来源:SchemaToTreeview.cs

示例13: BuildTree

        private void BuildTree(String aText, List<String> summary, IFileSystemItem root,
            TreeView aView, Boolean insertSubfolders)
        {
            summary.Add(String.Format("Имя папки: {0}", root.Name));
            summary.Add(new String('-', 50));
            summary.Add(String.Empty);

            aView.BeginUpdate();
            try
            {
                aView.Nodes.Clear();
                TreeNode aRoot = InsertFsi(summary, root, insertSubfolders, true);
                aRoot.Text = aText;
                aView.Nodes.Add(aRoot);
                aRoot.Expand();
                aView.SelectedNode = aRoot;
            }
            finally
            {
                aView.EndUpdate();
            }
        }
开发者ID:Dennis-Petrov,项目名称:Cash,代码行数:22,代码来源:FormVersionsView.cs

示例14: RebuildList

        public static void RebuildList( TreeView tree )
        {
            tree.BeginUpdate();
            UpdateNode( m_Root );

            tree.Nodes.Clear();
            tree.Nodes.Add( m_Root );
            m_Root.Expand();
            tree.EndUpdate();
        }
开发者ID:herculesjr,项目名称:razor,代码行数:10,代码来源:HotKeys.cs

示例15: ExpansionTreeView

        public ExpansionTreeView(TreeView treeView, List<StrandNode> strandNodeList,
			uint dKrystalLevel, List<int> missingPointValues)
        {
            _treeView = treeView;
            _strandNodeList = strandNodeList;

            string missingPointValuesStr = "";
            if(missingPointValues.Count > 0)
                missingPointValuesStr = K.GetStringOfUnsignedInts(missingPointValues);
            #region constant krystal inputs
            if(dKrystalLevel == 0) // constant krystal inputs
            {
                int p = strandNodeList[0].strandPoint;
                int d = strandNodeList[0].strandDensity;
                strandNodeList[0].Text = "1: m1"
                    + ", p" + p.ToString()
                    + ", d" + d.ToString();
                _treeView.Nodes.Add(strandNodeList[0]);
            }
            #endregion constant krystal inputs
            else
                #region line krystal inputs
                if(dKrystalLevel == 1) // line krystal
                {
                    _treeView.BeginUpdate();
                    if(missingPointValues.Count > 0)
                        _treeView.Nodes.Add("Missing p value(s): " + missingPointValuesStr);
                    foreach(StrandNode strandNode in strandNodeList)
                    {
                        int m = strandNode.strandMoment;
                        int p = strandNode.strandPoint;
                        int d = strandNode.strandDensity;
                        strandNode.Text = m.ToString()
                            + ": m" + m.ToString()
                            + ", p" + p.ToString()
                            + ", d" + d.ToString();
                        _treeView.Nodes.Add(strandNode);
                    }
                    _treeView.EndUpdate();
                }
                #endregion line krystal inputs
                else
                #region higher level krystal inputs
                {
                    // Construct the levels of the tree above the strandNodeList, adding the StrandNodes where
                    // necessary. (The upper levels consist of pure TreeNodes and include the single root node.)
                    TreeNode[] currentNode = new TreeNode[dKrystalLevel];
                    int[] localSectionNumber = new int[dKrystalLevel];// does not include the local strand section numbers
                    int localStrandSectionNumber = 0;
                    foreach(StrandNode strandNode in strandNodeList)
                    {
                        if(strandNode.strandLevel <= dKrystalLevel)
                        {
                            localStrandSectionNumber = 0;
                            int levelIndex = strandNode.strandLevel - 1;
                            while(levelIndex < dKrystalLevel)
                            {
                                TreeNode tn = new TreeNode();
                                tn.Expand();
                                currentNode[levelIndex] = tn;
                                if(levelIndex > 0) // there is only one node at levelIndex == 0, and it has no text
                                {
                                    currentNode[levelIndex - 1].Nodes.Add(tn);
                                    localSectionNumber[levelIndex - 1]++;
                                    localSectionNumber[levelIndex] = 0;
                                    if(levelIndex == 1)
                                        tn.Text = localSectionNumber[levelIndex - 1].ToString();
                                    else
                                        tn.Text = tn.Parent.Text + "." + localSectionNumber[levelIndex - 1].ToString();
                                }
                                levelIndex++;
                            }
                        }
                        localStrandSectionNumber++;
                        currentNode[dKrystalLevel - 1].Nodes.Add(strandNode);
                        localSectionNumber[dKrystalLevel - 1]++;
                        int m = strandNode.strandMoment;
                        int p = strandNode.strandPoint;
                        int d = strandNode.strandDensity;
                        strandNode.Text = strandNode.Parent.Text
                            + "." + localStrandSectionNumber.ToString()
                            + ": m" + m.ToString()
                            + ", p" + p.ToString()
                            + ", d" + d.ToString();
                    }
                    // Now add the moment numbers to the pure TreeNode.Texts
                    foreach(StrandNode strandNode in strandNodeList)
                    {
                        if(strandNode.strandLevel <= dKrystalLevel)
                        {
                            TreeNode tn = strandNode.Parent;
                            bool continueUp = true;
                            while(continueUp)
                            {
                                if(tn.Text.EndsWith(".1") && tn.Level > 0)
                                    continueUp = true;
                                else continueUp = false;
                                int m = strandNode.strandMoment;
                                tn.Text = tn.Text + ": m" + m.ToString();
                                if(continueUp)
//.........这里部分代码省略.........
开发者ID:suvjunmd,项目名称:Moritz,代码行数:101,代码来源:ExpansionTreeView.cs


注:本文中的System.Windows.Forms.TreeView.EndUpdate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。