public static ListItem GetListItem(EPhotoListType type, bool selected)
        {
            var item = new ListItem(GetText(type), GetValue(type));

            if (selected)
            {
                item.Selected = true;
            }
            return(item);
        }
 public static bool Equals(EPhotoListType 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(EPhotoListType type)
 {
     if (type == EPhotoListType.Large)
     {
         return("大图浏览");
     }
     if (type == EPhotoListType.Thumbnail)
     {
         return("小图浏览");
     }
     throw new Exception();
 }
 public static string GetValue(EPhotoListType type)
 {
     if (type == EPhotoListType.Large)
     {
         return("Large");
     }
     if (type == EPhotoListType.Thumbnail)
     {
         return("Thumbnail");
     }
     throw new Exception();
 }
Exemple #5
0
 public static string GetText(EPhotoListType type)
 {
     if (type == EPhotoListType.Large)
     {
         return("´óͼä¯ÀÀ");
     }
     else if (type == EPhotoListType.Thumbnail)
     {
         return("Сͼä¯ÀÀ");
     }
     else
     {
         throw new Exception();
     }
 }
 public static bool Equals(string typeStr, EPhotoListType type)
 {
     return(Equals(type, typeStr));
 }