create needed folders if they not exist
This commit is contained in:
1 parent
0e73a77c0b
commit
bc0e42af45
5 files changed
+26
-10
No files matched your search
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace Vocaluxe.Base
|
namespace Vocaluxe.Base
|
||||||
@@ -93,7 +94,7 @@ namespace Vocaluxe.Base
|
|||||||
public static bool TabNavigation = false;
|
public static bool TabNavigation = false;
|
||||||
|
|
||||||
public const float BackgroundMusicFadeTime = 0.5f;
|
public const float BackgroundMusicFadeTime = 0.5f;
|
||||||
|
|
||||||
public static string GetVersionText()
|
public static string GetVersionText()
|
||||||
{
|
{
|
||||||
string sVersion = "v" + iVersionMajor.ToString() + "." +
|
string sVersion = "v" + iVersionMajor.ToString() + "." +
|
||||||
@@ -140,5 +141,25 @@ namespace Vocaluxe.Base
|
|||||||
{
|
{
|
||||||
MouseMoveDiffMin = 3;
|
MouseMoveDiffMin = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void CreateFolders()
|
||||||
|
{
|
||||||
|
List<string> Folders = new List<string>();
|
||||||
|
|
||||||
|
Folders.Add(sFolderCover);
|
||||||
|
Folders.Add(sFolderFonts);
|
||||||
|
Folders.Add(sFolderProfiles);
|
||||||
|
Folders.Add(sFolderSongs);
|
||||||
|
Folders.Add(sFolderScreenshots);
|
||||||
|
Folders.Add(sFolderBackgroundMusic);
|
||||||
|
Folders.Add(sFolderSounds);
|
||||||
|
|
||||||
|
foreach (string folder in Folders)
|
||||||
|
{
|
||||||
|
string path = Path.Combine(Environment.CurrentDirectory, folder);
|
||||||
|
if (!Directory.Exists(path))
|
||||||
|
Directory.CreateDirectory(path);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -461,9 +461,7 @@ namespace Vocaluxe.Lib.Draw
|
|||||||
{
|
{
|
||||||
string file = "Screenshot_";
|
string file = "Screenshot_";
|
||||||
string path = Path.Combine(Environment.CurrentDirectory, CSettings.sFolderScreenshots);
|
string path = Path.Combine(Environment.CurrentDirectory, CSettings.sFolderScreenshots);
|
||||||
if (!Directory.Exists(path))
|
|
||||||
Directory.CreateDirectory(path);
|
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (File.Exists(Path.Combine(path, file + i.ToString("00000") + ".bmp")))
|
while (File.Exists(Path.Combine(path, file + i.ToString("00000") + ".bmp")))
|
||||||
i++;
|
i++;
|
||||||
|
|||||||
@@ -300,9 +300,7 @@ namespace Vocaluxe.Lib.Draw
|
|||||||
{
|
{
|
||||||
string file = "Screenshot_";
|
string file = "Screenshot_";
|
||||||
string path = Path.Combine(Environment.CurrentDirectory, CSettings.sFolderScreenshots);
|
string path = Path.Combine(Environment.CurrentDirectory, CSettings.sFolderScreenshots);
|
||||||
if (!Directory.Exists(path))
|
|
||||||
Directory.CreateDirectory(path);
|
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (File.Exists(Path.Combine(path, file + i.ToString("00000") + ".png")))
|
while (File.Exists(Path.Combine(path, file + i.ToString("00000") + ".png")))
|
||||||
i++;
|
i++;
|
||||||
|
|||||||
@@ -556,9 +556,7 @@ namespace Vocaluxe.Lib.Draw
|
|||||||
{
|
{
|
||||||
string file = "Screenshot_";
|
string file = "Screenshot_";
|
||||||
string path = Path.Combine(Environment.CurrentDirectory, CSettings.sFolderScreenshots);
|
string path = Path.Combine(Environment.CurrentDirectory, CSettings.sFolderScreenshots);
|
||||||
if (!Directory.Exists(path))
|
|
||||||
Directory.CreateDirectory(path);
|
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (File.Exists(Path.Combine(path, file + i.ToString("00000") + ".bmp")))
|
while (File.Exists(Path.Combine(path, file + i.ToString("00000") + ".bmp")))
|
||||||
i++;
|
i++;
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ namespace Vocaluxe
|
|||||||
// Init Log
|
// Init Log
|
||||||
CLog.Init();
|
CLog.Init();
|
||||||
|
|
||||||
|
CSettings.CreateFolders();
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
|
|
||||||
// Init Language
|
// Init Language
|
||||||
|
|||||||
Reference in new issue
Block a user