本文整理匯總了C#中WinterLeaf.Engine.Classes.View.Creators.ObjectCreator.duplicate方法的典型用法代碼示例。如果您正苦於以下問題:C# ObjectCreator.duplicate方法的具體用法?C# ObjectCreator.duplicate怎麽用?C# ObjectCreator.duplicate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WinterLeaf.Engine.Classes.View.Creators.ObjectCreator
的用法示例。
在下文中一共展示了ObjectCreator.duplicate方法的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();
}