本文整理汇总了C#中WinterLeaf.Engine.Classes.View.Creators.ObjectCreator.sortkd方法的典型用法代码示例。如果您正苦于以下问题:C# ObjectCreator.sortkd方法的具体用法?C# ObjectCreator.sortkd怎么用?C# ObjectCreator.sortkd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WinterLeaf.Engine.Classes.View.Creators.ObjectCreator
的用法示例。
在下文中一共展示了ObjectCreator.sortkd方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: loadMaterialFilters
public void loadMaterialFilters()
{
ArrayObject MaterialFilterAllArray = "MaterialFilterAllArray";
GuiDynamicCtrlArrayControl filterArray = this.FOT("filterArray");
ArrayObject filteredTypesArray = new ObjectCreator("ArrayObject").Create();
filteredTypesArray.duplicate(MaterialFilterAllArray);
filteredTypesArray.uniqueKey();
// sort the the keys before we do anything
filteredTypesArray.sortkd();
Util.eval(this.currentStaticFilter.name + "Checkbox.setStateOn(1);");
// it may seem goofy why the checkbox can't be instanciated inside the container
// reason being its because we need to store the checkbox ctrl in order to make changes
// on it later in the function.
string selectedFilter = "";
for (int i = 0; i < filteredTypesArray.count(); i++)
{
string filter = filteredTypesArray.getKey(i);
if (filter == "")
continue;
#region GuiControl () oc_Newobject67
ObjectCreator oc_Newobject67 = new ObjectCreator("GuiControl", "");
oc_Newobject67["profile"] = "ToolsGuiDefaultProfile";
oc_Newobject67["Position"] = "0 0";
oc_Newobject67["Extent"] = "128 18";
oc_Newobject67["HorizSizing"] = "right";
oc_Newobject67["VertSizing"] = "bottom";
oc_Newobject67["isContainer"] = "1";
#endregion
GuiControl container = oc_Newobject67.Create();
#region GuiCheckBoxCtrl () oc_Newobject68
ObjectCreator oc_Newobject68 = new ObjectCreator("GuiCheckBoxCtrl", "");
oc_Newobject68["Profile"] = "ToolsGuiCheckBoxListProfile";
oc_Newobject68["position"] = "5 1";
oc_Newobject68["Extent"] = "118 18";
oc_Newobject68["Command"] = "";
oc_Newobject68["groupNum"] = "0";
oc_Newobject68["buttonType"] = "ToggleButton";
oc_Newobject68["text"] = filter + " ( " + MaterialFilterAllArray.countKey(filter) + " )";
oc_Newobject68["filter"] = filter;
oc_Newobject68["Command"] = "MaterialSelector.preloadFilter();";
#endregion
GuiCheckBoxCtrl checkbox = oc_Newobject68.Create();
container.add(checkbox);
filterArray.add(container);
int tagCount = Util.getWordCount(this.currentFilter);
for (int j = 0; j < tagCount; j++)
{
if (filter == Util.getWord(this.currentFilter, j))
{
if (selectedFilter == "")
selectedFilter = filter;
else
selectedFilter = selectedFilter + " " + filter;
checkbox.setStateOn(true);
}
}
}
this.loadFilter(selectedFilter);
filteredTypesArray.delete();
}