本文整理汇总了C#中Folder.GetChildrenTests方法的典型用法代码示例。如果您正苦于以下问题:C# Folder.GetChildrenTests方法的具体用法?C# Folder.GetChildrenTests怎么用?C# Folder.GetChildrenTests使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Folder
的用法示例。
在下文中一共展示了Folder.GetChildrenTests方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MakeTests
MyWindow MakeTests()
{
var window = new MyWindow(ButtonSprite, "Tests", new Rect(0, 0, kMenuWidth, kMenuHeight));
var scroll = new MyScrollBar(ButtonSprite);
var scrollView = new MyList(ButtonSprite, new Rect(78, 0, 200, 241));
scrollView.SetAnchor(new Vector2(0.5f, 0), new Vector2(1, 1));
scrollView.Element.GetComponent<RectTransform>().offsetMin = new Vector2(0, 0);
scrollView.Element.GetComponent<RectTransform>().offsetMax = new Vector2(-20, 0);
folder = stateMenu.StateFolder[stateMenu.CurrentAssembly][stateMenu.CurrentLevel];
var data = new LoadingData
{
AssemblyName = stateMenu.CurrentAssembly,
Level = stateMenu.CurrentLevel
};
foreach (var e in folder.GetChildrenTests())
{
if (e.State != 0 && TestDispatcher.LastTestExecution.ContainsKey(e.NameTest))
TestDispatcher.LastTestExecution[e.NameTest] = e.State == 1;
else if (e.State != 0 && !TestDispatcher.LastTestExecution.ContainsKey(e.NameTest))
TestDispatcher.LastTestExecution.Add(e.NameTest, e.State == 1);
}
var buttonTest = TestButton(folder, ButtonSprite, data, backgroundStateTest);
folderIsLoad = true;
var scrollR = scrollView.Element.GetComponent<ScrollRect>();
scrollR.scrollSensitivity = 10;
scrollR.verticalScrollbar = scroll.Element.GetComponent<Scrollbar>();
scrollView.Element.name = "ScrollView";
window.AddElement(scrollView);
buttonTest.Element.name = "HeadButton";
scrollView.MainElement.AddElement(buttonTest);
scrollView.MainElement.Element.AddComponent<ContentSizeFitter>().verticalFit = ContentSizeFitter.FitMode.PreferredSize;
window.AddElement(scroll);
return window;
}