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

            if (selected)
            {
                item.Selected = true;
            }
            return(item);
        }
Exemple #2
0
 public static bool Equals(ESubscribePushType 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(ESubscribePushType type)
 {
     if (type == ESubscribePushType.ManualPush)
     {
         return("手动推送");
     }
     if (type == ESubscribePushType.TimedPush)
     {
         return("定时推送");
     }
     throw new Exception();
 }
 public static string GetValue(ESubscribePushType type)
 {
     if (type == ESubscribePushType.ManualPush)
     {
         return("ManualPush");
     }
     if (type == ESubscribePushType.TimedPush)
     {
         return("TimedPush");
     }
     throw new Exception();
 }
Exemple #5
0
 public static string GetText(ESubscribePushType type)
 {
     if (type == ESubscribePushType.ManualPush)
     {
         return("返強容僕");
     }
     else if (type == ESubscribePushType.TimedPush)
     {
         return("協扮容僕");
     }
     else
     {
         throw new Exception();
     }
 }
Exemple #6
0
 public static bool Equals(string typeStr, ESubscribePushType type)
 {
     return(Equals(type, typeStr));
 }