aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Engine
diff options
context:
space:
mode:
Diffstat (limited to 'TimeHACK.Engine')
-rw-r--r--TimeHACK.Engine/DesktopController.cs15
-rw-r--r--TimeHACK.Engine/SaveSystem.cs3
2 files changed, 16 insertions, 2 deletions
diff --git a/TimeHACK.Engine/DesktopController.cs b/TimeHACK.Engine/DesktopController.cs
index 23c9e3f..6ccc4c1 100644
--- a/TimeHACK.Engine/DesktopController.cs
+++ b/TimeHACK.Engine/DesktopController.cs
@@ -11,9 +11,22 @@ namespace TimeHACK.Engine
{
public static class DesktopController
{
- public static void ViewDesktopIcons(ListView baseIcons, ref ListView theView, string Directory)
+ public static void RefreshDesktopIcons(ListViewItem[] baseIcons, ref ListView theView, string theDirectory)
{
+ theView.Items.Clear(); // This resets it to it's default
+ theView.Items.AddRange(baseIcons);
+ foreach (string dir in Directory.GetDirectories(theDirectory))
+ {
+ theView.Items.Add(Path.GetFileName(dir));
+ theView.FindItemWithText(Path.GetFileName(dir)).ImageIndex = 1;
+ }
+
+ foreach (string dir in Directory.GetFiles(theDirectory))
+ {
+ theView.Items.Add(Path.GetFileName(dir));
+ theView.FindItemWithText(Path.GetFileName(dir)).ImageIndex = 12;
+ }
}
}
}
diff --git a/TimeHACK.Engine/SaveSystem.cs b/TimeHACK.Engine/SaveSystem.cs
index b8617bf..08697ad 100644
--- a/TimeHACK.Engine/SaveSystem.cs
+++ b/TimeHACK.Engine/SaveSystem.cs
@@ -74,7 +74,7 @@ namespace TimeHACK.Engine
{
get
{
- return Path.Combine(ProfileMyComputerDirectory, "Settings");
+ return Path.Combine(ProfileMyComputerDirectory, "Settings");
}
}
@@ -203,6 +203,7 @@ namespace TimeHACK.Engine
SaveDirectoryInfo(Path.Combine(ProfileWindowsDirectory, "Fonts"), true, "Fonts", true);
SaveDirectoryInfo(Path.Combine(ProfileWindowsDirectory, "Help"), true, "Help", true);
SaveDirectoryInfo(Path.Combine(ProfileWindowsDirectory, "Temp"), true, "Temp", true);
+ SaveDirectoryInfo(Path.Combine(ProfileWindowsDirectory, "Desktop"), true, "Desktop", true);
CreateWindowsFile(Path.Combine(ProfileWindowsDirectory, "calc.exe"), "calc");
CreateWindowsFile(Path.Combine(ProfileWindowsDirectory, "explorer.exe"), "explorer");