Beispiel #1
0
        public static ListItem GetListItem(EImportExportType type, bool selected)
        {
            var item = new ListItem(GetText(type), GetValue(type));

            if (selected)
            {
                item.Selected = true;
            }
            return(item);
        }
Beispiel #2
0
 public static bool Equals(EImportExportType type, string typeStr)
 {
     if (string.IsNullOrEmpty(typeStr))
     {
         return(false);
     }
     if (string.Equals(GetValue(type).ToLower(), typeStr.ToLower()))
     {
         return(true);
     }
     return(false);
 }
 public static string GetText(EImportExportType type)
 {
     if (type == EImportExportType.Template)
     {
         return("网站模板");
     }
     if (type == EImportExportType.DisplayMode)
     {
         return("列表显示方式");
     }
     if (type == EImportExportType.MenuDisplay)
     {
         return("菜单显示方式");
     }
     if (type == EImportExportType.Vote)
     {
         return("投票项数据");
     }
     throw new Exception();
 }
 public static string GetValue(EImportExportType type)
 {
     if (type == EImportExportType.Template)
     {
         return("Template");
     }
     if (type == EImportExportType.DisplayMode)
     {
         return("DisplayMode");
     }
     if (type == EImportExportType.MenuDisplay)
     {
         return("MenuDisplay");
     }
     if (type == EImportExportType.Vote)
     {
         return("Vote");
     }
     throw new Exception();
 }
Beispiel #5
0
 public static bool Equals(string typeStr, EImportExportType type)
 {
     return(Equals(type, typeStr));
 }