aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Engine/DesktopController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'TimeHACK.Engine/DesktopController.cs')
-rw-r--r--TimeHACK.Engine/DesktopController.cs15
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;
+ }
}
}
}