From 554fc5e2b3027f104fceda0421fed4352749d0f8 Mon Sep 17 00:00:00 2001 From: lempamo Date: Tue, 1 Aug 2017 10:28:47 -0400 Subject: fixed up moving to dirs --- .../OS/Win95/Win95Apps/Win95WindowsExplorer.cs | 22 ++++++++++++++++++--- TimeHACK.Main/Properties/Resources.Designer.cs | 20 +++++++++++++++++++ TimeHACK.Main/Properties/Resources.resx | 6 ++++++ .../Resources/WinClassic/WinClassicNotepadBig.png | Bin 0 -> 255 bytes .../Resources/WinClassic/WinClassicRegedit.png | Bin 0 -> 291 bytes TimeHACK.Main/TimeHACK.Main.csproj | 2 ++ 6 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 TimeHACK.Main/Resources/WinClassic/WinClassicNotepadBig.png create mode 100644 TimeHACK.Main/Resources/WinClassic/WinClassicRegedit.png (limited to 'TimeHACK.Main') diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs index 5fc923d..c27f6a4 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs @@ -66,6 +66,8 @@ namespace TimeHACK.OS.Win95.Win95Apps mainView.LargeImageList.Images.Add(Properties.Resources.WinClassicSetup); mainView.LargeImageList.Images.Add(Properties.Resources.WinClassicNotepad); mainView.LargeImageList.Images.Add(Properties.Resources.WinClassicCalcBig); + mainView.LargeImageList.Images.Add(Properties.Resources.WinClassicNotepadBig); + mainView.LargeImageList.Images.Add(Properties.Resources.WinClassicRegedit); program.BringToFront(); @@ -157,8 +159,13 @@ namespace TimeHACK.OS.Win95.Win95Apps } else return; } + FileSystemFolderInfo fsfi = JsonConvert.DeserializeObject(File.ReadAllText(Path.Combine(CurrentDirectory, "_data.info"))); + foreach(var item in fsfi.Files) + { + if (item.Name == Path.GetFileName(str)) { itm.ImageIndex = item.FileIcon; break; } + } - switch (new FileInfo(str).Extension) + /*switch (new FileInfo(str).Extension) { case ".exe": string contents; @@ -187,7 +194,7 @@ namespace TimeHACK.OS.Win95.Win95Apps default: itm.ImageIndex = 8; break; - } + }*/ } } catch (Exception ex) { //wm.StartInfobox95("Exploring - C:", "Error with the file explorer \n" + ex.Message, Properties.Resources.Win95Info); add illegal operation dialog here later @@ -270,6 +277,15 @@ namespace TimeHACK.OS.Win95.Win95Apps Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront(); Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(Program.NonImportantApp_Closing); + break; + case "notepad": + WinClassic appNP = wm.StartWin95(new WinClassicNotepad(), "Notepad", Properties.Resources.Win95IconNotepad_2, true, true); + Program.AddTaskbarItem(appNP, appNP.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad_2); + + Program.nonimportantapps.Add(appNP); + Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront(); + Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(Program.NonImportantApp_Closing); + break; case "wordpad": WinClassic appWP = wm.StartWin95(new WinClassicWordPad(), "Wordpad", Properties.Resources.WinClassicWordpad, true, true); @@ -608,7 +624,7 @@ namespace TimeHACK.OS.Win95.Win95Apps { if (mainView.FocusedItem.Tag == null) { // If it isn't a file - GoToDir(Path.Combine(CurrentDirectory, mainView.FocusedItem.ImageKey.ToString())); + GoToDir(Path.Combine(CurrentDirectory, mainView.FocusedItem.Text)); } else { // If it is a file diff --git a/TimeHACK.Main/Properties/Resources.Designer.cs b/TimeHACK.Main/Properties/Resources.Designer.cs index 74a012e..d69258f 100644 --- a/TimeHACK.Main/Properties/Resources.Designer.cs +++ b/TimeHACK.Main/Properties/Resources.Designer.cs @@ -1291,6 +1291,16 @@ namespace TimeHACK.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap WinClassicNotepadBig { + get { + object obj = ResourceManager.GetObject("WinClassicNotepadBig", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -1351,6 +1361,16 @@ namespace TimeHACK.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap WinClassicRegedit { + get { + object obj = ResourceManager.GetObject("WinClassicRegedit", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/TimeHACK.Main/Properties/Resources.resx b/TimeHACK.Main/Properties/Resources.resx index f6182d6..d40c04e 100644 --- a/TimeHACK.Main/Properties/Resources.resx +++ b/TimeHACK.Main/Properties/Resources.resx @@ -699,4 +699,10 @@ ..\Resources\WinClassic\WinClassicCalcBig.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\WinClassic\WinClassicNotepadBig.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\WinClassic\WinClassicRegedit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/TimeHACK.Main/Resources/WinClassic/WinClassicNotepadBig.png b/TimeHACK.Main/Resources/WinClassic/WinClassicNotepadBig.png new file mode 100644 index 0000000..394fce2 Binary files /dev/null and b/TimeHACK.Main/Resources/WinClassic/WinClassicNotepadBig.png differ diff --git a/TimeHACK.Main/Resources/WinClassic/WinClassicRegedit.png b/TimeHACK.Main/Resources/WinClassic/WinClassicRegedit.png new file mode 100644 index 0000000..045e4ec Binary files /dev/null and b/TimeHACK.Main/Resources/WinClassic/WinClassicRegedit.png differ diff --git a/TimeHACK.Main/TimeHACK.Main.csproj b/TimeHACK.Main/TimeHACK.Main.csproj index 9d063c1..d7d10b4 100644 --- a/TimeHACK.Main/TimeHACK.Main.csproj +++ b/TimeHACK.Main/TimeHACK.Main.csproj @@ -622,11 +622,13 @@ + + -- cgit v1.2.3