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/DesktopController.cs | |
| 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/DesktopController.cs')
| -rw-r--r-- | TimeHACK.Engine/DesktopController.cs | 15 |
1 files changed, 14 insertions, 1 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; + } } } } |
