当前位置: 首页>>代码示例>>C#>>正文


C# ObjectCreator.sortkd方法代码示例

本文整理汇总了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();
        }
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:78,代码来源:MaterialSelector.ed.cs


注:本文中的WinterLeaf.Engine.Classes.View.Creators.ObjectCreator.sortkd方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。