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


C# TreeView.invokeOnThread方法代码示例

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


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

示例1: addExtraFileReferencesToSelectedNode

 public static void addExtraFileReferencesToSelectedNode(TreeView treeView, string file)
 {
     if (treeView != null)
         treeView.invokeOnThread(
             () =>
             {
                 addExtraFileReferencesToTreeNode(treeView.SelectedNode, file);
             });
 }
开发者ID:njmube,项目名称:FluentSharp,代码行数:9,代码来源:CompileEngine_WinForms.cs

示例2: addErrorsListToTreeView

		public static void addErrorsListToTreeView(TreeView tvCompilationErrors, StringBuilder sbErrorMessage)
        {
            tvCompilationErrors.invokeOnThread(
             () =>
             {
                 if (sbErrorMessage == null)
                     return;
                 tvCompilationErrors.Nodes.Clear();
                 addErrorsListToTreeView(sbErrorMessage.ToString(), tvCompilationErrors);
             });
        }
开发者ID:SiGhTfOrbACQ,项目名称:O2.FluentSharp,代码行数:11,代码来源:CompileEngine_WinForms.cs

示例3: addAssembliesWithUnitTestsToTreeView

 public static void addAssembliesWithUnitTestsToTreeView(List<string> assembliesWithUnitTests, TreeView treeView, bool clearLoadedList)
 {
     treeView.invokeOnThread(
         () =>
         {
             if (clearLoadedList)
                 treeView.Nodes.Clear();
             treeView.Tag = assembliesWithUnitTests;
             foreach (var assembly in assembliesWithUnitTests)
                 treeView.Nodes.Add(assembly);
         });
 }
开发者ID:pusp,项目名称:o2platform,代码行数:12,代码来源:UnitTestExecutionViewHelpers.cs

示例4: onSpringMvcMappingsTreeSelect

 private void onSpringMvcMappingsTreeSelect(TreeView treeView)
 {
     treeView.invokeOnThread(
         () =>
         {
             if (treeView.SelectedNode != null && treeView.SelectedNode.Tag != null)
             {
                 if (treeView.SelectedNode.Tag is SpringMvcController)
                     showDetailsForSpringMvcController((SpringMvcController)treeView.SelectedNode.Tag);
             }
         });
 }
开发者ID:o2platform,项目名称:O2.Platform.Projects.Misc_and_Legacy,代码行数:12,代码来源:ascx_JoinControllersWithFindings.Controllers.cs

示例5: onSpringMvcMappingsTreeViewSelect

 public void onSpringMvcMappingsTreeViewSelect(TreeView treeView, bool openPageWhenControllerIsSelected)
 {
     treeView.invokeOnThread(
         () =>
             {
                 if (treeView.SelectedNode != null && treeView.SelectedNode.Tag != null)
                 {
                     if (treeView.SelectedNode.Tag is SpringMvcController)
                         showDetailsForSpringMvcController((SpringMvcController)treeView.SelectedNode.Tag, openPageWhenControllerIsSelected);
                 }
             });
 }
开发者ID:o2platform,项目名称:O2.Platform.Projects.Misc_and_Legacy,代码行数:12,代码来源:ascx_ExploitSpringMvc.Controllers.cs

示例6: getAssembliesToLoad

 private static List<Assembly> getAssembliesToLoad(TreeView tvTreeView)
 {
     return (List<Assembly>)tvTreeView.invokeOnThread(
         () =>
         {
             if (tvTreeView.Nodes.Count ==0)
                 return getDefaultLoadedAssemblies();
             
             var assembliesToLoad = new List<Assembly>();
             foreach(TreeNode treeNode in tvTreeView.Nodes)
                 if (treeNode.Checked && treeNode.Tag !=null && treeNode.Tag is Assembly)
                     assembliesToLoad.Add((Assembly)treeNode.Tag);
             return assembliesToLoad;                
         });
 }
开发者ID:SiGhTfOrbACQ,项目名称:O2.FluentSharp,代码行数:15,代码来源:ascx_O2ObjectModel.Controllers.cs

