Esempio n. 1
0
        private string GetThumbImage(ThemeInfoItem themeInfoItem)
        {
            string strReturn = string.Empty;

            try
            {
                string path = string.Format("{0}://{1}:{2}/Themes/{3}/bg.jpg"
                                            , AppServerInfo.Protocol
                                            , AppServerInfo.Address
                                            , AppServerInfo.Port
                                            , themeInfoItem.Name);
                strReturn = path;
            }
            catch
            {
            }
            return(strReturn);
        }
Esempio n. 2
0
        private void InitThemes()
        {
            ListThemes.Clear();

            if (SessionInfo != null && SessionInfo.SupportThemes != null)
            {
                for (int i = 0; i < SessionInfo.SupportThemes.Count; i++)
                {
                    ThemeInfo themeInfo = SessionInfo.SupportThemes[i];

                    ThemeInfoItem item = new ThemeInfoItem();
                    item.Name       = themeInfo.Name;
                    item.Display    = themeInfo.Display;
                    item.ThumbImage = GetThumbImage(item);
                    ListThemes.Add(item);
                }
            }
        }
Esempio n. 3
0
 private void Init()
 {
     InitLanguageInfos();
     InitThemes();
     if (ThemeInfo != null)
     {
         ThemeInfoItem item = ListThemes.FirstOrDefault(t => t.Name == ThemeInfo.Name);
         if (item != null)
         {
             item.IsSelected = true;
         }
     }
     InitLangTypes();
     if (LangTypeInfo != null)
     {
         LangInfoItem lang = ListLanugages.FirstOrDefault(l => l.Code == LangTypeInfo.LangID);
         if (lang != null)
         {
             lang.IsSelected = true;
         }
     }
 }