public bool LoadTheme(string XmlPath, string ElementName, XPathNavigator navigator, int SkinIndex) { return(_SongMenu.LoadTheme(XmlPath, ElementName, navigator, SkinIndex)); }
public void LoadThemeOld(string xmlPath) { string file = Path.Combine(xmlPath, ThemeName + ".xml"); CXmlReader xmlReader = CXmlReader.OpenFile(file); if (xmlReader == null) { return; } bool versionCheck = _CheckVersion(_ScreenVersion, xmlReader); if (versionCheck) { ThemePath = xmlPath; _LoadThemeBasics(xmlReader); _LoadThemeElement <CBackground>(_ThemeBackgrounds, _AddBackground, xmlReader); _LoadThemeElement <CStatic>(_ThemeStatics, _AddStatic, xmlReader); _LoadThemeElement <CText>(_ThemeTexts, _AddText, xmlReader); _LoadThemeElement <CButton>(_ThemeButtons, _AddButton, xmlReader); _LoadThemeElement <CSelectSlide>(_ThemeSelectSlides, _AddSelectSlide, xmlReader); foreach (string elName in _ThemeSongMenus) { ISongMenu element = CSongMenuFactory.CreateSongMenu(PartyModeID); if (element.LoadTheme("//root/" + ThemeName, elName, xmlReader)) { _AddSongMenu(element, elName); } else { CBase.Log.LogError("Can't load songmenu \"" + elName + "\" in screen " + ThemeName); } } _LoadThemeElement <CSongMenuFramework>(_ThemeSongMenus, _AddSongMenu, xmlReader); _LoadThemeElement <CLyric>(_ThemeLyrics, _AddLyric, xmlReader); _LoadThemeElement <CSingNotes>(_ThemeSingNotes, _AddSingNote, xmlReader); _LoadThemeElement <CNameSelection>(_ThemeNameSelections, _AddNameSelection, xmlReader); _LoadThemeElement <CEqualizer>(_ThemeEqualizers, _AddEqualizer, xmlReader); _LoadThemeElement <CPlaylist>(_ThemePlaylists, _AddPlaylist, xmlReader); _LoadThemeElement <CParticleEffect>(_ThemeParticleEffects, _AddParticleEffect, xmlReader); _LoadThemeElement <CScreenSetting>(_ThemeScreenSettings, _AddScreenSetting, xmlReader); } Theme.Informations.ScreenName = ThemeName; Theme.Informations.ScreenVersion = _ScreenVersion; Theme.Backgrounds = new List <SThemeBackground>(); Theme.Statics = new List <SThemeStatic>(); Theme.Texts = new List <SThemeText>(); Theme.Buttons = new List <SThemeButton>(); Theme.SongMenus = new List <SThemeSongMenu>(); Theme.Lyrics = new List <SThemeLyrics>(); Theme.SelectSlides = new List <SThemeSelectSlide>(); Theme.SingNotes = new List <SThemeSingBar>(); Theme.NameSelections = new List <SThemeNameSelection>(); Theme.Equalizers = new List <SThemeEqualizer>(); Theme.Playlists = new List <SThemePlaylist>(); Theme.ParticleEffects = new List <SThemeParticleEffect>(); Theme.ScreenSettings = new List <SThemeScreenSetting>(); }