示例7: populateTreeNodeCollectionWithVariables

        public static void populateTreeNodeCollectionWithVariables(TreeView targetTreeView, TreeNodeCollection nodes, List<O2MDbgVariable> o2MDbgvariables)
        {
            targetTreeView.invokeOnThread(
                () =>
                {
                    nodes.Clear();
                    foreach (var o2MDbgvariable in o2MDbgvariables)
                    {

                        // var nameLvSubItem = new ListViewItem.ListViewSubItem() 
                        var nodeText =
                        string.Format("{0} = {1}  : {2}", o2MDbgvariable.name, o2MDbgvariable.value,
                                      o2MDbgvariable.type);
                        var newTreeNode = O2Forms.newTreeNode(nodes, nodeText, 0, o2MDbgvariable);
                        if (o2MDbgvariable.complexType)
                            newTreeNode.Nodes.Add("DymmyNode");
                    }
                });
        }
开发者ID:o2platform,项目名称:O2.Platform.Projects.Misc_and_Legacy,代码行数:19,代码来源:ascx_Variables.Controllers.cs

示例8: setToolTipText

 public static void setToolTipText(TreeView treeView, TreeNode treeNode, string toolTipText)
 {
     treeView.invokeOnThread(
         () => treeNode.ToolTipText = toolTipText);
 }
开发者ID:pusp,项目名称:o2platform,代码行数:5,代码来源:O2Forms.cs

示例9: expandNodes

 public static void expandNodes(TreeView targetTreeView)
 {
     if (targetTreeView != null)
         targetTreeView.invokeOnThread(
             ()=>
                 {
                    foreach(TreeNode node in targetTreeView.Nodes)
                        node.Expand();
                 });                   
 }
开发者ID:pusp,项目名称:o2platform,代码行数:10,代码来源:O2Forms.cs

示例10: loadAssesmblyDataIntoTreeView

        public Thread loadAssesmblyDataIntoTreeView(Assembly aAssemblyToLoad, TreeView tvTargetTreeView,
                                                         Label lbLastMethodExecuted, bool bOnlyShowStaticMethods)
        {
            tvTargetTreeView.Visible = false;
            tvTargetTreeView.Nodes.Clear();
            tvTargetTreeView.Sorted = true;
            int iTypesAdded = 0;

            return O2Thread.mtaThread(() =>
                                   {
                                       try
                                       {
                                           var treeNodesToAdd = new List<TreeNode>();
                                           foreach (Type tType in aAssemblyToLoad.GetTypes())
                                           {
                                               if ((iTypesAdded++) % 500 == 0)
                                                   PublicDI.log.info("{0} types processed", iTypesAdded);
                                               //vars.set_(tType.Name, tType); // set global variable of compiled code
                                               //Callbacks.raiseEvent_ScriptCompiledSuccessfully(tType.Name);                
                                               TreeNode tnType = O2Forms.newTreeNode(tType.Name, tType.Name, 1, tType);
                                               foreach (
                                                   MethodInfo mMethod in
                                                       tType.GetMethods(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.DeclaredOnly |
                                                       ((bOnlyShowStaticMethods) ? BindingFlags.Static : BindingFlags.Static | BindingFlags.Instance)))
                                               {
                                                   if (mMethod.Name == lbLastMethodExecuted.Text)
                                                       lbLastMethodExecuted.Tag = mMethod;
                                                   //TreeNode tnMethod = O2Forms.newTreeNode(mMethod.Name, mMethod.Name, 2, mMethod);
                                                   TreeNode tnMethod =
                                                       O2Forms.newTreeNode(
                                                           new FilteredSignature(mMethod).getReflectorView(),
                                                           mMethod.Name, 2, mMethod);
                                                   tnType.Nodes.Add(tnMethod);
                                               }
                                               if (tnType.Nodes.Count > 0)
                                                   treeNodesToAdd.Add(tnType);
                                                   //O2Forms.addNodeToTreeNodeCollection(tvTargetTreeView, tvTargetTreeView.Nodes, tnType);      // thread safe way to add nodes                                                                                    
                                           }
                                           PublicDI.log.info("{0} types processed , now loading them into treeView", iTypesAdded);                                           
                                           tvTargetTreeView.invokeOnThread(() =>
                                           {
                                               foreach (var treeNode in treeNodesToAdd)
                                                   tvTargetTreeView.Nodes.Add(treeNode);
                                               PublicDI.log.info("All nodes loaded");
                                               if (tvTargetTreeView.Nodes.Count > 0)
                                                   tvTargetTreeView.Nodes[0].Expand();
                                               tvTargetTreeView.Visible = true;
                                           });

                                       }
                                       catch (Exception ex)
                                       {
                                           PublicDI.log.ex(ex, "in loadAssesmblyDataIntoTreeView");
                                       }
                                   });
            
            
            //if (tvTargetTreeView.GetNodeCount(true) < 20)
            //    tvTargetTreeView.ExpandAll();
            //tvTargetTreeView.Visible = true;
        }
