diff options
| author | Alex-TIMEHACK <[email protected]> | 2017-07-23 15:37:27 +0100 |
|---|---|---|
| committer | Alex-TIMEHACK <[email protected]> | 2017-07-23 15:37:27 +0100 |
| commit | c3ad5be7444664be6a1f7ba023067eb32cb5d231 (patch) | |
| tree | 417b39d8f0a6c52a8024913b232566de013f13ae /TimeHACK.Engine | |
| parent | 7d99d9ffbf5652f538c69228daa53fe423eb246b (diff) | |
| download | histacom2-c3ad5be7444664be6a1f7ba023067eb32cb5d231.tar.gz histacom2-c3ad5be7444664be6a1f7ba023067eb32cb5d231.tar.bz2 histacom2-c3ad5be7444664be6a1f7ba023067eb32cb5d231.zip | |
Realistic Desktop is halfway done!
Diffstat (limited to 'TimeHACK.Engine')
| -rw-r--r-- | TimeHACK.Engine/DesktopController.cs | 15 | ||||
| -rw-r--r-- | TimeHACK.Engine/SaveSystem.cs | 3 |
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"); |
