Ejemplo n.º 1
0
        public void SetBrushsAndImageViaThemeModule(ThemeModule theme_content, string path_module)
        {
            MainColor     = new SolidColorBrush(theme_content.MainColor);
            MainColorFont = new SolidColorBrush(theme_content.MainColorFont);

            SecondaryColor     = new SolidColorBrush(theme_content.SecondaryColor);
            SecondaryColorFont = new SolidColorBrush(theme_content.SecondaryColorFont);

            ToolbarColor     = new SolidColorBrush(theme_content.ToolbarColor);
            ToolbarColorFont = new SolidColorBrush(theme_content.ToolbarColorFont);

            ToolbarColor     = new SolidColorBrush(theme_content.ToolbarColor);
            ToolbarColorFont = new SolidColorBrush(theme_content.ToolbarColorFont);

            ToolbarRoundButtonColor     = new SolidColorBrush(theme_content.ToolbarRoundButtonColor);
            ToolbarRoundButtonColorFont = new SolidColorBrush(theme_content.ToolbarRoundButtonColorFont);

            ToolbarRoundButtonColor     = new SolidColorBrush(theme_content.ToolbarRoundButtonColor);
            ToolbarRoundButtonColorFont = new SolidColorBrush(theme_content.ToolbarRoundButtonColorFont);

            AddonDefaultColor     = new SolidColorBrush(theme_content.AddonDefaultColor);
            AddonDefaultFontColor = new SolidColorBrush(theme_content.AddonDefaultFontColor);

            RoundBorderNotificationColor = new SolidColorBrush(theme_content.RoundBorderNotificationColor);
            RoundNotificationColor       = new SolidColorBrush(theme_content.RoundNotificationColor);

            BackgroundImage = new BitmapImage(new Uri(Path.Combine(path_module, theme_content.BackgroundImagePath)));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Get all SolidColorBrush (and BitmapImage) of the theme
        /// </summary>
        /// <returns></returns>
        public async Task <ThemeModuleBrush> GetThemeBrushesContent()
        {
            try
            {
                ThemeModule Content = await GetThemeContentAsync();

                if (Content != null)
                {
                    ThemeModuleBrush Brushs = new ThemeModuleBrush();
                    Brushs.SetBrushsAndImageViaThemeModule(Content, ModuleFolderPath);

                    return(Brushs);
                }
            }
            catch
            {
                return(null);
            }

            return(null);
        }