public static ListItem GetListItem(ETrackerStyle type, bool selected) { var item = new ListItem(GetText(type), GetValue(type)); if (selected) { item.Selected = true; } return(item); }
public static bool Equals(ETrackerStyle 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(ETrackerStyle type) { if (type == ETrackerStyle.None) { return("不显示"); } else if (type == ETrackerStyle.Number) { return("显示数字"); } else if (type == ETrackerStyle.Style1) { return("样式1"); } else if (type == ETrackerStyle.Style2) { return("样式2"); } else if (type == ETrackerStyle.Style3) { return("样式3"); } else if (type == ETrackerStyle.Style4) { return("样式4"); } else if (type == ETrackerStyle.Style5) { return("样式5"); } else if (type == ETrackerStyle.Style6) { return("样式6"); } else if (type == ETrackerStyle.Style7) { return("样式7"); } else if (type == ETrackerStyle.Style8) { return("样式8"); } else if (type == ETrackerStyle.Style9) { return("样式9"); } else { throw new Exception(); } }
public static string GetValue(ETrackerStyle type) { if (type == ETrackerStyle.None) { return("None"); } else if (type == ETrackerStyle.Number) { return("Number"); } else if (type == ETrackerStyle.Style1) { return("Style1"); } else if (type == ETrackerStyle.Style2) { return("Style2"); } else if (type == ETrackerStyle.Style3) { return("Style3"); } else if (type == ETrackerStyle.Style4) { return("Style4"); } else if (type == ETrackerStyle.Style5) { return("Style5"); } else if (type == ETrackerStyle.Style6) { return("Style6"); } else if (type == ETrackerStyle.Style7) { return("Style7"); } else if (type == ETrackerStyle.Style8) { return("Style8"); } else if (type == ETrackerStyle.Style9) { return("Style9"); } else { throw new Exception(); } }
public static bool Equals(string typeStr, ETrackerStyle type) { return(Equals(type, typeStr)); }