Beispiel #1
0
        public static bool tryGetSkinDef(string nodeName, out SkinDef_T skinDef)
        {
            DataNode nodeDef;

            skinDef = null;
            if (DataNodeGroup.tryGetDataNode("BoloUI", "Skin", nodeName, out nodeDef) && nodeDef != null && nodeDef is SkinDef_T)
            {
                skinDef = (SkinDef_T)nodeDef;

                return true;
            }

            return false;
        }
Beispiel #2
0
        public ResBasic(XmlElement xe, XmlControl rootControl, SkinDef_T deepDef, bool isSkinEditor = false)
            : base(xe, rootControl)
        {
            m_type = "Skin";
            m_configModName = conf_modName;
            m_configPartName = conf_partName;
            m_curDeepDef = deepDef;
            m_apprPre = "";
            m_apprTagStr = "";
            m_apprSuf = "";
            m_isSkinEditor = isSkinEditor;
            InitializeComponent();
            m_isCtrl = false;

            IsExpanded = true;
            if (m_curDeepDef != null)
            {
                if ((m_xe.Name == "skin" || m_xe.Name == "publicskin") && m_xmlCtrl != null)
                {
                    ResBasic resItem;

                    if (m_xmlCtrl.m_mapSkin.TryGetValue(m_xe.GetAttribute("Name"), out resItem))
                    {
                        string errorInfo = "\r\n" + m_xmlCtrl.m_openedFile.m_path + " - 存在重名皮肤(" +
                            m_xe.GetAttribute("Name") + "),前一个同名的皮肤将不能被正确引用。";

                        Public.ResultLink.createResult(errorInfo, Public.ResultType.RT_ERROR);
                        Public.ResultLink.createResult("<重名皮肤1> ", Public.ResultType.RT_ERROR, resItem);
                        Public.ResultLink.createResult("<重名皮肤2>", Public.ResultType.RT_ERROR, this);
                        //Public.ErrorInfo.addToErrorInfo(errorInfo);
                    }
                    m_xmlCtrl.m_mapSkin[m_xe.GetAttribute("Name")] = this;
                    IsExpanded = false;
                }
                else
                {
                    //显示或隐藏皮肤节点
                    addChild();
                }
            }

            initHeader();
        }