本文整理汇总了C#中TreeGridNode.SetValues方法的典型用法代码示例。如果您正苦于以下问题:C# TreeGridNode.SetValues方法的具体用法?C# TreeGridNode.SetValues怎么用?C# TreeGridNode.SetValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TreeGridNode
的用法示例。
在下文中一共展示了TreeGridNode.SetValues方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateCoverageNode
/// <summary>
/// Create a TreeGridNode for a coverage item.
/// </summary>
/// <param name="parent">Parent of the tree node.</param>
/// <param name="item">Coverage item.</param>
/// <returns>TreeGridNode for the coverage item.</returns>
private TreeGridNode CreateCoverageNode(TreeGridNode parent, CoverageItem item)
{
TreeGridNode node = new TreeGridNode { Tag = item };
((parent != null) ? parent.Nodes : _grdCoverage.Nodes).Add(node);
node.SetValues(item.Name, item.UncoveredBlocks, item.UncoveredBlocksPercentage, item.CoveredBlocks, item.CoveredBlocksPercentage, null);
switch (item.ItemType)
{
case CoverageItemType.Assembly:
node.ImageIndex = 0;
node.Expand();
break;
case CoverageItemType.Namespace:
node.ImageIndex = 1;
node.Expand();
break;
case CoverageItemType.Type:
node.ImageIndex = 2;
node.Expand();
break;
case CoverageItemType.Method:
node.ImageIndex = 3;
break;
}
return node;
}