diff options
| -rw-r--r-- | Histacom2.Engine/SaveSystem.cs | 56 | ||||
| -rw-r--r-- | Histacom2/OS/Win95/Win95.Designer.cs | 6 | ||||
| -rw-r--r-- | Histacom2/OS/Win95/Win95.resx | 2 | ||||
| -rw-r--r-- | Histacom2/OS/Win95/Win95Apps/Story/Hack1.cs | 5 | ||||
| -rw-r--r-- | Histacom2/OS/Win95/Win95Apps/Story/Hack2.cs | 2 | ||||
| -rw-r--r-- | Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs | 10 | ||||
| -rw-r--r-- | Histacom2/OS/Win98/Win98.cs | 2 | ||||
| -rw-r--r-- | Histacom2/Resources/WinClassic/Win95SideBar.png | bin | 835 -> 843 bytes |
8 files changed, 49 insertions, 34 deletions
diff --git a/Histacom2.Engine/SaveSystem.cs b/Histacom2.Engine/SaveSystem.cs index ef98c10..5557dca 100644 --- a/Histacom2.Engine/SaveSystem.cs +++ b/Histacom2.Engine/SaveSystem.cs @@ -235,36 +235,46 @@ namespace Histacom2.Engine File.WriteAllText(Path.Combine(path, "_data.info"), toWrite); } - public static void UpgradeFileSystem(string oldOS, string newOS) + public static void RemoveFileFromDirectory(string path, string filename) { - switch (oldOS) + FileSystemFolderInfo fsfi = JsonConvert.DeserializeObject<FileSystemFolderInfo>(File.ReadAllText(Path.Combine(path, "_data.info"))); + THFileInfo fi = fsfi.Files.Find((THFileInfo f) => { return f.Name == filename; }); + if (fi == null) return; + + fsfi.ByteSize -= fi.ByteSize; + CurrentSave.BytesLeft += fi.ByteSize; + + fsfi.Files.Remove(fi); + string toWrite = JsonConvert.SerializeObject(fsfi, Formatting.Indented); + + File.WriteAllText(Path.Combine(path, "_data.info"), toWrite); + } + + public static void UpgradeFileSystem(string newOS) + { + if (newOS == "98" || newOS == "2000" || newOS == "ME") { - case "95": - if (newOS == "98" || newOS == "2000" || newOS == "ME") - { - // We are upgrading from the old WinClassic file System to the new WinClassic filesystem! - // All the above OSes share basically the same file layout! - // (Excluding Documents And Settings) which is 2000 and ME only + // We are upgrading from the old WinClassic file System to the new WinClassic filesystem! + // All the above OSes share basically the same file layout! + // (Excluding Documents And Settings) which is 2000 and ME only - // Add Address Book into existance! + // Add Address Book into existance! - SaveDirectoryInfo(ProfileProgramsDirectory, "Outlook Express", false, "Outlook Express", true); - CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Outlook Express"), "WAB.exe", "addressbook", 8, 512); + SaveDirectoryInfo(ProfileProgramsDirectory, "Outlook Express", false, "Outlook Express", true); + CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Outlook Express"), "WAB.exe", "addressbook", 8, 512); - // There is no "The Microsoft Network" folder! + // There is no "The Microsoft Network" folder! - if (Directory.Exists(Path.Combine(ProfileProgramsDirectory, "The Microsoft Network"))) Directory.Delete(Path.Combine(ProfileProgramsDirectory, "The Microsoft Network"), true); - FileSystemFolderInfo fsfi = JsonConvert.DeserializeObject<FileSystemFolderInfo>(File.ReadAllText(Path.Combine(ProfileProgramsDirectory, "_data.info"))); - foreach (THDirInfo dir in fsfi.SubDirs) - { - if (dir.Name == "The Microsoft Network") - { - fsfi.SubDirs.Remove(dir); - break; - } - } + if (Directory.Exists(Path.Combine(ProfileProgramsDirectory, "The Microsoft Network"))) Directory.Delete(Path.Combine(ProfileProgramsDirectory, "The Microsoft Network"), true); + FileSystemFolderInfo fsfi = JsonConvert.DeserializeObject<FileSystemFolderInfo>(File.ReadAllText(Path.Combine(ProfileProgramsDirectory, "_data.info"))); + foreach (THDirInfo dir in fsfi.SubDirs) + { + if (dir.Name == "The Microsoft Network") + { + fsfi.SubDirs.Remove(dir); + break; } - break; + } } } diff --git a/Histacom2/OS/Win95/Win95.Designer.cs b/Histacom2/OS/Win95/Win95.Designer.cs index 753dfd6..40f40ca 100644 --- a/Histacom2/OS/Win95/Win95.Designer.cs +++ b/Histacom2/OS/Win95/Win95.Designer.cs @@ -218,7 +218,7 @@ namespace Histacom2.OS.Win95 this.SuspendToolStripMenuItem, this.ShutdownToolStripMenuItem}); this.startmenuitems.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.VerticalStackWithOverflow; - this.startmenuitems.Location = new System.Drawing.Point(28, 2); + this.startmenuitems.Location = new System.Drawing.Point(26, 2); this.startmenuitems.Margin = new System.Windows.Forms.Padding(0, 0, 5, 0); this.startmenuitems.Name = "startmenuitems"; this.startmenuitems.Padding = new System.Windows.Forms.Padding(6, 2, 0, 0); @@ -930,7 +930,7 @@ namespace Histacom2.OS.Win95 this.ossidestartmenu.Controls.Add(this.osimage); this.ossidestartmenu.Location = new System.Drawing.Point(0, 0); this.ossidestartmenu.Name = "ossidestartmenu"; - this.ossidestartmenu.Size = new System.Drawing.Size(26, 297); + this.ossidestartmenu.Size = new System.Drawing.Size(23, 297); this.ossidestartmenu.TabIndex = 4; // // osimage @@ -939,7 +939,7 @@ namespace Histacom2.OS.Win95 this.osimage.Image = global::Histacom2.Properties.Resources.Win95SideBar; this.osimage.Location = new System.Drawing.Point(0, 0); this.osimage.Name = "osimage"; - this.osimage.Size = new System.Drawing.Size(26, 297); + this.osimage.Size = new System.Drawing.Size(23, 297); this.osimage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.osimage.TabIndex = 0; this.osimage.TabStop = false; diff --git a/Histacom2/OS/Win95/Win95.resx b/Histacom2/OS/Win95/Win95.resx index 25103b3..419e624 100644 --- a/Histacom2/OS/Win95/Win95.resx +++ b/Histacom2/OS/Win95/Win95.resx @@ -374,7 +374,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACO - hAAAAk1TRnQBSQFMAgEBDQEAATQBAgE0AQIBIAEAASABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAGA + hAAAAk1TRnQBSQFMAgEBDQEAAUQBAgFEAQIBIAEAASABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAGA AwABgAMAAQEBAAEgBwABASQAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/ AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH//wChAAOAAf8DwAH/ A8AB/wPAAf8DwAH/A8AB/wPAAf8DwAH/A8AB/wPAAf8DwAH/A8AB/wPAAf8DwAH/A8AB/wPAAf8DwAH/ diff --git a/Histacom2/OS/Win95/Win95Apps/Story/Hack1.cs b/Histacom2/OS/Win95/Win95Apps/Story/Hack1.cs index 54716e5..b988092 100644 --- a/Histacom2/OS/Win95/Win95Apps/Story/Hack1.cs +++ b/Histacom2/OS/Win95/Win95Apps/Story/Hack1.cs @@ -13,12 +13,11 @@ using Histacom2.Engine.Template; namespace Histacom2.OS.Win95.Win95Apps.Story { - static class Hack1 : Object + static class Hack1 : object { static WindowManager wm = new WindowManager(); static bool ended = false; static Thread soundThread = new Thread(dialup_sound_play); - static bool devMode = true; // This is the very first story script! public static void StartObjective() @@ -28,7 +27,7 @@ namespace Histacom2.OS.Win95.Win95Apps.Story tmr.Interval = 1; tmr.Tick += new EventHandler(CheckIfSoundFinished); - if (devMode == true) ContinueObjective(); + if (SaveSystem.DevMode) ContinueObjective(); else { soundThread.Start(); diff --git a/Histacom2/OS/Win95/Win95Apps/Story/Hack2.cs b/Histacom2/OS/Win95/Win95Apps/Story/Hack2.cs index 1dc99da..76b9baf 100644 --- a/Histacom2/OS/Win95/Win95Apps/Story/Hack2.cs +++ b/Histacom2/OS/Win95/Win95Apps/Story/Hack2.cs @@ -270,7 +270,7 @@ namespace Histacom2.OS.Win95.Win95Apps.Story await Task.Delay(2000); sp.Stop(); - SaveSystem.UpgradeFileSystem("95", "98"); + SaveSystem.UpgradeFileSystem("98"); SaveSystem.CurrentSave.CurrentOS = "98"; SaveSystem.currentTheme = new Default98Theme(); SaveSystem.CurrentSave.ThemeName = "default98"; diff --git a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs index 9e0d2e5..e015eda 100644 --- a/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs +++ b/Histacom2/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs @@ -108,7 +108,7 @@ // // MenuStrip1 // - this.MenuStrip1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(212)))), ((int)(((byte)(208)))), ((int)(((byte)(200))))); + this.MenuStrip1.BackColor = System.Drawing.Color.Silver; this.MenuStrip1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.MenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.FileToolStripMenuItem, @@ -139,7 +139,7 @@ this.TextDocumentToolStripMenuItem, this.BitmapImageToolStripMenuItem}); this.CreateShortcutToolStripMenuItem.Name = "CreateShortcutToolStripMenuItem"; - this.CreateShortcutToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.CreateShortcutToolStripMenuItem.Size = new System.Drawing.Size(117, 22); this.CreateShortcutToolStripMenuItem.Text = "New"; // // FolderToolStripMenuItem @@ -149,6 +149,12 @@ this.FolderToolStripMenuItem.Text = "Folder"; this.FolderToolStripMenuItem.Click += new System.EventHandler(this.FolderToolStripMenuItem_Click); // + // ShortcutToolStripMenuItem + // + this.ShortcutToolStripMenuItem.Name = "ShortcutToolStripMenuItem"; + this.ShortcutToolStripMenuItem.Size = new System.Drawing.Size(154, 22); + this.ShortcutToolStripMenuItem.Text = "Shortcut"; + // // TextDocumentToolStripMenuItem // this.TextDocumentToolStripMenuItem.Name = "TextDocumentToolStripMenuItem"; diff --git a/Histacom2/OS/Win98/Win98.cs b/Histacom2/OS/Win98/Win98.cs index 3f75af7..146aa3c 100644 --- a/Histacom2/OS/Win98/Win98.cs +++ b/Histacom2/OS/Win98/Win98.cs @@ -71,7 +71,7 @@ namespace Histacom2.OS.Win98 // When New Game is clicked in TitleScreen.cs private void Desktop_Load(object sender, EventArgs e) { - UpgradeFileSystem("95", "98"); + UpgradeFileSystem( "98"); if (currentTheme.defaultWallpaper != null) desktopicons.BackgroundImage = new Bitmap(currentTheme.defaultWallpaper, Width, Height); //Start Menu Color - Commented until it works reliably diff --git a/Histacom2/Resources/WinClassic/Win95SideBar.png b/Histacom2/Resources/WinClassic/Win95SideBar.png Binary files differindex 2f0e77b..f0ae5ab 100644 --- a/Histacom2/Resources/WinClassic/Win95SideBar.png +++ b/Histacom2/Resources/WinClassic/Win95SideBar.png |
