Beispiel #1
0
        public Color GetDefaultColor(TelegramTheme flags, string key)
        {
            var resources = flags.HasFlag(TelegramTheme.Dark) ? _defaultDark : _defaultLight;

            while (resources.TryGetValue(key, out object value))
            {
                if (value is string)
                {
                    key = value as string;
                }
                else if (value is Color color)
                {
                    return(color);
                }
            }

            return(default);
Beispiel #2
0
 public Dictionary <string, string[]> GetMapping(TelegramTheme flags)
 {
     return(flags.HasFlag(TelegramTheme.Dark) ? _mappingDark : _mapping);
 }