aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-08-05 08:29:30 -0400
committerlempamo <[email protected]>2017-08-05 08:29:30 -0400
commit4084b7f6e83cdc52114b3b9e579d5d7f505174d1 (patch)
tree59e6d4f7fdca70c6b196e0b074248869379349d7
parent00308c81c9f85a4142d15ec1e6e35e58d4437cde (diff)
downloadhistacom2-4084b7f6e83cdc52114b3b9e579d5d7f505174d1.tar.gz
histacom2-4084b7f6e83cdc52114b3b9e579d5d7f505174d1.tar.bz2
histacom2-4084b7f6e83cdc52114b3b9e579d5d7f505174d1.zip
fixed not all icons showing
-rw-r--r--TimeHACK.Engine/SaveSystem.cs15
-rw-r--r--TimeHACK.Main/GlobalPrograms/WinClassicDownloader.cs4
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs14
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs5
4 files changed, 20 insertions, 18 deletions
diff --git a/TimeHACK.Engine/SaveSystem.cs b/TimeHACK.Engine/SaveSystem.cs
index f7dc954..5a90902 100644
--- a/TimeHACK.Engine/SaveSystem.cs
+++ b/TimeHACK.Engine/SaveSystem.cs
@@ -168,10 +168,10 @@ namespace TimeHACK.Engine
SaveDirectoryInfo(ProfileProgramsDirectory, "The Microsoft Network", true, "The Microsoft Network", true);
SaveDirectoryInfo(ProfileMyComputerDirectory, "Windows", true, "Windows", true);
- CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Accessories"), "wordpad.exe", "wordpad");
- CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Internet Explorer"), "ie20.exe", "ie");
- CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Internet Explorer"), "lnfinst.exe", "iebrokeninstaller");
- CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "The Microsoft Network"), "msnver.txt", "5900");
+ CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Accessories"), "wordpad.exe", "wordpad", 16, 183296);
+ CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Internet Explorer"), "ie20.exe", "ie", 8, 512);
+ CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Internet Explorer"), "lnfinst.exe", "iebrokeninstaller", 8, 512);
+ CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "The Microsoft Network"), "msnver.txt", "5900", 12, 4);
CreateWindowsDirectory();
}
@@ -185,8 +185,7 @@ namespace TimeHACK.Engine
SaveDirectoryInfo(ProfileWindowsDirectory, "Help", true, "Help", true);
SaveDirectoryInfo(ProfileWindowsDirectory, "Temp", true, "Temp", true);
SaveDirectoryInfo(ProfileWindowsDirectory, "Desktop", true, "Desktop", true);
-
- CreateWindowsFile(ProfileWindowsDirectory, "c", "", 8, 515);
+
CreateWindowsFile(ProfileWindowsDirectory, "calc.exe", "calc", 13, 59392);
CreateWindowsFile(ProfileWindowsDirectory, "emm386.exe", "emm386", 10, 125495);
CreateWindowsFile(ProfileWindowsDirectory, "explorer.exe", "explorer", 0, 204288);
@@ -196,7 +195,7 @@ namespace TimeHACK.Engine
CreateWindowsFile(ProfileWindowsDirectory, "write.exe", "wordpad", 16, 5120);
}
- public static void CreateWindowsFile(string filepath, string filename, string contents, int fileicon = 8, int bytes = 512)
+ public static void CreateWindowsFile(string filepath, string filename, string contents, int fileicon, int bytes)
{
File.WriteAllText(Path.Combine(filepath, filename), contents);
THFileInfo info = new THFileInfo();
@@ -251,7 +250,7 @@ namespace TimeHACK.Engine
// Add Address Book into existance!
SaveDirectoryInfo(ProfileProgramsDirectory, "Outlook Express", false, "Outlook Express", true);
- CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Outlook Express"), "WAB.exe", "addressbook");
+ CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Outlook Express"), "WAB.exe", "addressbook", 8, 512);
// There is no "The Microsoft Network" folder!
diff --git a/TimeHACK.Main/GlobalPrograms/WinClassicDownloader.cs b/TimeHACK.Main/GlobalPrograms/WinClassicDownloader.cs
index 2df5ef2..2cea80b 100644
--- a/TimeHACK.Main/GlobalPrograms/WinClassicDownloader.cs
+++ b/TimeHACK.Main/GlobalPrograms/WinClassicDownloader.cs
@@ -38,10 +38,10 @@ namespace TimeHACK.OS.Win95.Win95Apps
switch (appName.Text)
{
case "Downloading: FTP Client":
- CreateWindowsFile(Path.Combine(ProfileWindowsDirectory, "Desktop"), "FTP Client Setup.exe", "ftp client setup", 11);
+ CreateWindowsFile(Path.Combine(ProfileWindowsDirectory, "Desktop"), "FTP Client Setup.exe", "ftp client setup", 11, 56291);
break;
case "Downloading: Web Chat 1998":
- CreateWindowsFile(Path.Combine(ProfileWindowsDirectory, "Desktop"), "Web Chat Setup.exe", "web chat setup", 11);
+ CreateWindowsFile(Path.Combine(ProfileWindowsDirectory, "Desktop"), "Web Chat Setup.exe", "web chat setup", 11, 34846);
break;
}
/* if (appName.Text == "Downloading: Guess The Number")
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs
index 3debce7..08cbf78 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs
@@ -150,24 +150,24 @@ namespace TimeHACK.OS.Win95.Win95Apps
itm = this.mainView.Items.Add(Path.GetFileName(str));
itm.Tag = str;
}
- else return;
+ else break;
}
- else return;
- } else {
+ else break;
+ }
+ else {
if (!(Path.GetFileName(str) == "_data.info"))
{
itm = this.mainView.Items.Add(Path.GetFileName(str));
itm.Tag = str;
}
- else return;
+ else break;
}
FileSystemFolderInfo fsfi = JsonConvert.DeserializeObject<FileSystemFolderInfo>(File.ReadAllText(Path.Combine(CurrentDirectory, "_data.info")));
- foreach(var item in fsfi.Files)
+ foreach (var item in fsfi.Files)
{
Debug.Print(item.Name + " " + Path.GetFileName(str));
- if (item.Name == Path.GetFileName(str)) { itm.ImageIndex = item.FileIcon; return; }
+ if (item.Name == Path.GetFileName(str)) { itm.ImageIndex = item.FileIcon; break; }
}
- itm.ImageIndex = 8;
}
} catch (Exception ex) {
//wm.StartInfobox95("Exploring - C:", "Error with the file explorer \n" + ex.Message, Properties.Resources.Win95Info); add illegal operation dialog here later
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs
index 3117d9c..581b789 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicNotepad.cs
@@ -110,10 +110,13 @@ namespace TimeHACK.OS.Win95.Win95Apps
{
ActivateSaveFileDialog(".txt");
string selectedPath = Program.OpenFileExplorerAsDialogAndReturnGivenPath();
+ List<string> pathList = selectedPath.Split('\\').ToList();
+ pathList.RemoveAt(selectedPath.Split('\\').Count() - 1);
if (selectedPath != "")
{
- File.WriteAllText(selectedPath, mainText.Text);
+ SaveSystem.CreateWindowsFile(pathList.ToString(), selectedPath.Split('\\').Last(), mainText.Text, 12, mainText.Text.Length);
+ //File.WriteAllText(selectedPath, mainText.Text);
}
} catch {
}