• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
紫默弑魂
博客园    首页    新随笔    联系   管理    订阅  订阅

extjs folder is lost解决方法 和 FineUI主题切换时 iframe内的内容主题不变的解决方法

错误原因:extjs包和FineUI版本不一致 或者是 webconfig配置中 没有设置为任何人可访问  解放方法下载和FineUI版本相同的extjs包就ok了

解决方法:FineUI主题切换时 iframe内的内容主题不变的解决方法:窗体继承 PageBase页面

PageBase页面代码:

public class PageBase : System.Web.UI.Page
    {
        #region OnInit

        protected override void OnInit(EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PageManager.Instance != null)
                {
                    HttpCookie themeCookie = Request.Cookies["Theme_v4"];
                    if (themeCookie != null)
                    {
                        string themeValue = themeCookie.Value;
                        PageManager.Instance.Theme = (Theme)Enum.Parse(typeof(Theme), themeValue, true);

                        //if (IsSystemTheme(themeValue))
                        //{
                        //    PageManager.Instance.Theme = (Theme)Enum.Parse(typeof(Theme), themeValue, true);
                        //}
                        //else
                        //{
                        //    PageManager.Instance.CustomTheme = themeValue;
                        //}
                    }

                    HttpCookie langCookie = Request.Cookies["Language_v4"];
                    if (langCookie != null)
                    {
                        string langValue = langCookie.Value;
                        PageManager.Instance.Language = (Language)Enum.Parse(typeof(Language), langValue, true);
                    }
                }
            }

            base.OnInit(e);
        }

        private bool IsSystemTheme(string themeName)
        {
            themeName = themeName.ToLower();
            string[] themes = Enum.GetNames(typeof(Theme));
            foreach (string theme in themes)
            {
                if (theme.ToLower() == themeName)
                {
                    return true;
                }
            }
            return false;
        }

        #endregion
}

  

posted @ 2014-05-07 10:13  紫默弑魂  阅读(569)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3