public IWindow(string name, UIWindowData data) { mBaseNode = null; mIsShow = false; mIsLoad = false; mName = name; mData = data; mExtraDatas = new Dictionary <string, string>(); }
public UIWindowData GetData(string name) { UIWindowData ret = null; for (int i = 0; i < mDataList.Count; ++i) { if (mDataList [i].mName.Equals(name)) { ret = mDataList [i]; } } return(ret); }
public void Load() { UIWindowData item = null; while (!FileReader.IsEnd()) { FileReader.ReadLine(); item = new UIWindowData(); item.mID = FileReader.ReadInt(); item.mName = FileReader.ReadString(); item.mScriptName = FileReader.ReadString(); item.mPrefabPath = FileReader.ReadString(); item.mAltasPath = FileReader.ReadString(); item.mParentName = FileReader.ReadString(); item.mUseFramework = FileReader.ReadBoolean(); item.mExclusiveIDs = FileReader.ReadString(); mDataList.Add(item); } /*// 加入注册所有窗口 * List<string> exclusive = new List<string>(); * List<int> eid; * foreach (var i in mDataList) * { * exclusive.Clear (); * eid = Converter.ConvertNumberList<int> (i.mExclusiveIDs); * foreach (var id in eid) * { * foreach (var j in mDataList) * { * if (id == j.mID) * { * exclusive.Add (j.mName); * } * } * } * * WindowManager.Instance.RegisterWindow(i.mName, i.mPrefabPath, i.mScriptName, exclusive); * }*/ }
private void RegisterWindow(string name, UIWindowData data) { IWindow window = new IWindow(name, data); this.mWindowMap.Add(window.GetName(), window); }