diff options
| author | lempamo <[email protected]> | 2017-08-01 10:28:47 -0400 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-08-01 10:28:47 -0400 |
| commit | 554fc5e2b3027f104fceda0421fed4352749d0f8 (patch) | |
| tree | aaa04f1843ae7d04ede854f54fae74282a1a50c2 | |
| parent | 80b1f80b0c6a3024b80551bb681952aaa79735dc (diff) | |
| download | histacom2-554fc5e2b3027f104fceda0421fed4352749d0f8.tar.gz histacom2-554fc5e2b3027f104fceda0421fed4352749d0f8.tar.bz2 histacom2-554fc5e2b3027f104fceda0421fed4352749d0f8.zip | |
fixed up moving to dirs
| -rw-r--r-- | TimeHACK.Engine/DesktopController.cs | 3 | ||||
| -rw-r--r-- | TimeHACK.Engine/SaveSystem.cs | 23 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs | 22 | ||||
| -rw-r--r-- | TimeHACK.Main/Properties/Resources.Designer.cs | 20 | ||||
| -rw-r--r-- | TimeHACK.Main/Properties/Resources.resx | 6 | ||||
| -rw-r--r-- | TimeHACK.Main/Resources/WinClassic/WinClassicNotepadBig.png | bin | 0 -> 255 bytes | |||
| -rw-r--r-- | TimeHACK.Main/Resources/WinClassic/WinClassicRegedit.png | bin | 0 -> 291 bytes | |||
| -rw-r--r-- | TimeHACK.Main/TimeHACK.Main.csproj | 2 |
8 files changed, 60 insertions, 16 deletions
diff --git a/TimeHACK.Engine/DesktopController.cs b/TimeHACK.Engine/DesktopController.cs index db84bf8..2cfdcf3 100644 --- a/TimeHACK.Engine/DesktopController.cs +++ b/TimeHACK.Engine/DesktopController.cs @@ -15,8 +15,7 @@ namespace TimeHACK.Engine { string Val = ""; string directoryFileInfo = File.ReadAllText(Path.Combine(reqDirectory, "_data.info")); - FileSystemFolderInfo toRead = new FileSystemFolderInfo(); - toRead = JsonConvert.DeserializeObject<FileSystemFolderInfo>(directoryFileInfo); + FileSystemFolderInfo toRead = JsonConvert.DeserializeObject<FileSystemFolderInfo>(directoryFileInfo); if (returnYesIfProtected == true) { diff --git a/TimeHACK.Engine/SaveSystem.cs b/TimeHACK.Engine/SaveSystem.cs index e374ba9..f328144 100644 --- a/TimeHACK.Engine/SaveSystem.cs +++ b/TimeHACK.Engine/SaveSystem.cs @@ -89,7 +89,7 @@ namespace TimeHACK.Engine { get { - return Path.Combine(ProfileMyComputerDirectory, "Settings"); + return Path.Combine(ProfileMyComputerDirectory, "Documents and Settings"); } } @@ -97,7 +97,7 @@ namespace TimeHACK.Engine { get { - return Path.Combine(ProfileMyComputerDirectory, "Doc"); + return Path.Combine(ProfileMyComputerDirectory, "My Documents"); } } @@ -105,7 +105,7 @@ namespace TimeHACK.Engine { get { - return Path.Combine(ProfileMyComputerDirectory, "Prog"); + return Path.Combine(ProfileMyComputerDirectory, "Program Files"); } } @@ -113,7 +113,7 @@ namespace TimeHACK.Engine { get { - return Path.Combine(ProfileMyComputerDirectory, "Win"); + return Path.Combine(ProfileMyComputerDirectory, "Windows"); } } @@ -160,13 +160,13 @@ namespace TimeHACK.Engine SaveDirectoryInfo(ProfileDirectory, "folders", false, "My Computer", false); SaveDirectoryInfo(ProfileFileSystemDirectory, "CDrive", false, "C:", true); - if (CurrentSave.CurrentOS == "95" || CurrentSave.CurrentOS == "98") SaveDirectoryInfo(ProfileMyComputerDirectory, "Doc", false, "My Documents", true); - if (CurrentSave.CurrentOS == "2000" || CurrentSave.CurrentOS == "ME") SaveDirectoryInfo(ProfileMyComputerDirectory, "Settings", false, "Documents and Settings", true); - SaveDirectoryInfo(ProfileMyComputerDirectory, "Prog", true, "Program Files", true); + if (CurrentSave.CurrentOS == "95" || CurrentSave.CurrentOS == "98") SaveDirectoryInfo(ProfileMyComputerDirectory, "My Documents", false, "My Documents", true); + if (CurrentSave.CurrentOS == "2000" || CurrentSave.CurrentOS == "ME") SaveDirectoryInfo(ProfileMyComputerDirectory, "Documents and Settings", false, "Documents and Settings", true); + SaveDirectoryInfo(ProfileMyComputerDirectory, "Program Files", true, "Program Files", true); SaveDirectoryInfo(ProfileProgramsDirectory, "Accessories", false, "Accessories", true); SaveDirectoryInfo(ProfileProgramsDirectory, "Internet Explorer", true, "Internet Explorer", true); SaveDirectoryInfo(ProfileProgramsDirectory, "The Microsoft Network", true, "The Microsoft Network", true); - SaveDirectoryInfo(ProfileMyComputerDirectory, "Win", true, "Windows", true); + SaveDirectoryInfo(ProfileMyComputerDirectory, "Windows", true, "Windows", true); CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Accessories"), "wordpad.exe", "wordpad"); CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Internet Explorer"), "ie20.exe", "ie"); @@ -186,9 +186,10 @@ namespace TimeHACK.Engine SaveDirectoryInfo(ProfileWindowsDirectory, "Temp", true, "Temp", true); SaveDirectoryInfo(ProfileWindowsDirectory, "Desktop", true, "Desktop", true); - CreateWindowsFile(ProfileWindowsDirectory, "calc.exe", "calc", 10, 59392); - CreateWindowsFile(ProfileWindowsDirectory, "explorer.exe", "explorer", 10, 204288); - CreateWindowsFile(ProfileWindowsDirectory, "notepad.exe", "notepad", 12, 34034); + CreateWindowsFile(ProfileWindowsDirectory, "calc.exe", "calc", 13, 59392); + CreateWindowsFile(ProfileWindowsDirectory, "explorer.exe", "explorer", 0, 204288); + CreateWindowsFile(ProfileWindowsDirectory, "notepad.exe", "notepad", 14, 34034); + CreateWindowsFile(ProfileWindowsDirectory, "regedit.exe", "regedit", 15, 120320); } public static void CreateWindowsFile(string filepath, string filename, string contents, int fileicon = 8, int bytes = 512) 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<FileSystemFolderInfo>(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 @@ -271,6 +278,15 @@ namespace TimeHACK.OS.Win95.Win95Apps 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); Program.AddTaskbarItem(appWP, appWP.Tag.ToString(), "Wordpad", Properties.Resources.WinClassicWordpad); @@ -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 @@ -1294,6 +1294,16 @@ namespace TimeHACK.Properties { /// <summary> /// Looks up a localized resource of type System.Drawing.Bitmap. /// </summary> + internal static System.Drawing.Bitmap WinClassicNotepadBig { + get { + object obj = ResourceManager.GetObject("WinClassicNotepadBig", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> internal static System.Drawing.Bitmap WinClassicOpenFolderSmall { get { object obj = ResourceManager.GetObject("WinClassicOpenFolderSmall", resourceCulture); @@ -1354,6 +1364,16 @@ namespace TimeHACK.Properties { /// <summary> /// Looks up a localized resource of type System.Drawing.Bitmap. /// </summary> + internal static System.Drawing.Bitmap WinClassicRegedit { + get { + object obj = ResourceManager.GetObject("WinClassicRegedit", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> internal static System.Drawing.Bitmap WinClassicRun { get { object obj = ResourceManager.GetObject("WinClassicRun", resourceCulture); 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 @@ <data name="WinClassicCalcBig" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\WinClassic\WinClassicCalcBig.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> + <data name="WinClassicNotepadBig" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\WinClassic\WinClassicNotepadBig.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="WinClassicRegedit" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\WinClassic\WinClassicRegedit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> </root>
\ No newline at end of file diff --git a/TimeHACK.Main/Resources/WinClassic/WinClassicNotepadBig.png b/TimeHACK.Main/Resources/WinClassic/WinClassicNotepadBig.png Binary files differnew file mode 100644 index 0000000..394fce2 --- /dev/null +++ b/TimeHACK.Main/Resources/WinClassic/WinClassicNotepadBig.png diff --git a/TimeHACK.Main/Resources/WinClassic/WinClassicRegedit.png b/TimeHACK.Main/Resources/WinClassic/WinClassicRegedit.png Binary files differnew file mode 100644 index 0000000..045e4ec --- /dev/null +++ b/TimeHACK.Main/Resources/WinClassic/WinClassicRegedit.png 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 @@ <None Include="Resources\WinClassic\WinClassicNotepad.png" /> <None Include="Resources\WinClassic\WinClassicNew.png" /> <None Include="Resources\WinClassic\WinClassicOpenFolderSmall.png" /> + <None Include="Resources\WinClassic\WinClassicNotepadBig.png" /> <Content Include="Resources\WinClassic\WinClassicOutlook.png" /> <None Include="Resources\WinClassic\WinClassicPaste.png" /> <Content Include="Resources\WinClassic\WinClassicProgramItem.png" /> <Content Include="Resources\WinClassic\WinClassicPrograms.png" /> <Content Include="Resources\WinClassic\WinClassicRecycle.png" /> + <None Include="Resources\WinClassic\WinClassicRegedit.png" /> <Content Include="Resources\WinClassic\WinClassicRun.png" /> <Content Include="Resources\WinClassic\WinClassicSettings.png" /> <None Include="Resources\WinClassic\WinClassicSetup.png" /> |
