private static List <string> GetIconStrings(IconsTypes iconType, string[] strings) { List <string> result = new List <string>(); long pow2 = 1; Type iconsTypesType = typeof(IconsTypes); for (int i = 0; ; i++) { if (!Enum.IsDefined(iconsTypesType, pow2)) { break; } IconsTypes tmpIconType = (IconsTypes)pow2; if ((iconType & tmpIconType) != 0) { result.Add(strings[i]); } pow2 <<= 1; } return(result); }
private static List<string> GetIconStrings(IconsTypes iconType, string[] strings) { List<string> result = new List<string>(); long pow2 = 1; Type iconsTypesType = typeof(IconsTypes); for (int i = 0; ; i++) { if (!Enum.IsDefined(iconsTypesType, pow2)) { break; } IconsTypes tmpIconType = (IconsTypes)pow2; if ((iconType & tmpIconType) != 0) { result.Add(strings[i]); } pow2 <<= 1; } return result; }
public static List<string> GetAltLabels(IconsTypes iconType) { return GetIconStrings(iconType, ALT_LABELS); }
public static List<string> GetFileNames(IconsTypes iconType) { return GetIconStrings(iconType, FILES_NAMES); }
public static List <string> GetAltLabels(IconsTypes iconType) { return(GetIconStrings(iconType, ALT_LABELS)); }
public static List <string> GetFileNames(IconsTypes iconType) { return(GetIconStrings(iconType, FILES_NAMES)); }