Ejemplo n.º 1
0
        private string GetGlyph(PomodoroType type)
        {
            FieldInfo info = type.GetType().GetField(type.ToString());

            DescriptionAttribute[] attr =
                (DescriptionAttribute[])info.GetCustomAttributes
                    (typeof(DescriptionAttribute), false);
            return(attr[0].Description);
        }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
 private string GetId(PomodoroType type)
 {
     return(Enum.GetName(typeof(PomodoroType), type));
 }
Ejemplo n.º 4
0
 public PomodoroItem(PomodoroType type, Color dark, Color light)
 {
     Type  = type;
     Dark  = dark;
     Light = light;
 }