From 4af08fc6e341a45158e23beb13be10aa1a6a3590 Mon Sep 17 00:00:00 2001 From: Alex-TIMEHACK Date: Sat, 4 Nov 2017 11:09:57 +0000 Subject: [PATCH] Slight SaveSystem change... read the description WARNING: FROM THIS POINT ON ALL OLD SAVES ARE OUTDATED AND WILL NOT WORK kthx --- Histacom2.Engine/SaveSystem.cs | 3 +++ .../WinClassicAddressBook.Designer.cs | 23 ++++++++++--------- .../AddressBook/WinClassicAddressBook.cs | 19 +++++++++++++++ 3 files changed, 34 insertions(+), 11 deletions(-) diff --git a/Histacom2.Engine/SaveSystem.cs b/Histacom2.Engine/SaveSystem.cs index 0975a2b..a3fd2ef 100644 --- a/Histacom2.Engine/SaveSystem.cs +++ b/Histacom2.Engine/SaveSystem.cs @@ -190,6 +190,7 @@ public static void CheckFiles() public static void CreateWindowsDirectory() { + SaveDirectoryInfo(ProfileWindowsDirectory, "Application Data", true, "Application Data", true); SaveDirectoryInfo(ProfileWindowsDirectory, "System", true, "System", true); SaveDirectoryInfo(ProfileWindowsDirectory, "Config", true, "Config", true); SaveDirectoryInfo(ProfileWindowsDirectory, "Cursors", true, "Cursors", true); @@ -337,6 +338,8 @@ public static void UpgradeFileSystem(string newOS) // Add Address Book into existance! SaveDirectoryInfo(ProfileProgramsDirectory, "Outlook Express", false, "Outlook Express", true); + SaveDirectoryInfo(Path.Combine(ProfileWindowsDirectory, "Application Data"), "Microsoft", false, "Microsoft", true); + SaveDirectoryInfo(Path.Combine(ProfileWindowsDirectory, "Application Data", "Microsoft"), "Address Book", false, "Address Book", true); CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Outlook Express"), "WAB.exe", "addressbook", 8, 512); // There is no "The Microsoft Network" folder! diff --git a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs index 20f5af2..09030fb 100644 --- a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs +++ b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs @@ -105,67 +105,67 @@ private void InitializeComponent() // newContactToolStripMenuItem // this.newContactToolStripMenuItem.Name = "newContactToolStripMenuItem"; - this.newContactToolStripMenuItem.Size = new System.Drawing.Size(150, 22); + this.newContactToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.newContactToolStripMenuItem.Text = "New contact..."; this.newContactToolStripMenuItem.Click += new System.EventHandler(this.newContactToolStripMenuItem_Click); // // newFolderToolStripMenuItem // this.newFolderToolStripMenuItem.Name = "newFolderToolStripMenuItem"; - this.newFolderToolStripMenuItem.Size = new System.Drawing.Size(150, 22); + this.newFolderToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.newFolderToolStripMenuItem.Text = "New folder..."; this.newFolderToolStripMenuItem.Click += new System.EventHandler(this.newFolderToolStripMenuItem_Click); // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(147, 6); + this.toolStripSeparator1.Size = new System.Drawing.Size(149, 6); // // propertiesToolStripMenuItem // this.propertiesToolStripMenuItem.Name = "propertiesToolStripMenuItem"; - this.propertiesToolStripMenuItem.Size = new System.Drawing.Size(150, 22); + this.propertiesToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.propertiesToolStripMenuItem.Text = "Properties"; this.propertiesToolStripMenuItem.Click += new System.EventHandler(this.propertiesToolStripMenuItem_Click); // // deleteToolStripMenuItem // this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem"; - this.deleteToolStripMenuItem.Size = new System.Drawing.Size(150, 22); + this.deleteToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.deleteToolStripMenuItem.Text = "Delete"; this.deleteToolStripMenuItem.Click += new System.EventHandler(this.deleteToolStripMenuItem_Click); // // toolStripSeparator2 // this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(147, 6); + this.toolStripSeparator2.Size = new System.Drawing.Size(149, 6); // // importToolStripMenuItem // this.importToolStripMenuItem.Name = "importToolStripMenuItem"; - this.importToolStripMenuItem.Size = new System.Drawing.Size(150, 22); + this.importToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.importToolStripMenuItem.Text = "Import..."; // // exportToolStripMenuItem // this.exportToolStripMenuItem.Name = "exportToolStripMenuItem"; - this.exportToolStripMenuItem.Size = new System.Drawing.Size(150, 22); + this.exportToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.exportToolStripMenuItem.Text = "Export..."; // // toolStripSeparator3 // this.toolStripSeparator3.Name = "toolStripSeparator3"; - this.toolStripSeparator3.Size = new System.Drawing.Size(147, 6); + this.toolStripSeparator3.Size = new System.Drawing.Size(149, 6); // // toolStripSeparator4 // this.toolStripSeparator4.Name = "toolStripSeparator4"; - this.toolStripSeparator4.Size = new System.Drawing.Size(147, 6); + this.toolStripSeparator4.Size = new System.Drawing.Size(149, 6); // // exitToolStripMenuItem // this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; - this.exitToolStripMenuItem.Size = new System.Drawing.Size(150, 22); + this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.exitToolStripMenuItem.Text = "Exit"; this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); // @@ -350,6 +350,7 @@ private void InitializeComponent() this.Controls.Add(this.topmenu); this.Name = "WinClassicAddressBook"; this.Size = new System.Drawing.Size(666, 425); + this.Load += new System.EventHandler(this.WinClassicAddressBook_Load); this.topmenu.ResumeLayout(false); this.topmenu.PerformLayout(); this.toolbar.ResumeLayout(false); diff --git a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs index 0c6701a..e4d6c7b 100644 --- a/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs +++ b/Histacom2/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs @@ -299,6 +299,25 @@ private void aboutAddressBookToolStripMenuItem_Click(object sender, EventArgs e) { } + + private void WinClassicAddressBook_Load(object sender, EventArgs e) + { + ((Form)this.TopLevelControl).FormClosed += (sender2, e2) => + { + SaveData(); + }; + } + + public void SaveData() + { + + } + + public void SaveDataAs() + { + + } + } public class AddressBookContact