diff options
| author | Michael <[email protected]> | 2017-05-07 19:28:43 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-05-07 19:28:43 -0400 |
| commit | 6ca6c1275d3952c2a8561f3746a005cea858bdb8 (patch) | |
| tree | f062ad4869c5e3e7849c2aca74adb059ca3dfaad | |
| parent | 97cd97b92e3147d2eaa46df8d210a5d25fee5328 (diff) | |
| download | histacom2-6ca6c1275d3952c2a8561f3746a005cea858bdb8.tar.gz histacom2-6ca6c1275d3952c2a8561f3746a005cea858bdb8.tar.bz2 histacom2-6ca6c1275d3952c2a8561f3746a005cea858bdb8.zip | |
Move the game folder to Documents
| -rw-r--r-- | .vs/TimeHACK/v14/.suo | bin | 125952 -> 111104 bytes | |||
| -rw-r--r-- | TimeHACK.Main/TitleScreen.cs | 18 |
2 files changed, 13 insertions, 5 deletions
diff --git a/.vs/TimeHACK/v14/.suo b/.vs/TimeHACK/v14/.suo Binary files differindex d68371c..0db053e 100644 --- a/.vs/TimeHACK/v14/.suo +++ b/.vs/TimeHACK/v14/.suo diff --git a/TimeHACK.Main/TitleScreen.cs b/TimeHACK.Main/TitleScreen.cs index 0edb329..5e6e5f8 100644 --- a/TimeHACK.Main/TitleScreen.cs +++ b/TimeHACK.Main/TitleScreen.cs @@ -19,14 +19,22 @@ namespace TimeHACK public static DirectoryInfo datafolder; public static DirectoryInfo profilefolder; + public static string GameDirectory + { + get + { + return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments), "TimeHACK"); + } + } + public TitleScreen() { InitializeComponent(); - if (!Directory.Exists("C:\\TimeHack")) thfolder = Directory.CreateDirectory("C:\\TimeHack"); - else thfolder = new DirectoryInfo("C:\\TimeHack"); - datafolder = Directory.CreateDirectory(thfolder.FullName + "\\Data"); - Resources.google.Save(datafolder.FullName + "\\google.jpg"); - profilefolder = Directory.CreateDirectory(thfolder.FullName + "\\Profiles"); + if (!Directory.Exists(GameDirectory)) Directory.CreateDirectory(GameDirectory); + else thfolder = new DirectoryInfo(GameDirectory); + datafolder = Directory.CreateDirectory(Path.Combine(thfolder.FullName, "Data")); + Resources.google.Save(Path.Combine(datafolder.FullName, "\\google.jpg")); + profilefolder = Directory.CreateDirectory(Path.Combine(thfolder.FullName, "\\Profiles")); } private void closebutton_Click(object sender, EventArgs e) |
