public static ListItem GetListItem(EGatherType type, bool selected) { var item = new ListItem(GetText(type), GetValue(type)); if (selected) { item.Selected = true; } return(item); }
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); }
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"); }
public static string GetText(EGatherType type) { if (type == EGatherType.Web) { return("Web页面"); } if (type == EGatherType.Database) { return("数据库"); } if (type == EGatherType.File) { return("单文件页"); } return("Undefined"); }
public static bool Equals(string typeStr, EGatherType type) { return(Equals(type, typeStr)); }