• 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
    }
    

      

  • 相关阅读:
    【BZOJ】3052: [wc2013]糖果公园
    【BZOJ】3757: 苹果树
    【BZOJ】1086: [SCOI2005]王室联邦
    【POJ】3648 Wedding
    【POJ】3678 Katu Puzzle
    【POJ】2296 Map Labeler
    【POJ】3207 Ikki's Story IV
    【HDU】1814 Peaceful Commission
    【HDU】2829 Lawrence
    【HDU】3480 Division
  • 原文地址:https://www.cnblogs.com/wlj928449657/p/3713159.html
Copyright © 2020-2023  润新知