當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。