Ejemplo n.º 1
0
        protected override void DisableBackgroundAnimations(MediaCenterLibraryCache readCache, MediaCenterLibraryCache writeCache)
        {
            McmlDocument      mcml = MediaCenterUtil.GetMcml(readCache["Microsoft.MediaCenter.Shell.dll"].GetResource("PAGEBACKGROUND.MCML", (object)23));
            PropertiesElement themeUiProperties = McmlUtilities.GetThemeUIProperties(mcml, "PageBackground");
            PropertyElement   themeProperty     = McmlUtilities.GetThemeProperty(themeUiProperties, "StaticSource");

            McmlUtilities.GetThemeProperty(themeUiProperties, "AnimatedSource").Value = themeProperty.Value;
            MediaCenterUtil.UpdateMcml(writeCache["Microsoft.MediaCenter.Shell.dll"].GetResource("PAGEBACKGROUND.MCML", (object)23), mcml);
        }
Ejemplo n.º 2
0
        protected virtual void UpdateStartMenuCategory(StartMenuThemeItem item, MediaCenterLibraryCache readCache, MediaCenterLibraryCache writeCache)
        {
            McmlDocument      mcml = MediaCenterUtil.GetMcml(readCache["Microsoft.MediaCenter.Shell.dll"].GetResource("STARTMENUCATEGORY.MCML", (object)this.DocumentResourceType));
            PropertiesElement themeUiProperties = McmlUtilities.GetThemeUIProperties(mcml, "StartMenuCategoryView");

            McmlUtilities.UpdateFontElement(item.StripTitleFont, themeUiProperties.GetProperty("Font") as FontElement, item.Theme);
            McmlUtilities.UpdateColorElement(item.FocusedStripTitleColor, themeUiProperties.GetProperty("FocusColor"), item.Theme);
            McmlUtilities.UpdateColorElement(item.NonFocusedStripTitleColor, themeUiProperties.GetProperty("NoFocusColor"), item.Theme);
            MediaCenterUtil.UpdateMcml(writeCache["Microsoft.MediaCenter.Shell.dll"].GetResource("STARTMENUCATEGORY.MCML", (object)this.DocumentResourceType), mcml);
        }
Ejemplo n.º 3
0
        protected virtual void UpdateQuickLinks(StartMenuThemeItem item, MediaCenterLibraryCache readCache, MediaCenterLibraryCache writeCache)
        {
            McmlDocument      mcml = MediaCenterUtil.GetMcml(readCache["Microsoft.MediaCenter.Shell.dll"].GetResource("STARTMENUQUICKLINK.MCML", (object)this.DocumentResourceType));
            PropertiesElement themeUiProperties = McmlUtilities.GetThemeUIProperties(mcml, "BaseQuickLinkContent");

            McmlUtilities.UpdateFontElement(item.NonFocusedQuickLinkFont, themeUiProperties.GetProperty("Font") as FontElement, item.Theme);
            McmlUtilities.UpdateFontElement(item.FocusedQuickLinkFont, themeUiProperties.GetProperty("FocusFont") as FontElement, item.Theme);
            McmlUtilities.UpdateColorElement(item.FocusedQuickLinkColor, themeUiProperties.GetProperty("FocusColor"), item.Theme);
            McmlUtilities.UpdateColorElement(item.NonFocusedQuickLinkColor, themeUiProperties.GetProperty("NoFocusColor"), item.Theme);
            MediaCenterUtil.UpdateMcml(writeCache["Microsoft.MediaCenter.Shell.dll"].GetResource("STARTMENUQUICKLINK.MCML", (object)this.DocumentResourceType), mcml);
        }
Ejemplo n.º 4
0
        protected virtual void UpdateStartMenuOverlay(StartMenuThemeItem item, MediaCenterLibraryCache readCache, MediaCenterLibraryCache writeCache)
        {
            McmlDocument      mcml = MediaCenterUtil.GetMcml(readCache["Microsoft.MediaCenter.Shell.dll"].GetResource("STARTMENUOVERLAY.MCML", (object)this.DocumentResourceType));
            PropertiesElement themeUiProperties = McmlUtilities.GetThemeUIProperties(mcml, "StartMenuOverlay");

            if (!string.IsNullOrEmpty(item.StartMenuText))
            {
                themeUiProperties.GetProperty("StartText").Value = item.StartMenuText;
            }
            McmlUtilities.UpdateFontElement(item.StartMenuTextFont, themeUiProperties.GetProperty("StartTextFont") as FontElement, item.Theme);
            McmlUtilities.UpdateColorElement(item.StartMenuTextColor, themeUiProperties.GetProperty("StartTextColor"), item.Theme);
            MediaCenterUtil.UpdateMcml(writeCache["Microsoft.MediaCenter.Shell.dll"].GetResource("STARTMENUOVERLAY.MCML", (object)this.DocumentResourceType), mcml);
        }
Ejemplo n.º 5
0
        public static PropertyElement GetThemeProperty(this PropertiesElement propertiesElement, string name)
        {
            PropertyElement property = propertiesElement.GetProperty(name);

            if (property == null)
            {
                throw new ThemeApplicationException(string.Format("Could not find property {0}.", (object)name));
            }
            else
            {
                return(property);
            }
        }
Ejemplo n.º 6
0
        public static PropertiesElement GetThemeUIProperties(this McmlDocument document, string ui)
        {
            PropertiesElement uiProperties = document.GetUIProperties(ui);

            if (uiProperties == null)
            {
                throw new ThemeApplicationException(string.Format("Could not find UI {0}.", (object)ui));
            }
            else
            {
                return(uiProperties);
            }
        }