示例#1
0
 private void InitThemeInfoItems()
 {
     try
     {
         mListThemeInfoItems.Clear();
         if (CurrentApp == null)
         {
             return;
         }
         var session = CurrentApp.Session;
         if (session == null)
         {
             return;
         }
         for (int i = 0; i < session.SupportThemes.Count; i++)
         {
             var theme = session.SupportThemes[i];
             var item  = new ThemeInfoItem();
             item.Name        = theme.Name;
             item.Display     = theme.Display;
             item.Description = theme.Display;
             item.ThumbImage  = GetThumbImage(item);
             item.IsSelected  = false;
             mListThemeInfoItems.Add(item);
         }
     }
     catch (Exception ex)
     {
         ShowException(ex.Message);
     }
 }
示例#2
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);
        }