private string GetGlyph(PomodoroType type) { FieldInfo info = type.GetType().GetField(type.ToString()); DescriptionAttribute[] attr = (DescriptionAttribute[])info.GetCustomAttributes (typeof(DescriptionAttribute), false); return(attr[0].Description); }
private IEnumerable <string> GetName(PomodoroType type) { string text = GetId(type); Regex regex = new Regex(@"\p{Lu}\p{Ll}*"); foreach (Match match in regex.Matches(text)) { yield return(match.Value); } }
private string GetId(PomodoroType type) { return(Enum.GetName(typeof(PomodoroType), type)); }
public PomodoroItem(PomodoroType type, Color dark, Color light) { Type = type; Dark = dark; Light = light; }