From 2115e75717846b782e632f51482a4ddc76ad162e Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Thu, 1 Nov 2012 14:54:17 +0100 Subject: [PATCH] Added new command-line-parameter for playlist-folder: "PlaylistFolder". --- Vocaluxe/Base/CConfig.cs | 5 +++++ Vocaluxe/Base/CSettings.cs | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index 4589654e..60a30d7d 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -933,6 +933,11 @@ namespace Vocaluxe.Base CSettings.sFileHighscoreDB = value; } break; + + case "playlistfolder": + CSettings.CreateFolder(value); + CSettings.sFolderPlaylists = value; + break; } } } diff --git a/Vocaluxe/Base/CSettings.cs b/Vocaluxe/Base/CSettings.cs index 7fb800f8..5fe0fb8b 100644 --- a/Vocaluxe/Base/CSettings.cs +++ b/Vocaluxe/Base/CSettings.cs @@ -94,7 +94,7 @@ namespace Vocaluxe.Base public const string sFolderLanguages = "Languages"; public const string sFolderScreenshots = "Screenshots"; public const string sFolderBackgroundMusic = "BackgroundMusic"; - public const string sFolderPlaylists = "Playlists"; + public static string sFolderPlaylists = "Playlists"; //public const String[] ToneStrings = new String[]{ "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B" }; public const int ToneMin = -36; @@ -194,5 +194,11 @@ namespace Vocaluxe.Base Directory.CreateDirectory(path); } } + + public static void CreateFolder(string path) + { + if (!Directory.Exists(path)) + Directory.CreateDirectory(path); + } } }