开发者ID:pusp,项目名称:o2platform,代码行数:61,代码来源:CompileEngine.cs

示例11: addXLoadedRulesToTreeView

 public static void addXLoadedRulesToTreeView(IEnumerable<ILoadedXRule> xLoadedRules, TreeView treeView, bool clearLoadedList)
 {
     treeView.invokeOnThread(
         () =>
         {
             if (clearLoadedList)
                 treeView.Nodes.Clear();
             treeView.Tag = xLoadedRules;
             if (xLoadedRules != null)
                 foreach (var xLoadedRule in xLoadedRules)
                 {
                     var newTreeNode = O2Forms.newTreeNode(treeView.Nodes, xLoadedRule.ToString(), 0,
                                                           xLoadedRule);
                     foreach (var method in xLoadedRule.methods)
                         // only add methods that have no parameters
                         if (DI.reflection.getParametersType(method.Value).Count == 0)
                             O2Forms.newTreeNode(newTreeNode.Nodes, method.Key.Name, 0, method.Value);
                 }
         });
 }
开发者ID:pusp,项目名称:o2platform,代码行数:20,代码来源:UnitTestExecutionViewHelpers.cs

示例12: mapAssembliesIntoXRules

 public static void mapAssembliesIntoXRules(TreeView tvSource_Assemblies, TreeView tvTarget_XLoadedRules)
 {
     tvSource_Assemblies.invokeOnThread(
         () =>
         {
             if (tvSource_Assemblies.Tag != null &&
                 tvSource_Assemblies.Tag is List<string>)
             {
                 var xLoadedRules = mapUnitTestToXRules((List<string>)tvSource_Assemblies.Tag);
                 addXLoadedRulesToTreeView(xLoadedRules, tvTarget_XLoadedRules, true);
             }
         });
 }
开发者ID:pusp,项目名称:o2platform,代码行数:13,代码来源:UnitTestExecutionViewHelpers.cs

示例13: getTreeNodeAtDroppedOverPoint

        public static TreeNode getTreeNodeAtDroppedOverPoint(TreeView tvTreeView, int iDroppedX, int iDroppedY)
        {
            return tvTreeView.invokeOnThread(
                () =>{
                        Point pPointToString = tvTreeView.PointToScreen(tvTreeView.Location);

                        int iAdjustedX = tvTreeView.Left + iDroppedX - pPointToString.X;
                        int iAdjustedY = tvTreeView.Top + iDroppedY - pPointToString.Y;

                        //PublicDI.log.info("x:{0} y:{1}   - {2}, {3}", x, y, tvCurrentFilters.Left, tvCurrentFilters.Top);
                        return tvTreeView.GetNodeAt(iAdjustedX, iAdjustedY);
                    });
        }
开发者ID:njmube,项目名称:FluentSharp,代码行数:13,代码来源:O2Forms.cs

示例14: loadInThread

 public static void loadInThread(List<TreeNode> rootNodes,TreeView tvSearchResults)
 {
     tvSearchResults.invokeOnThread(
         () =>
             {
                 tvSearchResults.Visible = false;
                 tvSearchResults.Nodes.Clear();
                 tvSearchResults.Nodes.AddRange(rootNodes.ToArray());
                 tvSearchResults.Visible = true;
             });
 }
开发者ID:pusp,项目名称:o2platform,代码行数:11,代码来源:SearchUtils.cs

示例15: selectTreeNodeAtDroppedOverPoint

 public static TreeView selectTreeNodeAtDroppedOverPoint(TreeView tvTreeView, int iDroppedX, int iDroppedY)
 {
     return tvTreeView.invokeOnThread(
         () =>{
                 TreeNode tnDraggedTarget = getTreeNodeAtDroppedOverPoint(tvTreeView, iDroppedX, iDroppedY);
                 if (tnDraggedTarget != null)
                     tvTreeView.SelectedNode = tnDraggedTarget;
                 return tvTreeView;
             });
 }
开发者ID:njmube,项目名称:FluentSharp,代码行数:10,代码来源:O2Forms.cs


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