// 通过路径获取 public UIFormID GetFormIDByPath(string resPath, ResPathType pathType) { foreach (UIFormID id in m_id2AttrDic.Keys) { if (ResPathType.ePathComUI == pathType) { if (m_id2AttrDic[id].m_widgetPath == resPath) { return(id); } } else if (ResPathType.ePathCodePath == pathType) { if (m_id2AttrDic[id].m_codePath == resPath) { return(id); } } } return((UIFormID)0); // 默认返回最大值 }
// 通过路径获取 public UIFormID GetFormIDByPath(string resPath, ResPathType pathType) { foreach(UIFormID id in m_id2AttrDic.Keys) { if (ResPathType.ePathComUI == pathType) { if (m_id2AttrDic[id].m_widgetPath == resPath) { return id; } } else if (ResPathType.ePathCodePath == pathType) { if (m_id2AttrDic[id].m_codePath == resPath) { return id; } } } return (UIFormID)0; // 默认返回最大值 }