From 624ca03db06a7f1ea5fac057a467af26d4ae1f83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20K=C3=BCpper?= Date: Wed, 15 May 2013 15:49:24 +0200 Subject: [PATCH] Added methods to get party-mode-folder. --- Vocaluxe/Base/CParty.cs | 1 + VocaluxeLib/PartyModes/CPartyMode.cs | 11 +++++++++++ VocaluxeLib/PartyModes/IPartyMode.cs | 2 ++ 3 files changed, 14 insertions(+) diff --git a/Vocaluxe/Base/CParty.cs b/Vocaluxe/Base/CParty.cs index f2b87093..461f2269 100644 --- a/Vocaluxe/Base/CParty.cs +++ b/Vocaluxe/Base/CParty.cs @@ -302,6 +302,7 @@ namespace Vocaluxe.Base return pm; } pm.PartyMode.Initialize(); + pm.PartyMode.SetFolder(Path.Combine(Directory.GetCurrentDirectory(), Path.Combine(CSettings.FolderPartyModes, pm.Folder))); if (!CTheme.AddTheme(Path.Combine(Directory.GetCurrentDirectory(), Path.Combine(Path.Combine(CSettings.FolderPartyModes, pm.Folder), "Theme.xml")), pm.PartyModeID)) return pm; diff --git a/VocaluxeLib/PartyModes/CPartyMode.cs b/VocaluxeLib/PartyModes/CPartyMode.cs index cbc74a52..a8f31d23 100644 --- a/VocaluxeLib/PartyModes/CPartyMode.cs +++ b/VocaluxeLib/PartyModes/CPartyMode.cs @@ -25,6 +25,7 @@ namespace VocaluxeLib.PartyModes { public abstract class CPartyMode : IPartyMode { + protected string _Folder; protected SScreenSongOptions _ScreenSongOptions; protected readonly Dictionary _Screens; @@ -101,6 +102,16 @@ namespace VocaluxeLib.PartyModes return 1; } + public string GetFolder() + { + return _Folder; + } + + public void SetFolder(string folder) + { + _Folder = folder; + } + public virtual void SetSearchString(string searchString, bool visible) {} public virtual void JokerUsed(int teamNr) diff --git a/VocaluxeLib/PartyModes/IPartyMode.cs b/VocaluxeLib/PartyModes/IPartyMode.cs index a747638d..6d383046 100644 --- a/VocaluxeLib/PartyModes/IPartyMode.cs +++ b/VocaluxeLib/PartyModes/IPartyMode.cs @@ -104,6 +104,8 @@ namespace VocaluxeLib.PartyModes int GetMaxTeams(); int GetMinTeams(); int GetMaxNumRounds(); + string GetFolder(); + void SetFolder(string folder); void SetSearchString(string searchString, bool visible);