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

            if (selected)
            {
                item.Selected = true;
            }
            return(item);
        }
Example #2
0
 public static bool Equals(EGatherType type, string typeStr)
 {
     if (string.IsNullOrEmpty(typeStr))
     {
         return(false);
     }
     if (string.Equals(GetValue(type).ToLower(), typeStr.ToLower()))
     {
         return(true);
     }
     return(false);
 }
Example #3
0
 public static string GetValue(EGatherType type)
 {
     if (type == EGatherType.Web)
     {
         return("Web");
     }
     if (type == EGatherType.Database)
     {
         return("Database");
     }
     if (type == EGatherType.File)
     {
         return("File");
     }
     return("Undefined");
 }
Example #4
0
        public static string GetText(EGatherType type)
        {
            if (type == EGatherType.Web)
            {
                return("Web页面");
            }
            if (type == EGatherType.Database)
            {
                return("数据库");
            }
            if (type == EGatherType.File)
            {
                return("单文件页");
            }

            return("Undefined");
        }
Example #5
0
 public static bool Equals(string typeStr, EGatherType type)
 {
     return(Equals(type, typeStr));
 }