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