/// <summary> /// 设置默认页面处理配置 /// </summary> /// <param name="requestConfig"></param> public virtual void SetDefault(MaPage requestConfig) { m_defaultRequestConfig = requestConfig; m_saveWay = (m_saveWay == MaPageSaveWay.Null) ? requestConfig.SaveWay : m_saveWay; m_updateTime = (m_updateTime == 0) ? requestConfig.UpdateTime : m_updateTime; m_location = string.IsNullOrEmpty(m_location) ? requestConfig.m_location : m_location; m_header = string.IsNullOrEmpty(m_header) ? requestConfig.m_header : m_header; m_param = string.IsNullOrEmpty(m_param) ? requestConfig.m_param : m_param; m_custom = string.IsNullOrEmpty(m_custom) ? requestConfig.m_custom : m_custom; }
/// <summary> /// 实现 /// </summary> /// <param name="node"></param> public void Load(XmlElement node) { //加载默认页面 if (node["DefaultPage"] != null) { m_defaultPage = MaConfigManager.LoadConfig(node["DefaultPage"]) as MaPage; } //加载页面信息 foreach (XmlElement item in node.SelectNodes("MaPage")) { MaPage _page = MaConfigManager.LoadConfig(item) as MaPage; if (_page != null) { //设置页面默认处理配置信息 _page.SetDefault(m_defaultPage); //处理页面信息 m_pageList.Add(_page); } else { throw new Exception("页面信息配置错误:" + item.Name); } } }
/// <summary> /// 加载站点配置节点信息 /// </summary> /// <param name="node"></param> public override void Load(System.Xml.XmlElement node) { base.Load(node); #region 加载皮肤 //加载默认皮肤 if (node["DefaultSkin"] != null) { m_defaulutSkin = MaConfigManager.LoadConfig(node["DefaultSkin"]) as IMaSkin; } //加载皮肤信息 foreach (XmlElement item in node.SelectNodes("MaSkin")) { IMaSkin _skin = MaConfigManager.LoadConfig(item) as IMaSkin; if (_skin != null) { m_skinList.Add(_skin); } else { throw new Exception("站点皮肤配置错误:" + item.Name); } } #endregion #region 加载页面 //加载默认页面 if (node["DefaultPage"] != null) { m_defaultPage = MaConfigManager.LoadConfig(node["DefaultPage"]) as MaPage; } //加载页面信息 foreach (XmlElement item in node.SelectNodes("MaPage")) { MaPage _page = MaConfigManager.LoadConfig(item) as MaPage; if (_page != null) { //设置页面默认处理配置信息 _page.SetDefault(m_defaultPage); //处理页面信息 m_pageList.Add(_page); } else { throw new Exception("页面信息配置错误:" + item.Name); } } #endregion #region 加载公共配置 //加载公共页面配置信息 foreach (XmlElement item in node.SelectNodes("MaPagePublic")) { MaPagePublic _config = MaConfigManager.LoadConfig(item) as MaPagePublic; if (_config != null) { m_pulicPageConfig.Add(_config); } } #endregion }