public static void ShowLoadThemeDialog() { IScreenManager screenManager = ServiceRegistration.Get <IScreenManager>(); SkinManager skinManager = ServiceRegistration.Get <ISkinResourceManager>() as SkinManager; if (skinManager == null) { return; } string currentSkinName = screenManager.CurrentSkinResourceBundle.SkinName; Skin currentSkin; if (!skinManager.Skins.TryGetValue(currentSkinName, out currentSkin)) { return; } ItemsList themeItems = new ItemsList(); foreach (Theme theme in currentSkin.Themes.Values) { if (!theme.IsValid) { continue; } string themeName = theme.Name; ListItem themeItem = new ListItem(Consts.KEY_NAME, themeName) { Command = new MethodDelegateCommand(() => screenManager.SwitchSkinAndTheme(null, themeName)) }; themeItems.Add(themeItem); } ShowDialog(Consts.RES_LOAD_THEME_TITLE, themeItems); }
public static void ShowLoadSkinDialog() { IScreenManager screenManager = ServiceRegistration.Get <IScreenManager>(); SkinManager skinManager = ServiceRegistration.Get <ISkinResourceManager>() as SkinManager; if (skinManager == null) { return; } ItemsList skinItems = new ItemsList(); foreach (Skin skin in skinManager.Skins.Values) { if (!skin.IsValid) { continue; } string skinName = skin.Name; ListItem skinItem = new ListItem(Consts.KEY_NAME, skinName) { Command = new MethodDelegateCommand(() => screenManager.SwitchSkinAndTheme(skinName, null)) }; skinItems.Add(skinItem); } ShowDialog(Consts.RES_LOAD_SKIN_TITLE, skinItems); }
public void ChangeSkin() { IScreenManager screenManager = ServiceRegistration.Get <IScreenManager>(); if (screenManager.CurrentSkinResourceBundle.SkinName != "Nereus") { screenManager.SwitchSkinAndTheme("Nereus", "default"); } }
public override void Save() { IScreenManager screenManager = ServiceRegistration.Get <IScreenManager>(); if (screenManager == null) { return; } screenManager.SwitchSkinAndTheme(_currentSkinName, null); }
void ReloadThemeAction() { IScreenManager screenManager = ServiceRegistration.Get <IScreenManager>(); screenManager.SwitchSkinAndTheme(_skinName, _themeName); }