我有一个WinTree
由三个对象组成的WinTreeItem
对象。我遇到的问题是我需要参数化第一个WinTreeItem
(根),以便我可以选择 1st、2nd 或 3rd WinTreeItem
。
这是我拥有具有名称作为属性的WinTree
对象的代码。WitTreeItem
public class UITree1Tree : WinTree
{
public UITree1Tree(UITestControl searchLimitContainer) :
base(searchLimitContainer)
{
#region Search Criteria
this.SearchProperties[WinTree.PropertyNames.Name] = "Tree Lists:";
this.WindowTitles.Add("Insert Symbol List");
#endregion
}
#region Properties
public UITrSymbolLiTreeItem UITradeStationSymbolLiTreeItem
{
get
{
if ((this.mUITrSymbolLiTreeItem == null))
{
this.mUITrSymbolLiTreeItem = new UITrSymbolLiTreeItem(this);
}
return this.mUITrSymbolLiTreeItem;
}
}
#endregion
#region Fields
private UITrSymbolLiTreeItem mUITrSymbolLiTreeItem;
#endregion
}
public class UITrSymbolLiTreeItem: WinTreeItem
{
public UITrSymbolLiTreeItem (UITestControl searchLimitContainer) :
base(searchLimitContainer)
{
#region Search Criteria
this.SearchProperties[WinTreeItem.PropertyNames.Name] = "Tr Symbol Lists";
this.SearchProperties["Value"] = "0";
this.WindowTitles.Add("Insert Tr List");
#endregion
}
}