本文整理匯總了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);
}));
}