本文整理汇总了C#中System.Windows.Controls.TreeViewItem.IterateDown方法的典型用法代码示例。如果您正苦于以下问题:C# TreeViewItem.IterateDown方法的具体用法?C# TreeViewItem.IterateDown怎么用?C# TreeViewItem.IterateDown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Controls.TreeViewItem
的用法示例。
在下文中一共展示了TreeViewItem.IterateDown方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PresentSummary
private void PresentSummary(TreeViewItem item)
{
this.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
{
m_textbox2.Text = "";
var testcase = item.Tag as TestcaseView;
if (testcase == null) // present summary
{
ClearStats();
m_summary_label.Text = "Summary for " + item.Header.ToString();
StringBuilder s = new StringBuilder("\n");
var stat_pos = s.Length;
foreach (var i in item.IterateDown())
{
var treeitem = i as TreeViewItem;
if (treeitem.Tag is TestcaseView)
{
s.AppendLine(StatusMessage(treeitem.Tag as TestcaseView));
UpdateStats(treeitem.Tag as TestcaseView);
}
UpdateItem(treeitem);
}
var total = (m_ok_count + m_failed_count + m_not_run_count);
s.Insert(stat_pos, " " + m_failed_count + " failed | " + m_ok_count + " passed | " + m_not_run_count + " not run | " + total + " total tests\n\n");
m_textbox1.Text = s.ToString();
m_progressbar.Maximum = (double)total;
m_progressbar.Value = (double)(m_failed_count + m_ok_count);
return;
}
m_textbox1.Text = StatusMessage(testcase);
string backtrace = testcase.Exception.PrettyPrint();
m_textbox2.Text = backtrace;
UpdateItem(item);
m_progressbar.Value = 0;
Console.WriteLine(backtrace);
}));
}