public PaletteCommand(ITwitchClient twitchClient, IDataStore <ColorPalette> colorPaletteDataStore, ColorPaletteCollection colorPaletteCollection) : base(x => x.PaletteCommandWords, x => x.MenuSettings.EnablePaletteCommand) { _twitchClient = twitchClient; _colorPaletteDataStore = colorPaletteDataStore; _colorPaletteCollection = colorPaletteCollection; }
public static Color GetColorInPalette(ColorPaletteCollection palette, char key) { try { return(GetColorSet(palette)[key]); } catch (KeyNotFoundException) { return(Color.LightGrey); } }
public DataLoader(MainWindowViewModel mainWindowViewModel, ColorPaletteCollection paletteCollection, IDataStore <CharacterNameBid> nameBidDataStore, IDataStore <ColorPalette> paletteDataStore, ILogger <DataLoader> logger) { _mainWindowViewModel = mainWindowViewModel; _paletteCollection = paletteCollection; _nameBidDataStore = nameBidDataStore; _paletteDataStore = paletteDataStore; _logger = logger; }
private static Dictionary <char, Color> GetColorSet(ColorPaletteCollection palette) { var setDictionary = new Dictionary <char, Color>(); switch (palette) { case (ColorPaletteCollection.Default): setDictionary.Add('b', new Color(74, 224, 226)); setDictionary.Add('g', new Color(129, 243, 193)); setDictionary.Add('y', new Color(255, 238, 129)); setDictionary.Add('r', new Color(213, 16, 93)); break; } return(setDictionary); }
public MenuCommand(ColorPaletteCollection paletteCollection, PaymentProcessor paymentProcessor) : base(x => x.MenuCommandWords, x => x.MenuSettings.Enabled) { _paletteCollection = paletteCollection; _paymentProcessor = paymentProcessor; }
public static EmbedBuilder SetEmbed(String title = null, String description = null, String image = null, String thumbnail = null, Boolean timestamp = false, ColorPaletteCollection color = ColorPaletteCollection.Default, char colorKey = 'g', EmbedAuthorBuilder author = null, EmbedFooterBuilder footer = null, List <EmbedFieldBuilder> fields = null) { EmbedBuilder embed = new EmbedBuilder(); if (Exists(title)) { embed.WithTitle(title); } if (Exists(description)) { embed.WithDescription(description); } if (Exists(image)) { try { embed.WithImageUrl(image); } catch (Exception) { } } if (Exists(thumbnail)) { try { embed.WithThumbnailUrl(thumbnail); } catch (Exception) { } } if (timestamp) { embed.WithCurrentTimestamp(); } embed.WithColor(GetColorPalette(color)[colorKey]); if (ExistsType(author, new EmbedAuthorBuilder())) { embed.WithAuthor(author); } if (ExistsType(footer, new EmbedFooterBuilder())) { embed.WithFooter(footer); } if (ExistsType(fields, new List <EmbedFooterBuilder>().GetType())) { foreach (var field in fields) { embed.AddField(field); } } return(embed); }
public static Dictionary <char, Color> GetColorPalette(ColorPaletteCollection palette) { return(GetColorSet(palette)); }