From 10dce4105839265a835ecd99b656616a2335e314 Mon Sep 17 00:00:00 2001 From: Alex-TIMEHACK Date: Fri, 21 Jul 2017 18:10:05 +0100 Subject: Made the File Explorer open EXE files Not real ones though --- TimeHACK.Engine/SaveSystem.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'TimeHACK.Engine/SaveSystem.cs') diff --git a/TimeHACK.Engine/SaveSystem.cs b/TimeHACK.Engine/SaveSystem.cs index cd8bb2f..6450fcb 100644 --- a/TimeHACK.Engine/SaveSystem.cs +++ b/TimeHACK.Engine/SaveSystem.cs @@ -15,8 +15,6 @@ namespace TimeHACK.Engine public static FileSystemFolderInfo filesystemflinfo { get; set; } public static bool DevMode = false; - public static FileAssociation IconChanger = new FileAssociation(); - public static Theme currentTheme { get; set; } public static string GameDirectory @@ -161,7 +159,7 @@ namespace TimeHACK.Engine Directory.CreateDirectory(ProfileFileSystemDirectory); SaveDirectoryInfo(ProfileFileSystemDirectory, false, "My Computer", false); - SaveDirectoryInfo(ProfileMyComputerDirectory, false, "Win95", true); + SaveDirectoryInfo(ProfileMyComputerDirectory, false, "Win95 (C:)", true); if (CurrentSave.CurrentOS == "95") SaveDirectoryInfo(ProfileDocumentsDirectory, false, "My Documents", true); if (CurrentSave.CurrentOS != "95") SaveDirectoryInfo(ProfileSettingsDirectory, false, "Documents and Settings", true); SaveDirectoryInfo(ProfileProgramsDirectory, true, "Program Files", true); @@ -179,8 +177,8 @@ namespace TimeHACK.Engine SaveDirectoryInfo(Path.Combine(ProfileWindowsDirectory, "Help"), true, "Help", true); SaveDirectoryInfo(Path.Combine(ProfileWindowsDirectory, "Temp"), true, "Temp", true); - CreateWindowsFile(Path.Combine(ProfileWindowsDirectory, "calc.exe"), "Calculator"); - CreateWindowsFile(Path.Combine(ProfileWindowsDirectory, "explorer.exe"), "windowsexplorer"); + CreateWindowsFile(Path.Combine(ProfileWindowsDirectory, "calc.exe"), "calc"); + CreateWindowsFile(Path.Combine(ProfileWindowsDirectory, "explorer.exe"), "explorer"); } public static void CreateWindowsFile(string filepath, string contents) -- cgit v1.2.3 From 2c87ba5fdef12cb62d40c5a9d2513ce097ac0aa9 Mon Sep 17 00:00:00 2001 From: Alex-TIMEHACK Date: Fri, 21 Jul 2017 22:14:23 +0100 Subject: A lot of backend work! --- TimeHACK.Engine/SaveSystem.cs | 45 ++++++++++++++-------- TimeHACK.Main/OS/Win95/Win95.cs | 8 ++-- .../Win95/Win95Apps/WinClassicWindowsExplorer.cs | 23 +++++++---- .../Win95/Win95Apps/WinClassicWordPad.Designer.cs | 3 -- TimeHACK.Main/Program.cs | 3 ++ .../SaveDialogs/LoadGameDialog.Designer.cs | 4 +- .../SaveDialogs/SaveFileTroubleShooter.cs | 27 ++++++++++++- 7 files changed, 82 insertions(+), 31 deletions(-) (limited to 'TimeHACK.Engine/SaveSystem.cs') diff --git a/TimeHACK.Engine/SaveSystem.cs b/TimeHACK.Engine/SaveSystem.cs index 6450fcb..c9c2025 100644 --- a/TimeHACK.Engine/SaveSystem.cs +++ b/TimeHACK.Engine/SaveSystem.cs @@ -6,6 +6,7 @@ using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; using System.Diagnostics; +using System.Windows.Forms; namespace TimeHACK.Engine { @@ -14,6 +15,7 @@ namespace TimeHACK.Engine public static Save CurrentSave { get; set; } public static FileSystemFolderInfo filesystemflinfo { get; set; } public static bool DevMode = false; + public static Form troubleshooter; public static Theme currentTheme { get; set; } @@ -94,21 +96,31 @@ namespace TimeHACK.Engine public static bool LoadSave() { - // ON A FINAL RELEASE USE THE "FINAL RELEASE THINGS" - #region Final Release Things - //Read base64 string from file - //string b64 = File.ReadAllText(Path.Combine(ProfileDirectory, ProfileFile)); - //Get Unicode byte array - //byte[] bytes = Convert.FromBase64String(b64); - //Decode the Unicode - //string json = Encoding.UTF8.GetString(bytes); - //Deserialize save object. - #endregion - // USE THE THINGS IN THE "DEVELOPER THINGS" FOR A DEVELOPMENT RELEASE - #region Developer Things - string json = File.ReadAllText(Path.Combine(ProfileDirectory, ProfileFile)); - #endregion - CurrentSave = JsonConvert.DeserializeObject(json); + try + { + // ON A FINAL RELEASE USE THE "FINAL RELEASE THINGS" + #region Final Release Things + //Read base64 string from file + //string b64 = File.ReadAllText(Path.Combine(ProfileDirectory, ProfileFile)); + //Get Unicode byte array + //byte[] bytes = Convert.FromBase64String(b64); + //Decode the Unicode + //string json = Encoding.UTF8.GetString(bytes); + //Deserialize save object. + #endregion + // USE THE THINGS IN THE "DEVELOPER THINGS" FOR A DEVELOPMENT RELEASE + #region Developer Things + string json = File.ReadAllText(Path.Combine(ProfileDirectory, ProfileFile)); + #endregion + CurrentSave = JsonConvert.DeserializeObject(json); + + } catch + { + MessageBox.Show("WARNING! It looks like this save is corrupt!"); + MessageBox.Show("We will now open the Save troubleshooter"); + + troubleshooter.ShowDialog(); + } return true; } @@ -162,6 +174,9 @@ namespace TimeHACK.Engine SaveDirectoryInfo(ProfileMyComputerDirectory, false, "Win95 (C:)", true); if (CurrentSave.CurrentOS == "95") SaveDirectoryInfo(ProfileDocumentsDirectory, false, "My Documents", true); if (CurrentSave.CurrentOS != "95") SaveDirectoryInfo(ProfileSettingsDirectory, false, "Documents and Settings", true); + SaveDirectoryInfo(Path.Combine(ProfileProgramsDirectory, "Accessories"), false, "Accessories", true); + CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Accessories", "wordpad.exe"), "wordpad"); + CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Accessories", "mspaint.exe"), "mspaint"); SaveDirectoryInfo(ProfileProgramsDirectory, true, "Program Files", true); SaveDirectoryInfo(ProfileWindowsDirectory, true, "Windows", true); diff --git a/TimeHACK.Main/OS/Win95/Win95.cs b/TimeHACK.Main/OS/Win95/Win95.cs index d968dd4..4e61bb7 100644 --- a/TimeHACK.Main/OS/Win95/Win95.cs +++ b/TimeHACK.Main/OS/Win95/Win95.cs @@ -103,7 +103,10 @@ namespace TimeHACK.OS.Win95 this.SendToBack(); // Update the taskbar - UpdateTaskbar(); + UpdateTaskbar(); + + // Bring to this the front + this.BringToFront(); //Check if it is the first time if (CurrentSave.FTime95 == false) @@ -118,8 +121,7 @@ namespace TimeHACK.OS.Win95 nonimportantapps[nonimportantapps.Count - 1].BringToFront(); nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing); - // Bring to this the front - this.BringToFront(); + app.BringToFront(); diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs index 8a57563..f7748fe 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs @@ -25,7 +25,7 @@ namespace TimeHACK.OS.Win95.Win95Apps string currentDirectory = Path.Combine(ProfileDirectory, "folders", "Computer"); string oldLabelText; int fileType = 6; - string attemptedDirectory = ""; + //string attemptedDirectory = ""; WindowManager wm = new WindowManager(); public WinClassicWindowsExplorer() @@ -169,11 +169,14 @@ namespace TimeHACK.OS.Win95.Win95Apps case "explorer": Engine.Template.WinClassic app = wm.StartWin95(new WinClassicWindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); Program.AddTaskbarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); - break; case "calc": - Engine.Template.WinClassic appCalc = wm.StartWin95(new WinClassicCalculator(), "Windows Explorer", Properties.Resources.WinClassicCalc, true, true); - Program.AddTaskbarItem(appCalc, appCalc.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicCalc); + Engine.Template.WinClassic appCalc = wm.StartWin95(new WinClassicCalculator(), "Calculator", Properties.Resources.WinClassicCalc, true, true); + Program.AddTaskbarItem(appCalc, appCalc.Tag.ToString(), "Calculator", Properties.Resources.WinClassicCalc); + break; + case "wordpad": + Engine.Template.WinClassic appWP = wm.StartWin95(new WinClassicWordPad(), "Wordpad", Properties.Resources.WinClassicWordpad, true, true); + Program.AddTaskbarItem(appWP, appWP.Tag.ToString(), "Wordpad", Properties.Resources.WinClassicWordpad); break; } } @@ -679,23 +682,29 @@ namespace TimeHACK.OS.Win95.Win95Apps { try { - if (!File.Exists(Path.Combine(currentDirectory, mainView.FocusedItem.Text))) + if (!FileOrDirectoryExists(Path.Combine(currentDirectory, mainView.FocusedItem.Text))) { wm.StartInfobox95("Windows Explorer", "This directory doesn't exist", Properties.Resources.Win95Info); } else { - Directory.Delete(currentDirectory + mainView.FocusedItem.Text, true); + if (Directory.Exists(Path.Combine(currentDirectory, mainView.FocusedItem.Text))) Directory.Delete(Path.Combine(currentDirectory, mainView.FocusedItem.Text), true); + else File.Delete(Path.Combine(currentDirectory, mainView.FocusedItem.Text)); RefreshAll(); } } catch { - + RefreshAll(); } } + internal static bool FileOrDirectoryExists(string path) + { + return (Directory.Exists(path) || File.Exists(path)); + } + private void CloseToolStripMenuItem_Click(object sender, EventArgs e) { ((Form)this.TopLevelControl).Close(); diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWordPad.Designer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWordPad.Designer.cs index 465e375..710c51c 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWordPad.Designer.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWordPad.Designer.cs @@ -508,9 +508,6 @@ } #endregion - - private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; - private System.Windows.Forms.ToolStripMenuItem helloToolStripMenuItem; private System.Windows.Forms.MenuStrip topmenu; private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem; diff --git a/TimeHACK.Main/Program.cs b/TimeHACK.Main/Program.cs index 086c084..9534c6d 100644 --- a/TimeHACK.Main/Program.cs +++ b/TimeHACK.Main/Program.cs @@ -13,6 +13,7 @@ using TimeHACK.OS.Win95.Win95Apps; using TimeHACK.Engine; using TimeHACK.Engine.Template; using System.Drawing; +using TimeHACK.SaveDialogs; namespace TimeHACK { @@ -58,6 +59,8 @@ namespace TimeHACK //MySaveData = (TimeHACK.Engine.GameSave.SaveData)JsonConvert.DeserializeObject(TheJSON, MySaveData.GetType()); //MessageBox.Show(MySaveData.OS.ToString()); + + Engine.SaveSystem.troubleshooter = new SaveFileTroubleShooter(); Application.EnableVisualStyles(); Application.Run(title); } diff --git a/TimeHACK.Main/SaveDialogs/LoadGameDialog.Designer.cs b/TimeHACK.Main/SaveDialogs/LoadGameDialog.Designer.cs index 4d8691d..cacfe9e 100644 --- a/TimeHACK.Main/SaveDialogs/LoadGameDialog.Designer.cs +++ b/TimeHACK.Main/SaveDialogs/LoadGameDialog.Designer.cs @@ -48,7 +48,8 @@ // // button3 // - this.button3.Location = new System.Drawing.Point(360, -1); + this.button3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.button3.Location = new System.Drawing.Point(364, 0); this.button3.Name = "button3"; this.button3.Size = new System.Drawing.Size(75, 23); this.button3.TabIndex = 0; @@ -58,6 +59,7 @@ // // button1 // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.button1.Location = new System.Drawing.Point(441, 0); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(75, 23); diff --git a/TimeHACK.Main/SaveDialogs/SaveFileTroubleShooter.cs b/TimeHACK.Main/SaveDialogs/SaveFileTroubleShooter.cs index bcd60d1..5ec84be 100644 --- a/TimeHACK.Main/SaveDialogs/SaveFileTroubleShooter.cs +++ b/TimeHACK.Main/SaveDialogs/SaveFileTroubleShooter.cs @@ -61,7 +61,30 @@ namespace TimeHACK.SaveDialogs // Read the main.save file json = File.ReadAllText(Path.Combine(SaveSystem.ProfileDirectory, "main.save")); - savedata = Newtonsoft.Json.JsonConvert.DeserializeObject(json); + try + { + savedata = Newtonsoft.Json.JsonConvert.DeserializeObject(json); + + } catch + { + WriteToLog("ISSUE FOUND! File main.save is unreadable"); + + WriteToLog("Sorry, there is no repairing it easily, your data will be lost"); + + if (Directory.Exists(Path.Combine(SaveSystem.ProfileDirectory, "main.backup"))) Directory.Delete(Path.Combine(SaveSystem.ProfileDirectory, "main.backup")); + + File.Copy(Path.Combine(SaveSystem.ProfileDirectory, "main.save"), Path.Combine(SaveSystem.ProfileDirectory, "main.backup")); + SaveSystem.NewGame(); + + // Make sure the username is set + + SaveSystem.CurrentSave.Username = SaveSystem.ProfileName; + + WriteToLog($"The corrupt file has been stored in {Path.Combine(SaveSystem.ProfileDirectory, "main.backup")}"); + + EndScan(true); + } + // Check the values @@ -107,7 +130,7 @@ namespace TimeHACK.SaveDialogs // Set the main.save file to the resolved one - File.WriteAllText(Path.Combine(SaveSystem.ProfileDirectory, "main.save"), Newtonsoft.Json.JsonConvert.SerializeObject(savedata)); + File.WriteAllText(Path.Combine(SaveSystem.ProfileDirectory, "main.save"), Newtonsoft.Json.JsonConvert.SerializeObject(savedata, Newtonsoft.Json.Formatting.Indented)); textBox1.Text = log; } else { -- cgit v1.2.3 From 4db6df01a8ee3f40c13b67174c6acc498a060951 Mon Sep 17 00:00:00 2001 From: Alex-TIMEHACK Date: Sat, 22 Jul 2017 09:07:44 +0100 Subject: There is no Address Book in Windows 95 But there is one in Win98! --- TimeHACK.Engine/SaveSystem.cs | 5 +- TimeHACK.Main/OS/Win95/Win95.Designer.cs | 17 +- TimeHACK.Main/OS/Win95/Win95.cs | 9 - TimeHACK.Main/OS/Win95/Win95.resx | 94 +++-- .../FRMWinClassicAddressBookNewContact.Designer.cs | 227 ------------ .../FRMWinClassicAddressBookNewContact.cs | 71 ---- .../FRMWinClassicAddressBookNewContact.resx | 120 ------- .../FRMWinClassicAddressBookNewFolder.Designer.cs | 81 ----- .../FRMWinClassicAddressBookNewFolder.cs | 27 -- .../FRMWinClassicAddressBookNewFolder.resx | 120 ------- .../AddressBook/WinClassicAddressBook.Designer.cs | 398 --------------------- .../Win95Apps/AddressBook/WinClassicAddressBook.cs | 293 --------------- .../AddressBook/WinClassicAddressBook.resx | 126 ------- .../Win95/Win95Apps/WinClassicWindowsExplorer.cs | 19 + .../FRMWinClassicAddressBookNewContact.Designer.cs | 227 ++++++++++++ .../FRMWinClassicAddressBookNewContact.cs | 71 ++++ .../FRMWinClassicAddressBookNewContact.resx | 120 +++++++ .../FRMWinClassicAddressBookNewFolder.Designer.cs | 81 +++++ .../FRMWinClassicAddressBookNewFolder.cs | 27 ++ .../FRMWinClassicAddressBookNewFolder.resx | 120 +++++++ .../AddressBook/WinClassicAddressBook.Designer.cs | 398 +++++++++++++++++++++ .../Win98Apps/AddressBook/WinClassicAddressBook.cs | 293 +++++++++++++++ .../AddressBook/WinClassicAddressBook.resx | 126 +++++++ TimeHACK.Main/TimeHACK.Main.csproj | 18 +- 24 files changed, 1537 insertions(+), 1551 deletions(-) delete mode 100644 TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewContact.Designer.cs delete mode 100644 TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs delete mode 100644 TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewContact.resx delete mode 100644 TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewFolder.Designer.cs delete mode 100644 TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewFolder.cs delete mode 100644 TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewFolder.resx delete mode 100644 TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/WinClassicAddressBook.Designer.cs delete mode 100644 TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/WinClassicAddressBook.cs delete mode 100644 TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/WinClassicAddressBook.resx create mode 100644 TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.Designer.cs create mode 100644 TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs create mode 100644 TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.resx create mode 100644 TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewFolder.Designer.cs create mode 100644 TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewFolder.cs create mode 100644 TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewFolder.resx create mode 100644 TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs create mode 100644 TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs create mode 100644 TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.resx (limited to 'TimeHACK.Engine/SaveSystem.cs') diff --git a/TimeHACK.Engine/SaveSystem.cs b/TimeHACK.Engine/SaveSystem.cs index c9c2025..0cacf69 100644 --- a/TimeHACK.Engine/SaveSystem.cs +++ b/TimeHACK.Engine/SaveSystem.cs @@ -174,12 +174,11 @@ namespace TimeHACK.Engine SaveDirectoryInfo(ProfileMyComputerDirectory, false, "Win95 (C:)", true); if (CurrentSave.CurrentOS == "95") SaveDirectoryInfo(ProfileDocumentsDirectory, false, "My Documents", true); if (CurrentSave.CurrentOS != "95") SaveDirectoryInfo(ProfileSettingsDirectory, false, "Documents and Settings", true); - SaveDirectoryInfo(Path.Combine(ProfileProgramsDirectory, "Accessories"), false, "Accessories", true); - CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Accessories", "wordpad.exe"), "wordpad"); - CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Accessories", "mspaint.exe"), "mspaint"); + SaveDirectoryInfo(Path.Combine(ProfileProgramsDirectory, "Accessories"), false, "Accessories", true); SaveDirectoryInfo(ProfileProgramsDirectory, true, "Program Files", true); SaveDirectoryInfo(ProfileWindowsDirectory, true, "Windows", true); + CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Accessories", "wordpad.exe"), "wordpad"); CreateWindowsDirectory(); } diff --git a/TimeHACK.Main/OS/Win95/Win95.Designer.cs b/TimeHACK.Main/OS/Win95/Win95.Designer.cs index 15f4feb..b77e2db 100644 --- a/TimeHACK.Main/OS/Win95/Win95.Designer.cs +++ b/TimeHACK.Main/OS/Win95/Win95.Designer.cs @@ -62,7 +62,6 @@ namespace TimeHACK.OS.Win95 this.SystemToolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.DiskDefragmenterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ScanDiskToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.AddressBookToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.CalculatorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.HyperTerminalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ImagingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -244,7 +243,7 @@ namespace TimeHACK.OS.Win95 this.startmenuitems.Name = "startmenuitems"; this.startmenuitems.Padding = new System.Windows.Forms.Padding(6, 2, 0, 0); this.startmenuitems.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; - this.startmenuitems.Size = new System.Drawing.Size(145, 311); + this.startmenuitems.Size = new System.Drawing.Size(145, 292); this.startmenuitems.TabIndex = 0; this.startmenuitems.Text = "StartMenu"; // @@ -285,7 +284,6 @@ namespace TimeHACK.OS.Win95 this.CommunicationsToolStripMenuItem, this.MultimediaToolStripMenuItem, this.SystemToolsToolStripMenuItem, - this.AddressBookToolStripMenuItem, this.CalculatorToolStripMenuItem, this.HyperTerminalToolStripMenuItem, this.ImagingToolStripMenuItem, @@ -435,18 +433,6 @@ namespace TimeHACK.OS.Win95 this.ScanDiskToolStripMenuItem.Size = new System.Drawing.Size(172, 22); this.ScanDiskToolStripMenuItem.Text = "ScanDisk"; // - // AddressBookToolStripMenuItem - // - this.AddressBookToolStripMenuItem.BackColor = System.Drawing.Color.Silver; - this.AddressBookToolStripMenuItem.BackgroundImage = global::TimeHACK.Properties.Resources.sliversilver; - this.AddressBookToolStripMenuItem.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.AddressBookToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("AddressBookToolStripMenuItem.Image"))); - this.AddressBookToolStripMenuItem.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; - this.AddressBookToolStripMenuItem.Name = "AddressBookToolStripMenuItem"; - this.AddressBookToolStripMenuItem.Size = new System.Drawing.Size(181, 28); - this.AddressBookToolStripMenuItem.Text = "Address Book"; - this.AddressBookToolStripMenuItem.Click += new System.EventHandler(this.AddressBookToolStripMenuItem_Click); - // // CalculatorToolStripMenuItem // this.CalculatorToolStripMenuItem.BackColor = System.Drawing.Color.Silver; @@ -1211,7 +1197,6 @@ namespace TimeHACK.OS.Win95 internal System.Windows.Forms.ToolStripMenuItem SystemToolsToolStripMenuItem; internal System.Windows.Forms.ToolStripMenuItem DiskDefragmenterToolStripMenuItem; internal System.Windows.Forms.ToolStripMenuItem ScanDiskToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem AddressBookToolStripMenuItem; internal System.Windows.Forms.ToolStripMenuItem CalculatorToolStripMenuItem; internal System.Windows.Forms.ToolStripMenuItem HyperTerminalToolStripMenuItem; internal System.Windows.Forms.ToolStripMenuItem ImagingToolStripMenuItem; diff --git a/TimeHACK.Main/OS/Win95/Win95.cs b/TimeHACK.Main/OS/Win95/Win95.cs index 4e61bb7..5327033 100644 --- a/TimeHACK.Main/OS/Win95/Win95.cs +++ b/TimeHACK.Main/OS/Win95/Win95.cs @@ -357,16 +357,7 @@ namespace TimeHACK.OS.Win95 private void AddressBookToolStripMenuItem_Click(object sender, EventArgs e) { - WinClassicAddressBook ab = new WinClassicAddressBook(); - WinClassic app = wm.StartWin95(ab, "Address Book", Properties.Resources.WinClassicAddressBook, true, true); - AddTaskBarItem(app, app.Tag.ToString(), "Address Book", Properties.Resources.WinClassicAddressBook); - nonimportantapps.Add(app); - nonimportantapps[nonimportantapps.Count - 1].BringToFront(); - nonimportantapps[nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(NonImportantApp_Closing); - - app.BringToFront(); - startmenu.Hide(); } private void WindowsExplorerToolStripMenuItem1_Click(object sender, EventArgs e) diff --git a/TimeHACK.Main/OS/Win95/Win95.resx b/TimeHACK.Main/OS/Win95/Win95.resx index ba695aa..5e1c35e 100644 --- a/TimeHACK.Main/OS/Win95/Win95.resx +++ b/TimeHACK.Main/OS/Win95/Win95.resx @@ -121,48 +121,6 @@ 17, 17 - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAAJVJREFUOE+VkQsSxCAMQj16bu4GFU3YdO2+Gaqi0F/7j96zfqKHqYiuByYBFfYJ - 1okT9uuef4slmG9gWjdzN4Wnf9bRT1RhaCN+KriGieyvkjr8Rl7AMMbywE0zCBiIBS9Awbn7tUD29xME - Q0rM8IHhPbziKRhMU0pqjVIfcgHAfB2oiugnuEnG/EkZ/4fLZEksutHaB6sGQO/gf7MbAAAAAElFTkSu - QmCC - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAALtJREFUOE91TwESBCEI6un9vBPRYqljhtEIyUZhzTkXKo8J1ZI4P3xjlAjsqpoN - upcBf0zA6+7r8QAxA9170IEPm6l7PWu9A1CLwNaVpSfWNEKLWCECDnkvAdFtMgBDLeHFaNaXEpQu22B9 - NsFA96i2yQlo00wejQG9VfuSCQ0IXAFAVAb468AVwJB3AHpsBFKn2uYkemh9hllezf4KcDKwtqkBpX5j - Dyj5DRIeDDh3wD3c5AYkh2QwOMYPtAJqglssjE8AAAAASUVORK5CYII= - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAAJVJREFUOE+VkIESgCAIQ/10/pwasJrlkb27nUZsoqPHPbWNlYHCN9gKMTc7O31I - gIa0PM2EE32ErE9WNQEw1y6azbZGvkFAhnBcKMmwrQnCVI0MofA+a6UniIDYqKTx7JhBDeVaQd5fVT9m - M4JvowbwzjNlu4C5DVBgVyll4Zo8AzrK0gfo6ZBSFq7J6g0+ePWj8EPDD0i7RXV30HOWAAAAAElFTkSu - QmCC - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAAJJJREFUOE+tkYEOgCAIRP10/tzk4FISZ7ZuuzDwnq4KJSL1aR/txc21llBfQVbh - EZJZZ5C+nEoEcIN0QDyxLVGzm6WAsMYTvRSSAqaw2jRBloApbJUBhLVub4ABqwMY1poCuEYzhPWjRkgK - 6EP7A+obqOc2EzIBeELmtqNFDECI9R3gYmPhCPH+qX6HfAJAQ7iUCwlxft5LSoDNAAAAAElFTkSuQmCC - - - - - iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wQAADsEBuJFr7QAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAMSURBVBhXYzhw - 4AAABIQCQUtXaBsAAAAASUVORK5CYII= - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAALRJREFUOE+N @@ -234,14 +192,6 @@ EsQgCEM9ukfzZl0CREmrO7uNw0ghL360ndR7v7L9X4BfBxDeVVrOmsaLQqd1DKowK7QmYwxvza4hC66H UpiV6IJlm+UQOnvxvg7aBAPkIWpY87rICtpkX/4SX5MgmkvnxzD4JIC3BCUGzZCEfWb9I4D3M2gDp3xY oXsQ9vRAYAJVbYNqAARf2M+aQa3Hr2QAdmH5TTPoDVz1BW7tA7ajvYP7sMmIAAAAAElFTkSuQmCC - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAG1JREFUOE/N - j1sOgCAQAzk6N/exdqRsAuqH0THNrm2DWP5DrXVxyQ5mWRc6FLO/Wa5WYBKyZyLfn9EBoMJwl65vwA4p - e+EGDkXneJ8coODcM+TSvV9wwmfu5C8jPOZA7YCMleT0KAu68kN9TikrCNOnE4xyRLMAAAAASUVORK5C - YII= @@ -306,6 +256,41 @@ DsAgCAN9Ok/zZ4yiEINsMkkKRNezWWNmlZSM84wabVwyEX3ODNLCZXWiyUrsgEr13h2gZlmvAGZGKQAX VRlAzfcJIAB+/gMiM5smIMbMBLO8uUMqCcxsOzww4/AIiGZ7eR4OQBYZ2uIGswOyWj72ArQMyOoVsMY+ aQNok1HVambm9gBAYeI/oBSQZwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAAJVJREFUOE+VkQsSxCAMQj16bu4GFU3YdO2+Gaqi0F/7j96zfqKHqYiuByYBFfYJ + 1okT9uuef4slmG9gWjdzN4Wnf9bRT1RhaCN+KriGieyvkjr8Rl7AMMbywE0zCBiIBS9Awbn7tUD29xME + Q0rM8IHhPbziKRhMU0pqjVIfcgHAfB2oiugnuEnG/EkZ/4fLZEksutHaB6sGQO/gf7MbAAAAAElFTkSu + QmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAALtJREFUOE91TwESBCEI6un9vBPRYqljhtEIyUZhzTkXKo8J1ZI4P3xjlAjsqpoN + upcBf0zA6+7r8QAxA9170IEPm6l7PWu9A1CLwNaVpSfWNEKLWCECDnkvAdFtMgBDLeHFaNaXEpQu22B9 + NsFA96i2yQlo00wejQG9VfuSCQ0IXAFAVAb468AVwJB3AHpsBFKn2uYkemh9hllezf4KcDKwtqkBpX5j + Dyj5DRIeDDh3wD3c5AYkh2QwOMYPtAJqglssjE8AAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAAJVJREFUOE+VkIESgCAIQ/10/pwasJrlkb27nUZsoqPHPbWNlYHCN9gKMTc7O31I + gIa0PM2EE32ErE9WNQEw1y6azbZGvkFAhnBcKMmwrQnCVI0MofA+a6UniIDYqKTx7JhBDeVaQd5fVT9m + M4JvowbwzjNlu4C5DVBgVyll4Zo8AzrK0gfo6ZBSFq7J6g0+ePWj8EPDD0i7RXV30HOWAAAAAElFTkSu + QmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAAJJJREFUOE+tkYEOgCAIRP10/tzk4FISZ7ZuuzDwnq4KJSL1aR/txc21llBfQVbh + EZJZZ5C+nEoEcIN0QDyxLVGzm6WAsMYTvRSSAqaw2jRBloApbJUBhLVub4ABqwMY1poCuEYzhPWjRkgK + 6EP7A+obqOc2EzIBeELmtqNFDECI9R3gYmPhCPH+qX6HfAJAQ7iUCwlxft5LSoDNAAAAAElFTkSuQmCC @@ -341,6 +326,13 @@ iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO wQAADsEBuJFr7QAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAMSURBVBhXYzhw 4AAABIQCQUtXaBsAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wQAADsEBuJFr7QAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xMzQDW3oAAAAMSURBVBhXYzhw + 4AAABIQCQUtXaBsAAAAASUVORK5CYII= @@ -382,7 +374,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADq - ggAAAk1TRnQBSQFMAgEBDAEAAbABAQGwAQEBIAEAASABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAGA + ggAAAk1TRnQBSQFMAgEBDAEAAbgBAQG4AQEBIAEAASABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAGA AwABgAMAAQEBAAEgBwABAf8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A /wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A /wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8AXAAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/x8AAf8DAAH/ diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewContact.Designer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewContact.Designer.cs deleted file mode 100644 index 7eb3196..0000000 --- a/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewContact.Designer.cs +++ /dev/null @@ -1,227 +0,0 @@ -namespace TimeHACK.OS.Win95.Win95Apps -{ - partial class FRMWinClassicAddressBookNewContact - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.button1 = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.txtFirst = new System.Windows.Forms.TextBox(); - this.txtMiddle = new System.Windows.Forms.TextBox(); - this.txtLast = new System.Windows.Forms.TextBox(); - this.emails = new System.Windows.Forms.ListView(); - this.label4 = new System.Windows.Forms.Label(); - this.button2 = new System.Windows.Forms.Button(); - this.button3 = new System.Windows.Forms.Button(); - this.pnlAdd = new System.Windows.Forms.Panel(); - this.button4 = new System.Windows.Forms.Button(); - this.textBox1 = new System.Windows.Forms.TextBox(); - this.label5 = new System.Windows.Forms.Label(); - this.pnlAdd.SuspendLayout(); - this.SuspendLayout(); - // - // button1 - // - this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.button1.Location = new System.Drawing.Point(107, 239); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(105, 23); - this.button1.TabIndex = 0; - this.button1.Text = "OK"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(16, 13); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(60, 13); - this.label1.TabIndex = 1; - this.label1.Text = "First Name:"; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(16, 36); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(72, 13); - this.label2.TabIndex = 1; - this.label2.Text = "Middle Name:"; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(16, 59); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(61, 13); - this.label3.TabIndex = 1; - this.label3.Text = "Last Name:"; - // - // txtFirst - // - this.txtFirst.Location = new System.Drawing.Point(94, 13); - this.txtFirst.Name = "txtFirst"; - this.txtFirst.Size = new System.Drawing.Size(203, 20); - this.txtFirst.TabIndex = 2; - // - // txtMiddle - // - this.txtMiddle.Location = new System.Drawing.Point(94, 36); - this.txtMiddle.Name = "txtMiddle"; - this.txtMiddle.Size = new System.Drawing.Size(203, 20); - this.txtMiddle.TabIndex = 2; - // - // txtLast - // - this.txtLast.Location = new System.Drawing.Point(94, 59); - this.txtLast.Name = "txtLast"; - this.txtLast.Size = new System.Drawing.Size(203, 20); - this.txtLast.TabIndex = 2; - // - // emails - // - this.emails.Location = new System.Drawing.Point(94, 114); - this.emails.Name = "emails"; - this.emails.Size = new System.Drawing.Size(203, 119); - this.emails.TabIndex = 3; - this.emails.UseCompatibleStateImageBehavior = false; - this.emails.View = System.Windows.Forms.View.List; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(91, 89); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(40, 13); - this.label4.TabIndex = 4; - this.label4.Text = "Emails:"; - // - // cancelButton - // - this.button2.Location = new System.Drawing.Point(13, 114); - this.button2.Name = "cancelButton"; - this.button2.Size = new System.Drawing.Size(75, 23); - this.button2.TabIndex = 5; - this.button2.Text = "Add"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.button2_Click); - // - // button3 - // - this.button3.Location = new System.Drawing.Point(13, 143); - this.button3.Name = "button3"; - this.button3.Size = new System.Drawing.Size(75, 23); - this.button3.TabIndex = 5; - this.button3.Text = "Remove"; - this.button3.UseVisualStyleBackColor = true; - // - // pnlAdd - // - this.pnlAdd.Controls.Add(this.button4); - this.pnlAdd.Controls.Add(this.textBox1); - this.pnlAdd.Controls.Add(this.label5); - this.pnlAdd.Location = new System.Drawing.Point(94, 114); - this.pnlAdd.Name = "pnlAdd"; - this.pnlAdd.Size = new System.Drawing.Size(203, 119); - this.pnlAdd.TabIndex = 6; - this.pnlAdd.Visible = false; - // - // button4 - // - this.button4.Location = new System.Drawing.Point(59, 73); - this.button4.Name = "button4"; - this.button4.Size = new System.Drawing.Size(75, 23); - this.button4.TabIndex = 8; - this.button4.Text = "Add"; - this.button4.UseVisualStyleBackColor = true; - this.button4.Click += new System.EventHandler(this.button4_Click); - // - // textBox1 - // - this.textBox1.Location = new System.Drawing.Point(9, 31); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(187, 20); - this.textBox1.TabIndex = 7; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(60, 18); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(68, 13); - this.label5.TabIndex = 0; - this.label5.Text = "Email to add:"; - // - // FRMWinClassicAddressBookNewContact - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.button3); - this.Controls.Add(this.button2); - this.Controls.Add(this.label4); - this.Controls.Add(this.txtLast); - this.Controls.Add(this.txtMiddle); - this.Controls.Add(this.txtFirst); - this.Controls.Add(this.label3); - this.Controls.Add(this.label2); - this.Controls.Add(this.label1); - this.Controls.Add(this.button1); - this.Controls.Add(this.emails); - this.Controls.Add(this.pnlAdd); - this.Name = "FRMWinClassicAddressBookNewContact"; - this.Size = new System.Drawing.Size(332, 265); - this.Load += new System.EventHandler(this.FRMWinClassicAddressBookNewContact_Load); - this.pnlAdd.ResumeLayout(false); - this.pnlAdd.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Button button1; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.TextBox txtFirst; - private System.Windows.Forms.TextBox txtMiddle; - private System.Windows.Forms.TextBox txtLast; - private System.Windows.Forms.ListView emails; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Button button2; - private System.Windows.Forms.Button button3; - private System.Windows.Forms.Panel pnlAdd; - private System.Windows.Forms.Button button4; - private System.Windows.Forms.TextBox textBox1; - private System.Windows.Forms.Label label5; - } -} diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs b/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs deleted file mode 100644 index 482d54c..0000000 --- a/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - - -namespace TimeHACK.OS.Win95.Win95Apps -{ - public partial class FRMWinClassicAddressBookNewContact : UserControl - { - public AddressBookContact toSet = new AddressBookContact(); - public FRMWinClassicAddressBookNewContact() - { - InitializeComponent(); - Program.AddressBookSelectedContact = null; - } - - private void button2_Click(object sender, EventArgs e) - { - pnlAdd.Show(); - pnlAdd.BringToFront(); - } - - private void button1_Click(object sender, EventArgs e) - { - if (txtFirst.Text != "" && txtMiddle.Text != "" && txtLast.Text != "") - { - toSet.FirstName = txtFirst.Text; - toSet.MiddleName = txtMiddle.Text; - toSet.LastName = txtLast.Text; - - Program.AddressBookSelectedContact = toSet; - ((Form)this.TopLevelControl).Close(); - } else { - MessageBox.Show("Please fill out the First, Middle and Last name."); - } - } - - private void button4_Click(object sender, EventArgs e) - { - emails.Items.Add(textBox1.Text); - toSet.Emails.Add(textBox1.Text); - emails.BringToFront(); - } - - private void FRMWinClassicAddressBookNewContact_Load(object sender, EventArgs e) - { - if (toSet != null) - { - txtFirst.Text = toSet.FirstName; - txtMiddle.Text = toSet.MiddleName; - txtLast.Text = toSet.LastName; - if (toSet.Emails != null) - { - foreach (string email in toSet.Emails) - { - emails.Items.Add(email); - } - } - } else - { - MessageBox.Show("NULL CONTACT!"); - } - } - } -} diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewContact.resx b/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewContact.resx deleted file mode 100644 index 1af7de1..0000000 --- a/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewContact.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewFolder.Designer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewFolder.Designer.cs deleted file mode 100644 index c7efcd0..0000000 --- a/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewFolder.Designer.cs +++ /dev/null @@ -1,81 +0,0 @@ -namespace TimeHACK.OS.Win95.Win95Apps -{ - partial class FRMWinClassicAddressBookNewFolder - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.label1 = new System.Windows.Forms.Label(); - this.button1 = new System.Windows.Forms.Button(); - this.textBox1 = new System.Windows.Forms.TextBox(); - this.SuspendLayout(); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(102, 11); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(70, 13); - this.label1.TabIndex = 1; - this.label1.Text = "Folder Name:"; - // - // button1 - // - this.button1.Location = new System.Drawing.Point(97, 78); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(75, 23); - this.button1.TabIndex = 2; - this.button1.Text = "OK"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); - // - // textBox1 - // - this.textBox1.Location = new System.Drawing.Point(3, 40); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(295, 20); - this.textBox1.TabIndex = 3; - // - // FRMWinClassicAddressBookNewFolder - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.textBox1); - this.Controls.Add(this.button1); - this.Controls.Add(this.label1); - this.Name = "FRMWinClassicAddressBookNewFolder"; - this.Size = new System.Drawing.Size(301, 116); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Button button1; - private System.Windows.Forms.TextBox textBox1; - } -} diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewFolder.cs b/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewFolder.cs deleted file mode 100644 index 705fd0d..0000000 --- a/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewFolder.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace TimeHACK.OS.Win95.Win95Apps -{ - public partial class FRMWinClassicAddressBookNewFolder : UserControl - { - - public FRMWinClassicAddressBookNewFolder() - { - InitializeComponent(); - } - - private void button1_Click(object sender, EventArgs e) - { - Program.AddressBookSelectedFolderName = textBox1.Text; - ((Form)this.TopLevelControl).Close(); - } - } -} diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewFolder.resx b/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewFolder.resx deleted file mode 100644 index 1af7de1..0000000 --- a/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/FRMWinClassicAddressBookNewFolder.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/WinClassicAddressBook.Designer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/WinClassicAddressBook.Designer.cs deleted file mode 100644 index 41107e8..0000000 --- a/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/WinClassicAddressBook.Designer.cs +++ /dev/null @@ -1,398 +0,0 @@ -namespace TimeHACK.OS.Win95.Win95Apps -{ - partial class WinClassicAddressBook - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("Shared Contacts"); - this.topmenu = new System.Windows.Forms.MenuStrip(); - this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.newContactToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.newFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.propertiesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); - this.importToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.exportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); - this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); - this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolbarToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.foldersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.actionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.sendMailToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.dialToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.internetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.aboutAddressBookToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.contactsView = new System.Windows.Forms.ListView(); - this.treeView1 = new System.Windows.Forms.TreeView(); - this.toolbar = new System.Windows.Forms.Panel(); - this.toolProp = new System.Windows.Forms.PictureBox(); - this.toolNew = new System.Windows.Forms.PictureBox(); - this.toolDelete = new System.Windows.Forms.PictureBox(); - this.newContext = new System.Windows.Forms.ContextMenuStrip(this.components); - this.newContactToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.newFolderToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.topmenu.SuspendLayout(); - this.toolbar.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.toolProp)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.toolNew)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.toolDelete)).BeginInit(); - this.newContext.SuspendLayout(); - this.SuspendLayout(); - // - // topmenu - // - this.topmenu.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(212)))), ((int)(((byte)(208)))), ((int)(((byte)(200))))); - this.topmenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.fileToolStripMenuItem, - this.viewToolStripMenuItem, - this.toolsToolStripMenuItem, - this.helpToolStripMenuItem}); - this.topmenu.Location = new System.Drawing.Point(0, 0); - this.topmenu.Name = "topmenu"; - this.topmenu.Size = new System.Drawing.Size(666, 24); - this.topmenu.TabIndex = 1; - this.topmenu.Text = "menuStrip1"; - // - // fileToolStripMenuItem - // - this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.newContactToolStripMenuItem, - this.newFolderToolStripMenuItem, - this.toolStripSeparator1, - this.propertiesToolStripMenuItem, - this.deleteToolStripMenuItem, - this.toolStripSeparator2, - this.importToolStripMenuItem, - this.exportToolStripMenuItem, - this.toolStripSeparator3, - this.toolStripSeparator4, - this.exitToolStripMenuItem}); - this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; - this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); - this.fileToolStripMenuItem.Text = "File"; - // - // newContactToolStripMenuItem - // - this.newContactToolStripMenuItem.Name = "newContactToolStripMenuItem"; - 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(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(149, 6); - // - // propertiesToolStripMenuItem - // - this.propertiesToolStripMenuItem.Name = "propertiesToolStripMenuItem"; - 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(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(149, 6); - // - // importToolStripMenuItem - // - this.importToolStripMenuItem.Name = "importToolStripMenuItem"; - 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(152, 22); - this.exportToolStripMenuItem.Text = "Export..."; - // - // toolStripSeparator3 - // - this.toolStripSeparator3.Name = "toolStripSeparator3"; - this.toolStripSeparator3.Size = new System.Drawing.Size(149, 6); - // - // toolStripSeparator4 - // - this.toolStripSeparator4.Name = "toolStripSeparator4"; - this.toolStripSeparator4.Size = new System.Drawing.Size(149, 6); - // - // exitToolStripMenuItem - // - this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; - this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.exitToolStripMenuItem.Text = "Exit"; - this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); - // - // viewToolStripMenuItem - // - this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolbarToolStripMenuItem, - this.foldersToolStripMenuItem}); - this.viewToolStripMenuItem.Name = "viewToolStripMenuItem"; - this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20); - this.viewToolStripMenuItem.Text = "View"; - // - // toolbarToolStripMenuItem - // - this.toolbarToolStripMenuItem.Checked = true; - this.toolbarToolStripMenuItem.CheckOnClick = true; - this.toolbarToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; - this.toolbarToolStripMenuItem.Name = "toolbarToolStripMenuItem"; - this.toolbarToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.toolbarToolStripMenuItem.Text = "Toolbar"; - this.toolbarToolStripMenuItem.Click += new System.EventHandler(this.toolbarToolStripMenuItem_Click); - // - // foldersToolStripMenuItem - // - this.foldersToolStripMenuItem.Checked = true; - this.foldersToolStripMenuItem.CheckOnClick = true; - this.foldersToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; - this.foldersToolStripMenuItem.Name = "foldersToolStripMenuItem"; - this.foldersToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.foldersToolStripMenuItem.Text = "Folders"; - this.foldersToolStripMenuItem.Click += new System.EventHandler(this.foldersToolStripMenuItem_Click); - // - // toolsToolStripMenuItem - // - this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.actionToolStripMenuItem}); - this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem"; - this.toolsToolStripMenuItem.Size = new System.Drawing.Size(47, 20); - this.toolsToolStripMenuItem.Text = "Tools"; - // - // actionToolStripMenuItem - // - this.actionToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.sendMailToolStripMenuItem, - this.dialToolStripMenuItem, - this.internetToolStripMenuItem}); - this.actionToolStripMenuItem.Name = "actionToolStripMenuItem"; - this.actionToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.actionToolStripMenuItem.Text = "Action"; - // - // sendMailToolStripMenuItem - // - this.sendMailToolStripMenuItem.Name = "sendMailToolStripMenuItem"; - this.sendMailToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.sendMailToolStripMenuItem.Text = "Send Mail"; - // - // dialToolStripMenuItem - // - this.dialToolStripMenuItem.Name = "dialToolStripMenuItem"; - this.dialToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.dialToolStripMenuItem.Text = "Dial"; - // - // internetToolStripMenuItem - // - this.internetToolStripMenuItem.Name = "internetToolStripMenuItem"; - this.internetToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.internetToolStripMenuItem.Text = "Internet Call"; - // - // helpToolStripMenuItem - // - this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.aboutAddressBookToolStripMenuItem}); - this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; - this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20); - this.helpToolStripMenuItem.Text = "Help"; - // - // aboutAddressBookToolStripMenuItem - // - this.aboutAddressBookToolStripMenuItem.Name = "aboutAddressBookToolStripMenuItem"; - this.aboutAddressBookToolStripMenuItem.Size = new System.Drawing.Size(182, 22); - this.aboutAddressBookToolStripMenuItem.Text = "About Address Book"; - // - // contactsView - // - this.contactsView.Dock = System.Windows.Forms.DockStyle.Fill; - this.contactsView.Location = new System.Drawing.Point(208, 72); - this.contactsView.Name = "contactsView"; - this.contactsView.Size = new System.Drawing.Size(458, 353); - this.contactsView.TabIndex = 3; - this.contactsView.UseCompatibleStateImageBehavior = false; - this.contactsView.View = System.Windows.Forms.View.List; - // - // treeView1 - // - this.treeView1.Dock = System.Windows.Forms.DockStyle.Left; - this.treeView1.Location = new System.Drawing.Point(0, 72); - this.treeView1.Name = "treeView1"; - treeNode1.Name = "Node0"; - treeNode1.Text = "Shared Contacts"; - this.treeView1.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { - treeNode1}); - this.treeView1.Size = new System.Drawing.Size(208, 353); - this.treeView1.TabIndex = 4; - this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect); - // - // toolbar - // - this.toolbar.BackColor = System.Drawing.Color.Silver; - this.toolbar.BackgroundImage = global::TimeHACK.Properties.Resources.WinClassicGENERALApplicationToolbarBackground; - this.toolbar.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.toolbar.Controls.Add(this.toolProp); - this.toolbar.Controls.Add(this.toolNew); - this.toolbar.Controls.Add(this.toolDelete); - this.toolbar.Dock = System.Windows.Forms.DockStyle.Top; - this.toolbar.Location = new System.Drawing.Point(0, 24); - this.toolbar.Name = "toolbar"; - this.toolbar.Size = new System.Drawing.Size(666, 48); - this.toolbar.TabIndex = 5; - // - // toolProp - // - this.toolProp.BackColor = System.Drawing.Color.Transparent; - this.toolProp.Image = global::TimeHACK.Properties.Resources.WinClassicAddressBookPropertiesIcon; - this.toolProp.Location = new System.Drawing.Point(65, 3); - this.toolProp.Name = "toolProp"; - this.toolProp.Size = new System.Drawing.Size(61, 39); - this.toolProp.TabIndex = 0; - this.toolProp.TabStop = false; - this.toolProp.Click += new System.EventHandler(this.toolProp_Click); - // - // toolNew - // - this.toolNew.BackColor = System.Drawing.Color.Transparent; - this.toolNew.Image = global::TimeHACK.Properties.Resources.WinClassicAddressBookNewIcon; - this.toolNew.Location = new System.Drawing.Point(16, 4); - this.toolNew.Name = "toolNew"; - this.toolNew.Size = new System.Drawing.Size(43, 39); - this.toolNew.TabIndex = 0; - this.toolNew.TabStop = false; - // - // toolDelete - // - this.toolDelete.BackColor = System.Drawing.Color.Transparent; - this.toolDelete.Image = global::TimeHACK.Properties.Resources.WinClassicAddressBookDeleteIcon; - this.toolDelete.Location = new System.Drawing.Point(132, 3); - this.toolDelete.Name = "toolDelete"; - this.toolDelete.Size = new System.Drawing.Size(61, 39); - this.toolDelete.TabIndex = 0; - this.toolDelete.TabStop = false; - this.toolDelete.Click += new System.EventHandler(this.toolDelete_Click); - // - // newContext - // - this.newContext.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.newContactToolStripMenuItem1, - this.newFolderToolStripMenuItem1}); - this.newContext.Name = "newContext"; - this.newContext.Size = new System.Drawing.Size(153, 48); - // - // newContactToolStripMenuItem1 - // - this.newContactToolStripMenuItem1.Name = "newContactToolStripMenuItem1"; - this.newContactToolStripMenuItem1.Size = new System.Drawing.Size(152, 22); - this.newContactToolStripMenuItem1.Text = "New Contact..."; - this.newContactToolStripMenuItem1.Click += new System.EventHandler(this.newContactToolStripMenuItem1_Click); - // - // newFolderToolStripMenuItem1 - // - this.newFolderToolStripMenuItem1.Name = "newFolderToolStripMenuItem1"; - this.newFolderToolStripMenuItem1.Size = new System.Drawing.Size(152, 22); - this.newFolderToolStripMenuItem1.Text = "New Folder..."; - this.newFolderToolStripMenuItem1.Click += new System.EventHandler(this.newFolderToolStripMenuItem1_Click); - // - // WinClassicAddressBook - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.contactsView); - this.Controls.Add(this.treeView1); - this.Controls.Add(this.toolbar); - this.Controls.Add(this.topmenu); - this.Name = "WinClassicAddressBook"; - this.Size = new System.Drawing.Size(666, 425); - this.topmenu.ResumeLayout(false); - this.topmenu.PerformLayout(); - this.toolbar.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.toolProp)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.toolNew)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.toolDelete)).EndInit(); - this.newContext.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - private System.Windows.Forms.MenuStrip topmenu; - private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem viewToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem toolsToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem newContactToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem newFolderToolStripMenuItem; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; - private System.Windows.Forms.ToolStripMenuItem propertiesToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; - private System.Windows.Forms.ToolStripMenuItem importToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem exportToolStripMenuItem; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; - private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; - private System.Windows.Forms.ListView contactsView; - private System.Windows.Forms.TreeView treeView1; - private System.Windows.Forms.ToolStripMenuItem toolbarToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem foldersToolStripMenuItem; - private System.Windows.Forms.Panel toolbar; - private System.Windows.Forms.PictureBox toolNew; - private System.Windows.Forms.PictureBox toolDelete; - private System.Windows.Forms.PictureBox toolProp; - private System.Windows.Forms.ToolStripMenuItem actionToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem sendMailToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem dialToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem internetToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem aboutAddressBookToolStripMenuItem; - private System.Windows.Forms.ContextMenuStrip newContext; - private System.Windows.Forms.ToolStripMenuItem newContactToolStripMenuItem1; - private System.Windows.Forms.ToolStripMenuItem newFolderToolStripMenuItem1; - } -} diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/WinClassicAddressBook.cs b/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/WinClassicAddressBook.cs deleted file mode 100644 index 95ee509..0000000 --- a/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/WinClassicAddressBook.cs +++ /dev/null @@ -1,293 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; -using TimeHACK.Engine; -using TimeHACK.Engine.Template; - -namespace TimeHACK.OS.Win95.Win95Apps -{ - public partial class WinClassicAddressBook : UserControl - { - WindowManager wm = new WindowManager(); - - public List AddressBookObjects; - public WinClassicAddressBook() - { - InitializeComponent(); - foreach (ToolStripMenuItem item in topmenu.Items) - { - item.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((0))); - item.BackColor = Color.Silver; - item.BackgroundImage = Properties.Resources.sliversilver; - item.BackgroundImageLayout = ImageLayout.Center; - item.DisplayStyle = ToolStripItemDisplayStyle.Text; - } - - //Time to prepare to load all the fonts up for the combo boxes - - //foreach (FontFamily font in System.Drawing.FontFamily.Families) - //{ - // Added to the ComboBox here - - //comboFont.Items.Add(font.Name); - //} - - AddressBookObjects = new List - { - new AddressBookContactList() - { - AttachedNode = treeView1.Nodes[0].Text, - } - }; - } - - private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) - { - UpdateContactListFromNodeName(treeView1.SelectedNode.Text); - } - - //AddressBookContactList GetAddressBookContactListFromNode(string NodeText) - //{ - // AddressBookContactList toReturn = new AddressBookContactList(); - // foreach (AddressBookContactList lstitem in AddressBookObjects) - // { - // if (lstitem.AttachedNode == NodeText) - // { - // toReturn = lstitem; - // } - // } - // if (toReturn == null) - // { - // // Something has gone wrong! - // MessageBox.Show("Unable to find list of items"); - // } - // MessageBox.Show("Gone through process!"); - // return toReturn; - //} - - public void UpdateContactListFromNodeName(string NodeName) - { - contactsView.Items.Clear(); - try - { - foreach (AddressBookContactList ContactList in AddressBookObjects) - { - if (ContactList.AttachedNode == NodeName) - { - foreach (AddressBookContact contact in ContactList.Contacts) - { - if (contact != null) - { - if (contact.FirstName != null) - { - contactsView.Items.Add(contact.FirstName + " " + contact.MiddleName + " " + contact.LastName); - } - } - else - { - MessageBox.Show("Null contact!"); - } - } - } - } - } catch - { - - } - } - - public void AddFolderToNode(TreeNode OldTreeNode, string NewNodeName) - { - if (OldTreeNode != null) - { - OldTreeNode.Nodes.Add(NewNodeName); - - AddressBookObjects.Add(new AddressBookContactList - { - AttachedNode = NewNodeName, - }); - } - } - - private void newFolderToolStripMenuItem_Click(object sender, EventArgs e) - { - NewFolder(); - } - - void NewFolder() - { - FRMWinClassicAddressBookNewFolder abnf = new FRMWinClassicAddressBookNewFolder(); - WinClassic app = wm.StartWin95(abnf, "Address Book - New Folder", Properties.Resources.Win95IconWordpad, true, true, true); - - if (treeView1.SelectedNode != null) - { - if (Program.AddressBookSelectedFolderName != null) - { - AddFolderToNode(treeView1.SelectedNode, Program.AddressBookSelectedFolderName); - } - else - { - wm.StartInfobox95("Address Book - New Folder", "You must enter a folder name!", Properties.Resources.Win95Error); - } - } - } - - private void newContactToolStripMenuItem_Click(object sender, EventArgs e) - { - NewContact(); - } - - void NewContact() - { - FRMWinClassicAddressBookNewContact abnc = new FRMWinClassicAddressBookNewContact(); - WinClassic app = wm.StartWin95(abnc, "Address Book - New Contact", Properties.Resources.Win95IconWordpad, true, true, true); - - if (treeView1.SelectedNode != null) - { - if (Program.AddressBookSelectedContact != null) - { - foreach (AddressBookContactList ContactList in AddressBookObjects) - { - if (ContactList.AttachedNode == treeView1.SelectedNode.Text) - { - ContactList.Contacts.Add(Program.AddressBookSelectedContact); - contactsView.Items.Add(Program.AddressBookSelectedContact.FirstName + " " + Program.AddressBookSelectedContact.MiddleName + " " + Program.AddressBookSelectedContact.LastName); - } - } - } - } - } - - private void toolProp_Click(object sender, EventArgs e) - { - OpenProperties(); - } - - void OpenProperties() - { - FRMWinClassicAddressBookNewContact abnc = new FRMWinClassicAddressBookNewContact(); - - // Finds the selected contact - if (treeView1.SelectedNode != null) - { - foreach (AddressBookContactList ContactList in AddressBookObjects) - { - if (ContactList.AttachedNode == treeView1.SelectedNode.Text) - { - foreach (AddressBookContact Contact in ContactList.Contacts) - { - if ((Contact.FirstName + " " + Contact.MiddleName + " " + Contact.LastName) == contactsView.FocusedItem.Text) - { - abnc.toSet = Contact; - } - } - } - } - WinClassic app = wm.StartWin95(abnc, "Address Book - Contact Properties", Properties.Resources.Win95IconWordpad, true, true, true); - - if (treeView1.SelectedNode != null) - { - if (Program.AddressBookSelectedContact != null) - { - foreach (AddressBookContactList ContactList in AddressBookObjects) - { - if (ContactList.AttachedNode == treeView1.SelectedNode.Text) - { - foreach (AddressBookContact Contact in ContactList.Contacts) - { - if ((Contact.FirstName + " " + Contact.MiddleName + " " + Contact.LastName) == contactsView.FocusedItem.Text) - { - ContactList.Contacts.Remove(Contact); - ContactList.Contacts.Add(Program.AddressBookSelectedContact); - } - } - } - } - } - } - } - - - } - - private void propertiesToolStripMenuItem_Click(object sender, EventArgs e) - { - OpenProperties(); - } - - private void deleteToolStripMenuItem_Click(object sender, EventArgs e) - { - DeleteContact(); - } - - void DeleteContact() - { - if (treeView1.SelectedNode != null) - { - foreach (AddressBookContactList ContactList in AddressBookObjects) - { - if (ContactList.AttachedNode == treeView1.SelectedNode.Text) - { - foreach (AddressBookContact Contact in ContactList.Contacts) - { - if ((Contact.FirstName + " " + Contact.MiddleName + " " + Contact.LastName) == contactsView.FocusedItem.Text) - { - ContactList.Contacts.Remove(Contact); - } - } - } - } - } - } - - private void toolDelete_Click(object sender, EventArgs e) - { - DeleteContact(); - } - - private void newContactToolStripMenuItem1_Click(object sender, EventArgs e) - { - NewContact(); - } - - private void newFolderToolStripMenuItem1_Click(object sender, EventArgs e) - { - NewFolder(); - } - - private void toolbarToolStripMenuItem_Click(object sender, EventArgs e) - { - toolbar.Visible = toolbarToolStripMenuItem.Checked; - } - - private void foldersToolStripMenuItem_Click(object sender, EventArgs e) - { - treeView1.Visible = foldersToolStripMenuItem.Checked; - } - - private void exitToolStripMenuItem_Click(object sender, EventArgs e) - { - ((Form)this.TopLevelControl).Close(); - } - } - - public class AddressBookContact - { - public string FirstName; - public string MiddleName; - public string LastName; - public List Emails = new List(); - } - - public class AddressBookContactList - { - public string AttachedNode; - public List Contacts = new List(); - } -} diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/WinClassicAddressBook.resx b/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/WinClassicAddressBook.resx deleted file mode 100644 index e1c367e..0000000 --- a/TimeHACK.Main/OS/Win95/Win95Apps/AddressBook/WinClassicAddressBook.resx +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - 118, 17 - - \ No newline at end of file diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs index f7748fe..1b12fbc 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs @@ -173,10 +173,29 @@ namespace TimeHACK.OS.Win95.Win95Apps case "calc": Engine.Template.WinClassic appCalc = wm.StartWin95(new WinClassicCalculator(), "Calculator", Properties.Resources.WinClassicCalc, true, true); Program.AddTaskbarItem(appCalc, appCalc.Tag.ToString(), "Calculator", Properties.Resources.WinClassicCalc); + + Program.nonimportantapps.Add(appCalc); + Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront(); + Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(Program.NonImportantApp_Closing); + break; case "wordpad": Engine.Template.WinClassic appWP = wm.StartWin95(new WinClassicWordPad(), "Wordpad", Properties.Resources.WinClassicWordpad, true, true); Program.AddTaskbarItem(appWP, appWP.Tag.ToString(), "Wordpad", Properties.Resources.WinClassicWordpad); + + Program.nonimportantapps.Add(appWP); + Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront(); + Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(Program.NonImportantApp_Closing); + + break; + case "addressbook": + WinClassic appAdBk = wm.StartWin95(new WinClassicAddressBook(), "Address Book", Properties.Resources.WinClassicAddressBook, true, true); + Program.AddTaskbarItem(appAdBk, appAdBk.Tag.ToString(), "Address Book", Properties.Resources.WinClassicAddressBook); + + Program.nonimportantapps.Add(appAdBk); + Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront(); + Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(Program.NonImportantApp_Closing); + break; } } diff --git a/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.Designer.cs b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.Designer.cs new file mode 100644 index 0000000..7eb3196 --- /dev/null +++ b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.Designer.cs @@ -0,0 +1,227 @@ +namespace TimeHACK.OS.Win95.Win95Apps +{ + partial class FRMWinClassicAddressBookNewContact + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.button1 = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.txtFirst = new System.Windows.Forms.TextBox(); + this.txtMiddle = new System.Windows.Forms.TextBox(); + this.txtLast = new System.Windows.Forms.TextBox(); + this.emails = new System.Windows.Forms.ListView(); + this.label4 = new System.Windows.Forms.Label(); + this.button2 = new System.Windows.Forms.Button(); + this.button3 = new System.Windows.Forms.Button(); + this.pnlAdd = new System.Windows.Forms.Panel(); + this.button4 = new System.Windows.Forms.Button(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.label5 = new System.Windows.Forms.Label(); + this.pnlAdd.SuspendLayout(); + this.SuspendLayout(); + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.button1.Location = new System.Drawing.Point(107, 239); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(105, 23); + this.button1.TabIndex = 0; + this.button1.Text = "OK"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(16, 13); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(60, 13); + this.label1.TabIndex = 1; + this.label1.Text = "First Name:"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(16, 36); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(72, 13); + this.label2.TabIndex = 1; + this.label2.Text = "Middle Name:"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(16, 59); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(61, 13); + this.label3.TabIndex = 1; + this.label3.Text = "Last Name:"; + // + // txtFirst + // + this.txtFirst.Location = new System.Drawing.Point(94, 13); + this.txtFirst.Name = "txtFirst"; + this.txtFirst.Size = new System.Drawing.Size(203, 20); + this.txtFirst.TabIndex = 2; + // + // txtMiddle + // + this.txtMiddle.Location = new System.Drawing.Point(94, 36); + this.txtMiddle.Name = "txtMiddle"; + this.txtMiddle.Size = new System.Drawing.Size(203, 20); + this.txtMiddle.TabIndex = 2; + // + // txtLast + // + this.txtLast.Location = new System.Drawing.Point(94, 59); + this.txtLast.Name = "txtLast"; + this.txtLast.Size = new System.Drawing.Size(203, 20); + this.txtLast.TabIndex = 2; + // + // emails + // + this.emails.Location = new System.Drawing.Point(94, 114); + this.emails.Name = "emails"; + this.emails.Size = new System.Drawing.Size(203, 119); + this.emails.TabIndex = 3; + this.emails.UseCompatibleStateImageBehavior = false; + this.emails.View = System.Windows.Forms.View.List; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(91, 89); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(40, 13); + this.label4.TabIndex = 4; + this.label4.Text = "Emails:"; + // + // cancelButton + // + this.button2.Location = new System.Drawing.Point(13, 114); + this.button2.Name = "cancelButton"; + this.button2.Size = new System.Drawing.Size(75, 23); + this.button2.TabIndex = 5; + this.button2.Text = "Add"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // button3 + // + this.button3.Location = new System.Drawing.Point(13, 143); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(75, 23); + this.button3.TabIndex = 5; + this.button3.Text = "Remove"; + this.button3.UseVisualStyleBackColor = true; + // + // pnlAdd + // + this.pnlAdd.Controls.Add(this.button4); + this.pnlAdd.Controls.Add(this.textBox1); + this.pnlAdd.Controls.Add(this.label5); + this.pnlAdd.Location = new System.Drawing.Point(94, 114); + this.pnlAdd.Name = "pnlAdd"; + this.pnlAdd.Size = new System.Drawing.Size(203, 119); + this.pnlAdd.TabIndex = 6; + this.pnlAdd.Visible = false; + // + // button4 + // + this.button4.Location = new System.Drawing.Point(59, 73); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(75, 23); + this.button4.TabIndex = 8; + this.button4.Text = "Add"; + this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.button4_Click); + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(9, 31); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(187, 20); + this.textBox1.TabIndex = 7; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(60, 18); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(68, 13); + this.label5.TabIndex = 0; + this.label5.Text = "Email to add:"; + // + // FRMWinClassicAddressBookNewContact + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.button3); + this.Controls.Add(this.button2); + this.Controls.Add(this.label4); + this.Controls.Add(this.txtLast); + this.Controls.Add(this.txtMiddle); + this.Controls.Add(this.txtFirst); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Controls.Add(this.button1); + this.Controls.Add(this.emails); + this.Controls.Add(this.pnlAdd); + this.Name = "FRMWinClassicAddressBookNewContact"; + this.Size = new System.Drawing.Size(332, 265); + this.Load += new System.EventHandler(this.FRMWinClassicAddressBookNewContact_Load); + this.pnlAdd.ResumeLayout(false); + this.pnlAdd.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox txtFirst; + private System.Windows.Forms.TextBox txtMiddle; + private System.Windows.Forms.TextBox txtLast; + private System.Windows.Forms.ListView emails; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Panel pnlAdd; + private System.Windows.Forms.Button button4; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.Label label5; + } +} diff --git a/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs new file mode 100644 index 0000000..482d54c --- /dev/null +++ b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + + +namespace TimeHACK.OS.Win95.Win95Apps +{ + public partial class FRMWinClassicAddressBookNewContact : UserControl + { + public AddressBookContact toSet = new AddressBookContact(); + public FRMWinClassicAddressBookNewContact() + { + InitializeComponent(); + Program.AddressBookSelectedContact = null; + } + + private void button2_Click(object sender, EventArgs e) + { + pnlAdd.Show(); + pnlAdd.BringToFront(); + } + + private void button1_Click(object sender, EventArgs e) + { + if (txtFirst.Text != "" && txtMiddle.Text != "" && txtLast.Text != "") + { + toSet.FirstName = txtFirst.Text; + toSet.MiddleName = txtMiddle.Text; + toSet.LastName = txtLast.Text; + + Program.AddressBookSelectedContact = toSet; + ((Form)this.TopLevelControl).Close(); + } else { + MessageBox.Show("Please fill out the First, Middle and Last name."); + } + } + + private void button4_Click(object sender, EventArgs e) + { + emails.Items.Add(textBox1.Text); + toSet.Emails.Add(textBox1.Text); + emails.BringToFront(); + } + + private void FRMWinClassicAddressBookNewContact_Load(object sender, EventArgs e) + { + if (toSet != null) + { + txtFirst.Text = toSet.FirstName; + txtMiddle.Text = toSet.MiddleName; + txtLast.Text = toSet.LastName; + if (toSet.Emails != null) + { + foreach (string email in toSet.Emails) + { + emails.Items.Add(email); + } + } + } else + { + MessageBox.Show("NULL CONTACT!"); + } + } + } +} diff --git a/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.resx b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewContact.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewFolder.Designer.cs b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewFolder.Designer.cs new file mode 100644 index 0000000..c7efcd0 --- /dev/null +++ b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewFolder.Designer.cs @@ -0,0 +1,81 @@ +namespace TimeHACK.OS.Win95.Win95Apps +{ + partial class FRMWinClassicAddressBookNewFolder + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.button1 = new System.Windows.Forms.Button(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(102, 11); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(70, 13); + this.label1.TabIndex = 1; + this.label1.Text = "Folder Name:"; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(97, 78); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 2; + this.button1.Text = "OK"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(3, 40); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(295, 20); + this.textBox1.TabIndex = 3; + // + // FRMWinClassicAddressBookNewFolder + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.textBox1); + this.Controls.Add(this.button1); + this.Controls.Add(this.label1); + this.Name = "FRMWinClassicAddressBookNewFolder"; + this.Size = new System.Drawing.Size(301, 116); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.TextBox textBox1; + } +} diff --git a/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewFolder.cs b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewFolder.cs new file mode 100644 index 0000000..705fd0d --- /dev/null +++ b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewFolder.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace TimeHACK.OS.Win95.Win95Apps +{ + public partial class FRMWinClassicAddressBookNewFolder : UserControl + { + + public FRMWinClassicAddressBookNewFolder() + { + InitializeComponent(); + } + + private void button1_Click(object sender, EventArgs e) + { + Program.AddressBookSelectedFolderName = textBox1.Text; + ((Form)this.TopLevelControl).Close(); + } + } +} diff --git a/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewFolder.resx b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewFolder.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/FRMWinClassicAddressBookNewFolder.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs new file mode 100644 index 0000000..41107e8 --- /dev/null +++ b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs @@ -0,0 +1,398 @@ +namespace TimeHACK.OS.Win95.Win95Apps +{ + partial class WinClassicAddressBook + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("Shared Contacts"); + this.topmenu = new System.Windows.Forms.MenuStrip(); + this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.newContactToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.newFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.propertiesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.importToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.exportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); + this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolbarToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.foldersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.actionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.sendMailToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.dialToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.internetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.aboutAddressBookToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.contactsView = new System.Windows.Forms.ListView(); + this.treeView1 = new System.Windows.Forms.TreeView(); + this.toolbar = new System.Windows.Forms.Panel(); + this.toolProp = new System.Windows.Forms.PictureBox(); + this.toolNew = new System.Windows.Forms.PictureBox(); + this.toolDelete = new System.Windows.Forms.PictureBox(); + this.newContext = new System.Windows.Forms.ContextMenuStrip(this.components); + this.newContactToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.newFolderToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.topmenu.SuspendLayout(); + this.toolbar.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.toolProp)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.toolNew)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.toolDelete)).BeginInit(); + this.newContext.SuspendLayout(); + this.SuspendLayout(); + // + // topmenu + // + this.topmenu.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(212)))), ((int)(((byte)(208)))), ((int)(((byte)(200))))); + this.topmenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileToolStripMenuItem, + this.viewToolStripMenuItem, + this.toolsToolStripMenuItem, + this.helpToolStripMenuItem}); + this.topmenu.Location = new System.Drawing.Point(0, 0); + this.topmenu.Name = "topmenu"; + this.topmenu.Size = new System.Drawing.Size(666, 24); + this.topmenu.TabIndex = 1; + this.topmenu.Text = "menuStrip1"; + // + // fileToolStripMenuItem + // + this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.newContactToolStripMenuItem, + this.newFolderToolStripMenuItem, + this.toolStripSeparator1, + this.propertiesToolStripMenuItem, + this.deleteToolStripMenuItem, + this.toolStripSeparator2, + this.importToolStripMenuItem, + this.exportToolStripMenuItem, + this.toolStripSeparator3, + this.toolStripSeparator4, + this.exitToolStripMenuItem}); + this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); + this.fileToolStripMenuItem.Text = "File"; + // + // newContactToolStripMenuItem + // + this.newContactToolStripMenuItem.Name = "newContactToolStripMenuItem"; + 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(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(149, 6); + // + // propertiesToolStripMenuItem + // + this.propertiesToolStripMenuItem.Name = "propertiesToolStripMenuItem"; + 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(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(149, 6); + // + // importToolStripMenuItem + // + this.importToolStripMenuItem.Name = "importToolStripMenuItem"; + 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(152, 22); + this.exportToolStripMenuItem.Text = "Export..."; + // + // toolStripSeparator3 + // + this.toolStripSeparator3.Name = "toolStripSeparator3"; + this.toolStripSeparator3.Size = new System.Drawing.Size(149, 6); + // + // toolStripSeparator4 + // + this.toolStripSeparator4.Name = "toolStripSeparator4"; + this.toolStripSeparator4.Size = new System.Drawing.Size(149, 6); + // + // exitToolStripMenuItem + // + this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; + this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.exitToolStripMenuItem.Text = "Exit"; + this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); + // + // viewToolStripMenuItem + // + this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolbarToolStripMenuItem, + this.foldersToolStripMenuItem}); + this.viewToolStripMenuItem.Name = "viewToolStripMenuItem"; + this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20); + this.viewToolStripMenuItem.Text = "View"; + // + // toolbarToolStripMenuItem + // + this.toolbarToolStripMenuItem.Checked = true; + this.toolbarToolStripMenuItem.CheckOnClick = true; + this.toolbarToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; + this.toolbarToolStripMenuItem.Name = "toolbarToolStripMenuItem"; + this.toolbarToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.toolbarToolStripMenuItem.Text = "Toolbar"; + this.toolbarToolStripMenuItem.Click += new System.EventHandler(this.toolbarToolStripMenuItem_Click); + // + // foldersToolStripMenuItem + // + this.foldersToolStripMenuItem.Checked = true; + this.foldersToolStripMenuItem.CheckOnClick = true; + this.foldersToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; + this.foldersToolStripMenuItem.Name = "foldersToolStripMenuItem"; + this.foldersToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.foldersToolStripMenuItem.Text = "Folders"; + this.foldersToolStripMenuItem.Click += new System.EventHandler(this.foldersToolStripMenuItem_Click); + // + // toolsToolStripMenuItem + // + this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.actionToolStripMenuItem}); + this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem"; + this.toolsToolStripMenuItem.Size = new System.Drawing.Size(47, 20); + this.toolsToolStripMenuItem.Text = "Tools"; + // + // actionToolStripMenuItem + // + this.actionToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.sendMailToolStripMenuItem, + this.dialToolStripMenuItem, + this.internetToolStripMenuItem}); + this.actionToolStripMenuItem.Name = "actionToolStripMenuItem"; + this.actionToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.actionToolStripMenuItem.Text = "Action"; + // + // sendMailToolStripMenuItem + // + this.sendMailToolStripMenuItem.Name = "sendMailToolStripMenuItem"; + this.sendMailToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.sendMailToolStripMenuItem.Text = "Send Mail"; + // + // dialToolStripMenuItem + // + this.dialToolStripMenuItem.Name = "dialToolStripMenuItem"; + this.dialToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.dialToolStripMenuItem.Text = "Dial"; + // + // internetToolStripMenuItem + // + this.internetToolStripMenuItem.Name = "internetToolStripMenuItem"; + this.internetToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.internetToolStripMenuItem.Text = "Internet Call"; + // + // helpToolStripMenuItem + // + this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.aboutAddressBookToolStripMenuItem}); + this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; + this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20); + this.helpToolStripMenuItem.Text = "Help"; + // + // aboutAddressBookToolStripMenuItem + // + this.aboutAddressBookToolStripMenuItem.Name = "aboutAddressBookToolStripMenuItem"; + this.aboutAddressBookToolStripMenuItem.Size = new System.Drawing.Size(182, 22); + this.aboutAddressBookToolStripMenuItem.Text = "About Address Book"; + // + // contactsView + // + this.contactsView.Dock = System.Windows.Forms.DockStyle.Fill; + this.contactsView.Location = new System.Drawing.Point(208, 72); + this.contactsView.Name = "contactsView"; + this.contactsView.Size = new System.Drawing.Size(458, 353); + this.contactsView.TabIndex = 3; + this.contactsView.UseCompatibleStateImageBehavior = false; + this.contactsView.View = System.Windows.Forms.View.List; + // + // treeView1 + // + this.treeView1.Dock = System.Windows.Forms.DockStyle.Left; + this.treeView1.Location = new System.Drawing.Point(0, 72); + this.treeView1.Name = "treeView1"; + treeNode1.Name = "Node0"; + treeNode1.Text = "Shared Contacts"; + this.treeView1.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { + treeNode1}); + this.treeView1.Size = new System.Drawing.Size(208, 353); + this.treeView1.TabIndex = 4; + this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect); + // + // toolbar + // + this.toolbar.BackColor = System.Drawing.Color.Silver; + this.toolbar.BackgroundImage = global::TimeHACK.Properties.Resources.WinClassicGENERALApplicationToolbarBackground; + this.toolbar.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.toolbar.Controls.Add(this.toolProp); + this.toolbar.Controls.Add(this.toolNew); + this.toolbar.Controls.Add(this.toolDelete); + this.toolbar.Dock = System.Windows.Forms.DockStyle.Top; + this.toolbar.Location = new System.Drawing.Point(0, 24); + this.toolbar.Name = "toolbar"; + this.toolbar.Size = new System.Drawing.Size(666, 48); + this.toolbar.TabIndex = 5; + // + // toolProp + // + this.toolProp.BackColor = System.Drawing.Color.Transparent; + this.toolProp.Image = global::TimeHACK.Properties.Resources.WinClassicAddressBookPropertiesIcon; + this.toolProp.Location = new System.Drawing.Point(65, 3); + this.toolProp.Name = "toolProp"; + this.toolProp.Size = new System.Drawing.Size(61, 39); + this.toolProp.TabIndex = 0; + this.toolProp.TabStop = false; + this.toolProp.Click += new System.EventHandler(this.toolProp_Click); + // + // toolNew + // + this.toolNew.BackColor = System.Drawing.Color.Transparent; + this.toolNew.Image = global::TimeHACK.Properties.Resources.WinClassicAddressBookNewIcon; + this.toolNew.Location = new System.Drawing.Point(16, 4); + this.toolNew.Name = "toolNew"; + this.toolNew.Size = new System.Drawing.Size(43, 39); + this.toolNew.TabIndex = 0; + this.toolNew.TabStop = false; + // + // toolDelete + // + this.toolDelete.BackColor = System.Drawing.Color.Transparent; + this.toolDelete.Image = global::TimeHACK.Properties.Resources.WinClassicAddressBookDeleteIcon; + this.toolDelete.Location = new System.Drawing.Point(132, 3); + this.toolDelete.Name = "toolDelete"; + this.toolDelete.Size = new System.Drawing.Size(61, 39); + this.toolDelete.TabIndex = 0; + this.toolDelete.TabStop = false; + this.toolDelete.Click += new System.EventHandler(this.toolDelete_Click); + // + // newContext + // + this.newContext.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.newContactToolStripMenuItem1, + this.newFolderToolStripMenuItem1}); + this.newContext.Name = "newContext"; + this.newContext.Size = new System.Drawing.Size(153, 48); + // + // newContactToolStripMenuItem1 + // + this.newContactToolStripMenuItem1.Name = "newContactToolStripMenuItem1"; + this.newContactToolStripMenuItem1.Size = new System.Drawing.Size(152, 22); + this.newContactToolStripMenuItem1.Text = "New Contact..."; + this.newContactToolStripMenuItem1.Click += new System.EventHandler(this.newContactToolStripMenuItem1_Click); + // + // newFolderToolStripMenuItem1 + // + this.newFolderToolStripMenuItem1.Name = "newFolderToolStripMenuItem1"; + this.newFolderToolStripMenuItem1.Size = new System.Drawing.Size(152, 22); + this.newFolderToolStripMenuItem1.Text = "New Folder..."; + this.newFolderToolStripMenuItem1.Click += new System.EventHandler(this.newFolderToolStripMenuItem1_Click); + // + // WinClassicAddressBook + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.contactsView); + this.Controls.Add(this.treeView1); + this.Controls.Add(this.toolbar); + this.Controls.Add(this.topmenu); + this.Name = "WinClassicAddressBook"; + this.Size = new System.Drawing.Size(666, 425); + this.topmenu.ResumeLayout(false); + this.topmenu.PerformLayout(); + this.toolbar.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.toolProp)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.toolNew)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.toolDelete)).EndInit(); + this.newContext.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private System.Windows.Forms.MenuStrip topmenu; + private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem viewToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem toolsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem newContactToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem newFolderToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripMenuItem propertiesToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; + private System.Windows.Forms.ToolStripMenuItem importToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem exportToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; + private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; + private System.Windows.Forms.ListView contactsView; + private System.Windows.Forms.TreeView treeView1; + private System.Windows.Forms.ToolStripMenuItem toolbarToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem foldersToolStripMenuItem; + private System.Windows.Forms.Panel toolbar; + private System.Windows.Forms.PictureBox toolNew; + private System.Windows.Forms.PictureBox toolDelete; + private System.Windows.Forms.PictureBox toolProp; + private System.Windows.Forms.ToolStripMenuItem actionToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem sendMailToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem dialToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem internetToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem aboutAddressBookToolStripMenuItem; + private System.Windows.Forms.ContextMenuStrip newContext; + private System.Windows.Forms.ToolStripMenuItem newContactToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem newFolderToolStripMenuItem1; + } +} diff --git a/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs new file mode 100644 index 0000000..95ee509 --- /dev/null +++ b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs @@ -0,0 +1,293 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using TimeHACK.Engine; +using TimeHACK.Engine.Template; + +namespace TimeHACK.OS.Win95.Win95Apps +{ + public partial class WinClassicAddressBook : UserControl + { + WindowManager wm = new WindowManager(); + + public List AddressBookObjects; + public WinClassicAddressBook() + { + InitializeComponent(); + foreach (ToolStripMenuItem item in topmenu.Items) + { + item.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((0))); + item.BackColor = Color.Silver; + item.BackgroundImage = Properties.Resources.sliversilver; + item.BackgroundImageLayout = ImageLayout.Center; + item.DisplayStyle = ToolStripItemDisplayStyle.Text; + } + + //Time to prepare to load all the fonts up for the combo boxes + + //foreach (FontFamily font in System.Drawing.FontFamily.Families) + //{ + // Added to the ComboBox here + + //comboFont.Items.Add(font.Name); + //} + + AddressBookObjects = new List + { + new AddressBookContactList() + { + AttachedNode = treeView1.Nodes[0].Text, + } + }; + } + + private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) + { + UpdateContactListFromNodeName(treeView1.SelectedNode.Text); + } + + //AddressBookContactList GetAddressBookContactListFromNode(string NodeText) + //{ + // AddressBookContactList toReturn = new AddressBookContactList(); + // foreach (AddressBookContactList lstitem in AddressBookObjects) + // { + // if (lstitem.AttachedNode == NodeText) + // { + // toReturn = lstitem; + // } + // } + // if (toReturn == null) + // { + // // Something has gone wrong! + // MessageBox.Show("Unable to find list of items"); + // } + // MessageBox.Show("Gone through process!"); + // return toReturn; + //} + + public void UpdateContactListFromNodeName(string NodeName) + { + contactsView.Items.Clear(); + try + { + foreach (AddressBookContactList ContactList in AddressBookObjects) + { + if (ContactList.AttachedNode == NodeName) + { + foreach (AddressBookContact contact in ContactList.Contacts) + { + if (contact != null) + { + if (contact.FirstName != null) + { + contactsView.Items.Add(contact.FirstName + " " + contact.MiddleName + " " + contact.LastName); + } + } + else + { + MessageBox.Show("Null contact!"); + } + } + } + } + } catch + { + + } + } + + public void AddFolderToNode(TreeNode OldTreeNode, string NewNodeName) + { + if (OldTreeNode != null) + { + OldTreeNode.Nodes.Add(NewNodeName); + + AddressBookObjects.Add(new AddressBookContactList + { + AttachedNode = NewNodeName, + }); + } + } + + private void newFolderToolStripMenuItem_Click(object sender, EventArgs e) + { + NewFolder(); + } + + void NewFolder() + { + FRMWinClassicAddressBookNewFolder abnf = new FRMWinClassicAddressBookNewFolder(); + WinClassic app = wm.StartWin95(abnf, "Address Book - New Folder", Properties.Resources.Win95IconWordpad, true, true, true); + + if (treeView1.SelectedNode != null) + { + if (Program.AddressBookSelectedFolderName != null) + { + AddFolderToNode(treeView1.SelectedNode, Program.AddressBookSelectedFolderName); + } + else + { + wm.StartInfobox95("Address Book - New Folder", "You must enter a folder name!", Properties.Resources.Win95Error); + } + } + } + + private void newContactToolStripMenuItem_Click(object sender, EventArgs e) + { + NewContact(); + } + + void NewContact() + { + FRMWinClassicAddressBookNewContact abnc = new FRMWinClassicAddressBookNewContact(); + WinClassic app = wm.StartWin95(abnc, "Address Book - New Contact", Properties.Resources.Win95IconWordpad, true, true, true); + + if (treeView1.SelectedNode != null) + { + if (Program.AddressBookSelectedContact != null) + { + foreach (AddressBookContactList ContactList in AddressBookObjects) + { + if (ContactList.AttachedNode == treeView1.SelectedNode.Text) + { + ContactList.Contacts.Add(Program.AddressBookSelectedContact); + contactsView.Items.Add(Program.AddressBookSelectedContact.FirstName + " " + Program.AddressBookSelectedContact.MiddleName + " " + Program.AddressBookSelectedContact.LastName); + } + } + } + } + } + + private void toolProp_Click(object sender, EventArgs e) + { + OpenProperties(); + } + + void OpenProperties() + { + FRMWinClassicAddressBookNewContact abnc = new FRMWinClassicAddressBookNewContact(); + + // Finds the selected contact + if (treeView1.SelectedNode != null) + { + foreach (AddressBookContactList ContactList in AddressBookObjects) + { + if (ContactList.AttachedNode == treeView1.SelectedNode.Text) + { + foreach (AddressBookContact Contact in ContactList.Contacts) + { + if ((Contact.FirstName + " " + Contact.MiddleName + " " + Contact.LastName) == contactsView.FocusedItem.Text) + { + abnc.toSet = Contact; + } + } + } + } + WinClassic app = wm.StartWin95(abnc, "Address Book - Contact Properties", Properties.Resources.Win95IconWordpad, true, true, true); + + if (treeView1.SelectedNode != null) + { + if (Program.AddressBookSelectedContact != null) + { + foreach (AddressBookContactList ContactList in AddressBookObjects) + { + if (ContactList.AttachedNode == treeView1.SelectedNode.Text) + { + foreach (AddressBookContact Contact in ContactList.Contacts) + { + if ((Contact.FirstName + " " + Contact.MiddleName + " " + Contact.LastName) == contactsView.FocusedItem.Text) + { + ContactList.Contacts.Remove(Contact); + ContactList.Contacts.Add(Program.AddressBookSelectedContact); + } + } + } + } + } + } + } + + + } + + private void propertiesToolStripMenuItem_Click(object sender, EventArgs e) + { + OpenProperties(); + } + + private void deleteToolStripMenuItem_Click(object sender, EventArgs e) + { + DeleteContact(); + } + + void DeleteContact() + { + if (treeView1.SelectedNode != null) + { + foreach (AddressBookContactList ContactList in AddressBookObjects) + { + if (ContactList.AttachedNode == treeView1.SelectedNode.Text) + { + foreach (AddressBookContact Contact in ContactList.Contacts) + { + if ((Contact.FirstName + " " + Contact.MiddleName + " " + Contact.LastName) == contactsView.FocusedItem.Text) + { + ContactList.Contacts.Remove(Contact); + } + } + } + } + } + } + + private void toolDelete_Click(object sender, EventArgs e) + { + DeleteContact(); + } + + private void newContactToolStripMenuItem1_Click(object sender, EventArgs e) + { + NewContact(); + } + + private void newFolderToolStripMenuItem1_Click(object sender, EventArgs e) + { + NewFolder(); + } + + private void toolbarToolStripMenuItem_Click(object sender, EventArgs e) + { + toolbar.Visible = toolbarToolStripMenuItem.Checked; + } + + private void foldersToolStripMenuItem_Click(object sender, EventArgs e) + { + treeView1.Visible = foldersToolStripMenuItem.Checked; + } + + private void exitToolStripMenuItem_Click(object sender, EventArgs e) + { + ((Form)this.TopLevelControl).Close(); + } + } + + public class AddressBookContact + { + public string FirstName; + public string MiddleName; + public string LastName; + public List Emails = new List(); + } + + public class AddressBookContactList + { + public string AttachedNode; + public List Contacts = new List(); + } +} diff --git a/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.resx b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.resx new file mode 100644 index 0000000..e1c367e --- /dev/null +++ b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 118, 17 + + \ No newline at end of file diff --git a/TimeHACK.Main/TimeHACK.Main.csproj b/TimeHACK.Main/TimeHACK.Main.csproj index bda94fd..ce6cc95 100644 --- a/TimeHACK.Main/TimeHACK.Main.csproj +++ b/TimeHACK.Main/TimeHACK.Main.csproj @@ -248,10 +248,10 @@ Win95.cs - + UserControl - + FRMWinClassicAddressBookNewContact.cs @@ -260,16 +260,16 @@ WebChat1998.cs - + UserControl - + FRMWinClassicAddressBookNewFolder.cs - + UserControl - + WinClassicAddressBook.cs @@ -391,7 +391,7 @@ Win95.cs Designer - + FRMWinClassicAddressBookNewContact.cs @@ -399,10 +399,10 @@ ResXFileCodeGenerator WebChat19981.Designer.cs - + FRMWinClassicAddressBookNewFolder.cs - + WinClassicAddressBook.cs -- cgit v1.2.3 From eca20f542d9b604f95f060d92028c4fd4ee173a6 Mon Sep 17 00:00:00 2001 From: Alex-TIMEHACK Date: Sat, 22 Jul 2017 09:27:28 +0100 Subject: Made 95 explorer seperate from 98/2000/ME --- TimeHACK.Engine/SaveSystem.cs | 18 + TimeHACK.Main/OS/Win95/Win95.cs | 2 +- .../Win95Apps/Win95WindowsExplorer.Designer.cs | 611 ++++++++++++++++ .../OS/Win95/Win95Apps/Win95WindowsExplorer.cs | 799 +++++++++++++++++++++ .../OS/Win95/Win95Apps/Win95WindowsExplorer.resx | 123 ++++ .../WinClassicWindowsExplorer.Designer.cs | 611 ---------------- .../Win95/Win95Apps/WinClassicWindowsExplorer.cs | 799 --------------------- .../Win95/Win95Apps/WinClassicWindowsExplorer.resx | 123 ---- TimeHACK.Main/OS/Win98/Win98.cs | 2 +- .../WinClassicWindowsExplorer.Designer.cs | 611 ++++++++++++++++ .../Win98/Win98Apps/WinClassicWindowsExplorer.cs | 799 +++++++++++++++++++++ .../Win98/Win98Apps/WinClassicWindowsExplorer.resx | 123 ++++ TimeHACK.Main/Program.cs | 2 +- TimeHACK.Main/TimeHACK.Main.csproj | 20 +- 14 files changed, 3102 insertions(+), 1541 deletions(-) create mode 100644 TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs create mode 100644 TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs create mode 100644 TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.resx delete mode 100644 TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.Designer.cs delete mode 100644 TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs delete mode 100644 TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.resx create mode 100644 TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs create mode 100644 TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs create mode 100644 TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.resx (limited to 'TimeHACK.Engine/SaveSystem.cs') diff --git a/TimeHACK.Engine/SaveSystem.cs b/TimeHACK.Engine/SaveSystem.cs index 0cacf69..f8cc662 100644 --- a/TimeHACK.Engine/SaveSystem.cs +++ b/TimeHACK.Engine/SaveSystem.cs @@ -200,6 +200,24 @@ namespace TimeHACK.Engine File.WriteAllText(filepath, contents); } + public static void UpgradeFileSystem(string oldOS, string newOS) + { + switch (oldOS) + { + 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 + + SaveDirectoryInfo(Path.Combine(ProfileProgramsDirectory, "Outlook Express"), false, "Outlook Express", true); + CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Outlook Express", "WAB.exe"), "addressbook"); + } + break; + } + } + public static void SaveDirectoryInfo(string directory, bool isProtected, string label, bool allowback) { if (!Directory.Exists(directory)) diff --git a/TimeHACK.Main/OS/Win95/Win95.cs b/TimeHACK.Main/OS/Win95/Win95.cs index 5327033..e1de2e3 100644 --- a/TimeHACK.Main/OS/Win95/Win95.cs +++ b/TimeHACK.Main/OS/Win95/Win95.cs @@ -364,7 +364,7 @@ namespace TimeHACK.OS.Win95 { FileDialogBoxManager.IsInOpenDialog = false; FileDialogBoxManager.IsInSaveDialog = false; - WinClassicWindowsExplorer we = new WinClassicWindowsExplorer(); + Win95WindowsExplorer we = new Win95WindowsExplorer(); WinClassic app = wm.StartWin95(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs new file mode 100644 index 0000000..827cc74 --- /dev/null +++ b/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs @@ -0,0 +1,611 @@ +namespace TimeHACK.OS.Win95.Win95Apps +{ + partial class Win95WindowsExplorer + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.program = new System.Windows.Forms.Panel(); + this.mainView = new System.Windows.Forms.ListView(); + this.diskView = new System.Windows.Forms.TreeView(); + this.MenuStrip1 = new System.Windows.Forms.MenuStrip(); + this.FileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.CreateShortcutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.FolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ShortcutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.TextDocumentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.BitmapImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.DeleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.RenameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.CloseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.EditToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.UndoCtrlZToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.CutCtrlXToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.CopyCtrlCToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.PasteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.PasteShortcutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.SellectAllCtrlAToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.InvertSelectionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ViewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ToolbarToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.StatusBarToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.LargeIconsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.SmallIconsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ListToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.DetailsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ArrangeIconsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ByDriveLetterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ByTypeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.BySizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ByFreeSpaceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.LineUpIconsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.RefreshToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.OptionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ToolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.FindToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.FilesOrFoldersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ComputerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.OnTheInternetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.PeopleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.MapNetworkDriveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.DisconnectNetworkDriveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.GoToToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.HelpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.HelpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.AboutWindows95ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toprightcorner = new System.Windows.Forms.Panel(); + this.bottomrightcorner = new System.Windows.Forms.Panel(); + this.bottomleftcorner = new System.Windows.Forms.Panel(); + this.topleftcorner = new System.Windows.Forms.Panel(); + this.pnlSave = new System.Windows.Forms.Panel(); + this.Button1 = new System.Windows.Forms.Button(); + this.Label1 = new System.Windows.Forms.Label(); + this.txtSave = new System.Windows.Forms.TextBox(); + this.program.SuspendLayout(); + this.MenuStrip1.SuspendLayout(); + this.pnlSave.SuspendLayout(); + this.SuspendLayout(); + // + // program + // + this.program.BackColor = System.Drawing.Color.Silver; + this.program.Controls.Add(this.mainView); + this.program.Controls.Add(this.diskView); + this.program.Controls.Add(this.MenuStrip1); + this.program.Controls.Add(this.toprightcorner); + this.program.Controls.Add(this.bottomrightcorner); + this.program.Controls.Add(this.bottomleftcorner); + this.program.Controls.Add(this.topleftcorner); + this.program.Controls.Add(this.pnlSave); + this.program.Dock = System.Windows.Forms.DockStyle.Fill; + this.program.Location = new System.Drawing.Point(0, 0); + this.program.Name = "program"; + this.program.Size = new System.Drawing.Size(704, 517); + this.program.TabIndex = 13; + // + // mainView + // + this.mainView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.mainView.Location = new System.Drawing.Point(215, 27); + this.mainView.Name = "mainView"; + this.mainView.Size = new System.Drawing.Size(486, 444); + this.mainView.TabIndex = 10; + this.mainView.UseCompatibleStateImageBehavior = false; + this.mainView.View = System.Windows.Forms.View.List; + this.mainView.DoubleClick += new System.EventHandler(this.mainView_DoubleClick); + // + // diskView + // + this.diskView.Location = new System.Drawing.Point(3, 27); + this.diskView.Name = "diskView"; + this.diskView.Size = new System.Drawing.Size(213, 444); + this.diskView.TabIndex = 13; + this.diskView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.diskView_AfterSelect); + // + // MenuStrip1 + // + this.MenuStrip1.BackColor = System.Drawing.Color.Silver; + this.MenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.FileToolStripMenuItem, + this.EditToolStripMenuItem, + this.ViewToolStripMenuItem, + this.ToolsToolStripMenuItem, + this.HelpToolStripMenuItem}); + this.MenuStrip1.Location = new System.Drawing.Point(0, 0); + this.MenuStrip1.Name = "MenuStrip1"; + this.MenuStrip1.Size = new System.Drawing.Size(704, 24); + this.MenuStrip1.TabIndex = 6; + this.MenuStrip1.Text = "MenuStrip1"; + // + // FileToolStripMenuItem + // + this.FileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.CreateShortcutToolStripMenuItem, + this.DeleteToolStripMenuItem, + this.RenameToolStripMenuItem, + this.CloseToolStripMenuItem}); + this.FileToolStripMenuItem.Name = "FileToolStripMenuItem"; + this.FileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); + this.FileToolStripMenuItem.Text = "File"; + // + // CreateShortcutToolStripMenuItem + // + this.CreateShortcutToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.FolderToolStripMenuItem, + this.ShortcutToolStripMenuItem, + this.TextDocumentToolStripMenuItem, + this.BitmapImageToolStripMenuItem}); + this.CreateShortcutToolStripMenuItem.Name = "CreateShortcutToolStripMenuItem"; + this.CreateShortcutToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.CreateShortcutToolStripMenuItem.Text = "New"; + // + // FolderToolStripMenuItem + // + this.FolderToolStripMenuItem.Name = "FolderToolStripMenuItem"; + this.FolderToolStripMenuItem.Size = new System.Drawing.Size(154, 22); + 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"; + this.TextDocumentToolStripMenuItem.Size = new System.Drawing.Size(154, 22); + this.TextDocumentToolStripMenuItem.Text = "Text Document"; + // + // BitmapImageToolStripMenuItem + // + this.BitmapImageToolStripMenuItem.Name = "BitmapImageToolStripMenuItem"; + this.BitmapImageToolStripMenuItem.Size = new System.Drawing.Size(154, 22); + this.BitmapImageToolStripMenuItem.Text = "Bitmap Image"; + // + // DeleteToolStripMenuItem + // + this.DeleteToolStripMenuItem.Name = "DeleteToolStripMenuItem"; + this.DeleteToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.DeleteToolStripMenuItem.Text = "Delete"; + this.DeleteToolStripMenuItem.Click += new System.EventHandler(this.DeleteToolStripMenuItem_Click); + // + // RenameToolStripMenuItem + // + this.RenameToolStripMenuItem.Name = "RenameToolStripMenuItem"; + this.RenameToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.RenameToolStripMenuItem.Text = "Rename"; + this.RenameToolStripMenuItem.Click += new System.EventHandler(this.RenameToolStripMenuItem_Click); + // + // CloseToolStripMenuItem + // + this.CloseToolStripMenuItem.Name = "CloseToolStripMenuItem"; + this.CloseToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.CloseToolStripMenuItem.Text = "Close"; + this.CloseToolStripMenuItem.Click += new System.EventHandler(this.CloseToolStripMenuItem_Click); + // + // EditToolStripMenuItem + // + this.EditToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.UndoCtrlZToolStripMenuItem, + this.CutCtrlXToolStripMenuItem, + this.CopyCtrlCToolStripMenuItem, + this.PasteToolStripMenuItem, + this.PasteShortcutToolStripMenuItem, + this.SellectAllCtrlAToolStripMenuItem, + this.InvertSelectionToolStripMenuItem}); + this.EditToolStripMenuItem.Name = "EditToolStripMenuItem"; + this.EditToolStripMenuItem.Size = new System.Drawing.Size(39, 20); + this.EditToolStripMenuItem.Text = "Edit"; + // + // UndoCtrlZToolStripMenuItem + // + this.UndoCtrlZToolStripMenuItem.Name = "UndoCtrlZToolStripMenuItem"; + this.UndoCtrlZToolStripMenuItem.Size = new System.Drawing.Size(197, 22); + this.UndoCtrlZToolStripMenuItem.Text = "Undo Ctrl+Z"; + // + // CutCtrlXToolStripMenuItem + // + this.CutCtrlXToolStripMenuItem.Name = "CutCtrlXToolStripMenuItem"; + this.CutCtrlXToolStripMenuItem.Size = new System.Drawing.Size(197, 22); + this.CutCtrlXToolStripMenuItem.Text = "Cut Ctrl+X"; + // + // CopyCtrlCToolStripMenuItem + // + this.CopyCtrlCToolStripMenuItem.Name = "CopyCtrlCToolStripMenuItem"; + this.CopyCtrlCToolStripMenuItem.Size = new System.Drawing.Size(197, 22); + this.CopyCtrlCToolStripMenuItem.Text = "Copy Ctrl+C"; + // + // PasteToolStripMenuItem + // + this.PasteToolStripMenuItem.Name = "PasteToolStripMenuItem"; + this.PasteToolStripMenuItem.Size = new System.Drawing.Size(197, 22); + this.PasteToolStripMenuItem.Text = "Paste Ctrl+V"; + // + // PasteShortcutToolStripMenuItem + // + this.PasteShortcutToolStripMenuItem.Name = "PasteShortcutToolStripMenuItem"; + this.PasteShortcutToolStripMenuItem.Size = new System.Drawing.Size(197, 22); + this.PasteShortcutToolStripMenuItem.Text = "Paste Shortcut"; + // + // SellectAllCtrlAToolStripMenuItem + // + this.SellectAllCtrlAToolStripMenuItem.Name = "SellectAllCtrlAToolStripMenuItem"; + this.SellectAllCtrlAToolStripMenuItem.Size = new System.Drawing.Size(197, 22); + this.SellectAllCtrlAToolStripMenuItem.Text = "Sellect All Ctrl+A"; + // + // InvertSelectionToolStripMenuItem + // + this.InvertSelectionToolStripMenuItem.Name = "InvertSelectionToolStripMenuItem"; + this.InvertSelectionToolStripMenuItem.Size = new System.Drawing.Size(197, 22); + this.InvertSelectionToolStripMenuItem.Text = "Invert Selection"; + // + // ViewToolStripMenuItem + // + this.ViewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.ToolbarToolStripMenuItem, + this.StatusBarToolStripMenuItem, + this.LargeIconsToolStripMenuItem, + this.SmallIconsToolStripMenuItem, + this.ListToolStripMenuItem, + this.DetailsToolStripMenuItem, + this.ArrangeIconsToolStripMenuItem, + this.LineUpIconsToolStripMenuItem, + this.RefreshToolStripMenuItem, + this.OptionsToolStripMenuItem}); + this.ViewToolStripMenuItem.Name = "ViewToolStripMenuItem"; + this.ViewToolStripMenuItem.Size = new System.Drawing.Size(44, 20); + this.ViewToolStripMenuItem.Text = "View"; + // + // ToolbarToolStripMenuItem + // + this.ToolbarToolStripMenuItem.Name = "ToolbarToolStripMenuItem"; + this.ToolbarToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.ToolbarToolStripMenuItem.Text = "Toolbar"; + // + // StatusBarToolStripMenuItem + // + this.StatusBarToolStripMenuItem.Name = "StatusBarToolStripMenuItem"; + this.StatusBarToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.StatusBarToolStripMenuItem.Text = "Status Bar"; + // + // LargeIconsToolStripMenuItem + // + this.LargeIconsToolStripMenuItem.Name = "LargeIconsToolStripMenuItem"; + this.LargeIconsToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.LargeIconsToolStripMenuItem.Text = "Large Icons"; + // + // SmallIconsToolStripMenuItem + // + this.SmallIconsToolStripMenuItem.Name = "SmallIconsToolStripMenuItem"; + this.SmallIconsToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.SmallIconsToolStripMenuItem.Text = "Small Icons"; + // + // ListToolStripMenuItem + // + this.ListToolStripMenuItem.Name = "ListToolStripMenuItem"; + this.ListToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.ListToolStripMenuItem.Text = "List"; + // + // DetailsToolStripMenuItem + // + this.DetailsToolStripMenuItem.Name = "DetailsToolStripMenuItem"; + this.DetailsToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.DetailsToolStripMenuItem.Text = "Details"; + // + // ArrangeIconsToolStripMenuItem + // + this.ArrangeIconsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.ByDriveLetterToolStripMenuItem, + this.ByTypeToolStripMenuItem, + this.BySizeToolStripMenuItem, + this.ByFreeSpaceToolStripMenuItem}); + this.ArrangeIconsToolStripMenuItem.Name = "ArrangeIconsToolStripMenuItem"; + this.ArrangeIconsToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.ArrangeIconsToolStripMenuItem.Text = "Arrange Icons"; + // + // ByDriveLetterToolStripMenuItem + // + this.ByDriveLetterToolStripMenuItem.Name = "ByDriveLetterToolStripMenuItem"; + this.ByDriveLetterToolStripMenuItem.Size = new System.Drawing.Size(150, 22); + this.ByDriveLetterToolStripMenuItem.Text = "by Drive Letter"; + // + // ByTypeToolStripMenuItem + // + this.ByTypeToolStripMenuItem.Name = "ByTypeToolStripMenuItem"; + this.ByTypeToolStripMenuItem.Size = new System.Drawing.Size(150, 22); + this.ByTypeToolStripMenuItem.Text = "by Type"; + // + // BySizeToolStripMenuItem + // + this.BySizeToolStripMenuItem.Name = "BySizeToolStripMenuItem"; + this.BySizeToolStripMenuItem.Size = new System.Drawing.Size(150, 22); + this.BySizeToolStripMenuItem.Text = "by Size"; + // + // ByFreeSpaceToolStripMenuItem + // + this.ByFreeSpaceToolStripMenuItem.Name = "ByFreeSpaceToolStripMenuItem"; + this.ByFreeSpaceToolStripMenuItem.Size = new System.Drawing.Size(150, 22); + this.ByFreeSpaceToolStripMenuItem.Text = "by Free Space"; + // + // LineUpIconsToolStripMenuItem + // + this.LineUpIconsToolStripMenuItem.Name = "LineUpIconsToolStripMenuItem"; + this.LineUpIconsToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.LineUpIconsToolStripMenuItem.Text = "Line up Icons"; + // + // RefreshToolStripMenuItem + // + this.RefreshToolStripMenuItem.Name = "RefreshToolStripMenuItem"; + this.RefreshToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.RefreshToolStripMenuItem.Text = "Refresh"; + // + // OptionsToolStripMenuItem + // + this.OptionsToolStripMenuItem.Name = "OptionsToolStripMenuItem"; + this.OptionsToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.OptionsToolStripMenuItem.Text = "Options..."; + // + // ToolsToolStripMenuItem + // + this.ToolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.FindToolStripMenuItem, + this.MapNetworkDriveToolStripMenuItem, + this.DisconnectNetworkDriveToolStripMenuItem, + this.GoToToolStripMenuItem}); + this.ToolsToolStripMenuItem.Name = "ToolsToolStripMenuItem"; + this.ToolsToolStripMenuItem.Size = new System.Drawing.Size(47, 20); + this.ToolsToolStripMenuItem.Text = "Tools"; + // + // FindToolStripMenuItem + // + this.FindToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.FilesOrFoldersToolStripMenuItem, + this.ComputerToolStripMenuItem, + this.OnTheInternetToolStripMenuItem, + this.PeopleToolStripMenuItem}); + this.FindToolStripMenuItem.Name = "FindToolStripMenuItem"; + this.FindToolStripMenuItem.Size = new System.Drawing.Size(220, 22); + this.FindToolStripMenuItem.Text = "Find"; + // + // FilesOrFoldersToolStripMenuItem + // + this.FilesOrFoldersToolStripMenuItem.Name = "FilesOrFoldersToolStripMenuItem"; + this.FilesOrFoldersToolStripMenuItem.Size = new System.Drawing.Size(161, 22); + this.FilesOrFoldersToolStripMenuItem.Text = "Files or Folders..."; + // + // ComputerToolStripMenuItem + // + this.ComputerToolStripMenuItem.Name = "ComputerToolStripMenuItem"; + this.ComputerToolStripMenuItem.Size = new System.Drawing.Size(161, 22); + this.ComputerToolStripMenuItem.Text = "Computer..."; + // + // OnTheInternetToolStripMenuItem + // + this.OnTheInternetToolStripMenuItem.Name = "OnTheInternetToolStripMenuItem"; + this.OnTheInternetToolStripMenuItem.Size = new System.Drawing.Size(161, 22); + this.OnTheInternetToolStripMenuItem.Text = "On the Internet"; + // + // PeopleToolStripMenuItem + // + this.PeopleToolStripMenuItem.Name = "PeopleToolStripMenuItem"; + this.PeopleToolStripMenuItem.Size = new System.Drawing.Size(161, 22); + this.PeopleToolStripMenuItem.Text = "People..."; + // + // MapNetworkDriveToolStripMenuItem + // + this.MapNetworkDriveToolStripMenuItem.Name = "MapNetworkDriveToolStripMenuItem"; + this.MapNetworkDriveToolStripMenuItem.Size = new System.Drawing.Size(220, 22); + this.MapNetworkDriveToolStripMenuItem.Text = "Map Network Drive..."; + // + // DisconnectNetworkDriveToolStripMenuItem + // + this.DisconnectNetworkDriveToolStripMenuItem.Name = "DisconnectNetworkDriveToolStripMenuItem"; + this.DisconnectNetworkDriveToolStripMenuItem.Size = new System.Drawing.Size(220, 22); + this.DisconnectNetworkDriveToolStripMenuItem.Text = "Disconnect Network Drive..."; + // + // GoToToolStripMenuItem + // + this.GoToToolStripMenuItem.Name = "GoToToolStripMenuItem"; + this.GoToToolStripMenuItem.Size = new System.Drawing.Size(220, 22); + this.GoToToolStripMenuItem.Text = "Go to..."; + // + // HelpToolStripMenuItem + // + this.HelpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.HelpToolStripMenuItem1, + this.AboutWindows95ToolStripMenuItem}); + this.HelpToolStripMenuItem.Name = "HelpToolStripMenuItem"; + this.HelpToolStripMenuItem.Size = new System.Drawing.Size(44, 20); + this.HelpToolStripMenuItem.Text = "Help"; + // + // HelpToolStripMenuItem1 + // + this.HelpToolStripMenuItem1.Name = "HelpToolStripMenuItem1"; + this.HelpToolStripMenuItem1.Size = new System.Drawing.Size(174, 22); + this.HelpToolStripMenuItem1.Text = "Help Topics"; + // + // AboutWindows95ToolStripMenuItem + // + this.AboutWindows95ToolStripMenuItem.Name = "AboutWindows95ToolStripMenuItem"; + this.AboutWindows95ToolStripMenuItem.Size = new System.Drawing.Size(174, 22); + this.AboutWindows95ToolStripMenuItem.Text = "About Windows 95"; + this.AboutWindows95ToolStripMenuItem.Click += new System.EventHandler(this.AboutWindows95ToolStripMenuItem_Click); + // + // toprightcorner + // + this.toprightcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.toprightcorner.Location = new System.Drawing.Point(700, 0); + this.toprightcorner.Name = "toprightcorner"; + this.toprightcorner.Size = new System.Drawing.Size(4, 4); + this.toprightcorner.TabIndex = 6; + // + // bottomrightcorner + // + this.bottomrightcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.bottomrightcorner.Cursor = System.Windows.Forms.Cursors.SizeNWSE; + this.bottomrightcorner.Location = new System.Drawing.Point(700, 513); + this.bottomrightcorner.Name = "bottomrightcorner"; + this.bottomrightcorner.Size = new System.Drawing.Size(4, 4); + this.bottomrightcorner.TabIndex = 4; + // + // bottomleftcorner + // + this.bottomleftcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.bottomleftcorner.Location = new System.Drawing.Point(0, 513); + this.bottomleftcorner.Name = "bottomleftcorner"; + this.bottomleftcorner.Size = new System.Drawing.Size(4, 4); + this.bottomleftcorner.TabIndex = 2; + // + // topleftcorner + // + this.topleftcorner.Location = new System.Drawing.Point(0, 0); + this.topleftcorner.Name = "topleftcorner"; + this.topleftcorner.Size = new System.Drawing.Size(4, 4); + this.topleftcorner.TabIndex = 1; + // + // pnlSave + // + this.pnlSave.Controls.Add(this.Button1); + this.pnlSave.Controls.Add(this.Label1); + this.pnlSave.Controls.Add(this.txtSave); + this.pnlSave.Location = new System.Drawing.Point(3, 474); + this.pnlSave.Name = "pnlSave"; + this.pnlSave.Size = new System.Drawing.Size(850, 35); + this.pnlSave.TabIndex = 18; + this.pnlSave.Visible = false; + // + // Button1 + // + this.Button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.Button1.Location = new System.Drawing.Point(608, 1); + this.Button1.Name = "Button1"; + this.Button1.Size = new System.Drawing.Size(75, 23); + this.Button1.TabIndex = 17; + this.Button1.Text = "Save"; + this.Button1.UseVisualStyleBackColor = true; + this.Button1.Click += new System.EventHandler(this.Button1_Click); + // + // Label1 + // + this.Label1.AutoSize = true; + this.Label1.Location = new System.Drawing.Point(3, 6); + this.Label1.Name = "Label1"; + this.Label1.Size = new System.Drawing.Size(57, 13); + this.Label1.TabIndex = 16; + this.Label1.Text = "File Name:"; + // + // txtSave + // + this.txtSave.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtSave.Location = new System.Drawing.Point(60, 3); + this.txtSave.Name = "txtSave"; + this.txtSave.Size = new System.Drawing.Size(542, 20); + this.txtSave.TabIndex = 15; + // + // WinClassicWindowsExplorer + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.program); + this.Name = "WinClassicWindowsExplorer"; + this.Size = new System.Drawing.Size(704, 517); + this.Load += new System.EventHandler(this.WinClassicWindowsExplorer_Load); + this.program.ResumeLayout(false); + this.program.PerformLayout(); + this.MenuStrip1.ResumeLayout(false); + this.MenuStrip1.PerformLayout(); + this.pnlSave.ResumeLayout(false); + this.pnlSave.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + internal System.Windows.Forms.Panel program; + internal System.Windows.Forms.TreeView diskView; + internal System.Windows.Forms.MenuStrip MenuStrip1; + internal System.Windows.Forms.ToolStripMenuItem FileToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem CreateShortcutToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem FolderToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ShortcutToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem TextDocumentToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem BitmapImageToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem DeleteToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem RenameToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem CloseToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem EditToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem UndoCtrlZToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem CutCtrlXToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem CopyCtrlCToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem PasteToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem PasteShortcutToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem SellectAllCtrlAToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem InvertSelectionToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ViewToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ToolbarToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem StatusBarToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem LargeIconsToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem SmallIconsToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ListToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem DetailsToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ArrangeIconsToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ByDriveLetterToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ByTypeToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem BySizeToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ByFreeSpaceToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem LineUpIconsToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem RefreshToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem OptionsToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ToolsToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem FindToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem FilesOrFoldersToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ComputerToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem OnTheInternetToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem PeopleToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem MapNetworkDriveToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem DisconnectNetworkDriveToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem GoToToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem HelpToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem HelpToolStripMenuItem1; + internal System.Windows.Forms.ToolStripMenuItem AboutWindows95ToolStripMenuItem; + internal System.Windows.Forms.Panel toprightcorner; + internal System.Windows.Forms.Panel bottomrightcorner; + internal System.Windows.Forms.Panel bottomleftcorner; + internal System.Windows.Forms.Panel topleftcorner; + internal System.Windows.Forms.ListView mainView; + internal System.Windows.Forms.Panel pnlSave; + internal System.Windows.Forms.Button Button1; + internal System.Windows.Forms.Label Label1; + internal System.Windows.Forms.TextBox txtSave; + } +} diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs new file mode 100644 index 0000000..33f5943 --- /dev/null +++ b/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs @@ -0,0 +1,799 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using static TimeHACK.Engine.SaveSystem; +using System.IO; +using TimeHACK.Engine; +using Newtonsoft.Json; +using TimeHACK.Engine.Template; + +namespace TimeHACK.OS.Win95.Win95Apps +{ + public partial class Win95WindowsExplorer : UserControl + { + public bool IsFileOpenDialog = false; + public bool IsFileSaveDialog = false; + public string onlyViewExtension = ""; + + string ToReplaceWith = ProfileDirectory; + string currentDirectory = Path.Combine(ProfileDirectory, "folders", "Computer"); + string oldLabelText; + int fileType = 6; + //string attemptedDirectory = ""; + WindowManager wm = new WindowManager(); + + public Win95WindowsExplorer() + { + InitializeComponent(); + } + + //'Private Sub TreeView1_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) + //' mainView.Items.Clear() + //' Dim childamount As TreeNodeCollection + //' childamount = TreeView1.SelectedNode.Nodes + //' lblamountofobjects.Text = (childamount.Count & " objects(s)") + //' For Each TreeNode In TreeView1.SelectedNode.Nodes + //' If TreeNode.tag = "file" Then + //' TreeNode.forecolor = TreeView1.BackColor + //' End If + //' mainView.Items.Add(TreeNode.text) + //' Next + //'End Sub + + string ReadDataFile(string reqDirectory, bool returnYesIfProtected = false) { + string Val = ""; + string directoryFileInfo; + directoryFileInfo = File.ReadAllText(Path.Combine(reqDirectory, "_data.info")); + FileSystemFolderInfo toRead = new FileSystemFolderInfo(); + toRead = JsonConvert.DeserializeObject(directoryFileInfo); + + if (returnYesIfProtected == true) + { + if (toRead.Isprotected == true) + { + return "yes"; + } + } + else + { + return toRead.label; + } + return Val; + } + + void RefreshAll() { + try { + // Refresh the right listview + this.mainView.Items.Clear(); + // For Each drive As string In My.Computer.FileSystem.GetDirectories(GameMain.MyDocuments & "\HistacomVB\" & GameMain.SaveProfile & "\HistacomVB\Folders") + // If GetPropetiesForDir(drive)(4) = "isMyDocuments" Then + // diskView.Items.Add("", 0) + // End If + //Next + foreach (string str in Directory.GetDirectories(currentDirectory)) + { + string label = ReadDataFile(str, false); + if (label == "") + { + ListViewItem itm = this.mainView.Items.Add(Path.GetFileName(str)); + itm.ImageKey = str; + } else { + ListViewItem itm = this.mainView.Items.Add(label); + itm.ImageKey = str; + } + } + foreach (string str in Directory.GetFiles(currentDirectory)) + { + // Get the app Icon + + //int AppIcon = 2; + + //switch (new FileInfo(str).Extension) + //{ + // case ".exe": + // string contents; + + // contents = File.ReadAllText(str); + + // switch (contents.ToLower()) + // { + // case "calc": + // AppIcon = 3; + // break; + // case "explorer": + // AppIcon = 4; + // break; + // } + // break; + //} + + + + if (IsFileOpenDialog == true || IsFileSaveDialog == true) + { + if (!(Path.GetFileName(str) == "_data.info")) + { + if (new FileInfo(str).Extension == onlyViewExtension) + { + ListViewItem itm = this.mainView.Items.Add(Path.GetFileName(str)); + itm.Tag = str; + } + } + } else { + if (!(Path.GetFileName(str) == "_data.info")) { + ListViewItem itm = this.mainView.Items.Add(Path.GetFileName(str)); + itm.Tag = str; + } + } + } + } catch (Exception ex) { + wm.StartInfobox95("Exploring - C:", "Error with the file explorer \n" + ex.Message, Properties.Resources.Win95Info); + ((Form)this.TopLevelControl).Close(); + } + } + + void OpenFile(string fileDir) + { + try + { + ReturnType(new FileInfo(fileDir).Extension); + switch (fileType) + { + case 1: + WinClassicNotepad np = new WinClassicNotepad(); + np.mainText.Text = FileDialogBoxManager.ReadTextFile(fileDir); + WinClassic app = wm.StartWin95(np, "Notepad", Properties.Resources.Win95IconNotepad, true, true); + + Program.AddTaskbarItem(app, app.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad); + + break; + case 12: + OpenApplication(FileDialogBoxManager.ReadTextFile(fileDir)); + break; + } + } catch { + } + + } + + void OpenApplication(string appname) + { + switch (appname.ToLower()) + { + case "explorer": + Engine.Template.WinClassic app = wm.StartWin95(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); + Program.AddTaskbarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); + break; + case "calc": + Engine.Template.WinClassic appCalc = wm.StartWin95(new WinClassicCalculator(), "Calculator", Properties.Resources.WinClassicCalc, true, true); + Program.AddTaskbarItem(appCalc, appCalc.Tag.ToString(), "Calculator", Properties.Resources.WinClassicCalc); + + Program.nonimportantapps.Add(appCalc); + Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront(); + Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(Program.NonImportantApp_Closing); + + break; + case "wordpad": + Engine.Template.WinClassic appWP = wm.StartWin95(new WinClassicWordPad(), "Wordpad", Properties.Resources.WinClassicWordpad, true, true); + Program.AddTaskbarItem(appWP, appWP.Tag.ToString(), "Wordpad", Properties.Resources.WinClassicWordpad); + + Program.nonimportantapps.Add(appWP); + Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront(); + Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(Program.NonImportantApp_Closing); + + break; + case "addressbook": + WinClassic appAdBk = wm.StartWin95(new WinClassicAddressBook(), "Address Book", Properties.Resources.WinClassicAddressBook, true, true); + Program.AddTaskbarItem(appAdBk, appAdBk.Tag.ToString(), "Address Book", Properties.Resources.WinClassicAddressBook); + + Program.nonimportantapps.Add(appAdBk); + Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront(); + Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(Program.NonImportantApp_Closing); + + break; + } + } + + string ReturnType(string extension) { + string returnVal = ""; + fileType = 1; + switch (extension) { + case ".txt": + fileType = 1; + returnVal = "Text Document \n createtext"; + break; + case ".dat": + fileType = 1; + returnVal = "Text Document \n createtext"; + break; + case ".rtf": + fileType = 2; + returnVal = "Rich Text Document \n createtext"; + break; + case ".cfg": + fileType = 1; + returnVal = "Config file \n createtext"; + break; + case ".log": + fileType = 1; + returnVal = "log text file \n createtext"; + break; + case ".properties": + fileType = 1; + returnVal = "Config file \n createtext"; + break; + case ".json": + fileType = 1; + returnVal = "Config file \n createtext"; + break; + case ".doc": + fileType = 3; + returnVal = "Word Document (Old) \n word"; + break; + case ".docx": + fileType = 3; + returnVal = "Word Document \n word"; + break; + case ".docm": + fileType = 3; + returnVal = "Macro-Enabled Word Document \n word"; + break; + case ".xls": + fileType = 4; + returnVal = "Excel Spreadsheets (Old) \n excel"; + break; + case ".xlsx": + fileType = 4; + returnVal = "Excel Spreadsheets \n excel"; + break; + case ".ppt": + fileType = 5; + returnVal = "Powerpoint Presentation (Old) \n powerpoint"; + break; + case ".pptx": + fileType = 5; + returnVal = "Powerpoint Presentation \n powerpoint"; + break; + case ".pub": + fileType = 7; + returnVal = "Publisher Document \n powerpoint"; + break; + case ".xps": + fileType = 8; + returnVal = "XPS Document \n xpsview"; + break; + case ".htm": + fileType = 9; + returnVal = "HTML web page \n html"; + break; + case ".html": + fileType = 9; + returnVal = "HTML web page \n html"; + break; + case ".wps": + fileType = 10; + returnVal = "Works document \n works"; + break; + case ".wmf": + fileType = 11; + returnVal = "Windows Metafile (A picture) \n createart"; + break; + case ".emf": + fileType = 11; + returnVal = "Enhanced Metafile (A picture) \n createart"; + break; + case ".png": + fileType = 11; + returnVal = "Picture file (Portable Network Graphics) \n createart"; + break; + case ".jpg": + fileType = 11; + returnVal = "Picture file \n createart"; + break; + case ".jpeg": + fileType = 11; + returnVal = "Picture file \n createart"; + break; + case ".gif": + fileType = 12; + returnVal = "Picture file \n gifman"; + break; + case ".tif": + fileType = 11; + returnVal = "Picture file \n createart"; + break; + case ".bmp": + fileType = 11; + returnVal = "Picture file \n createart"; + break; + case ".zip": + fileType = 11; + returnVal = "Compressed ZIP file \n winrar"; + break; + case ".rar": + fileType = 11; + returnVal = "WINRAR Compressed file \n winrar"; + break; + case ".gz": + fileType = 11; + returnVal = "WINRAR file \n winrar"; + break; + case ".7z": + fileType = 11; + returnVal = "7ZIP file \n 7z"; + break; + case ".ace": + fileType = 11; + returnVal = "WINRAR file \n winrar"; + break; + case ".arj": + fileType = 11; + returnVal = "WINRAR file \n winrar"; + break; + case ".bz2": + fileType = 11; + returnVal = "WINRAR file \n winrar"; + break; + case ".gzip": + fileType = 11; + returnVal = "WINRAR file \n winrar"; + break; + case ".lzh": + fileType = 11; + returnVal = "WINRAR file \n winrar"; + break; + case ".tar": + fileType = 11; + returnVal = "WINRAR file \n winrar"; + break; + case ".uue": + fileType = 11; + returnVal = "WINRAR file \n winrar"; + break; + case ".xz": + fileType = 11; + returnVal = "WINRAR file \n winrar"; + break; + case ".z": + fileType = 11; + returnVal = "WINRAR file \n winrar"; + break; + case ".001": + fileType = 11; + returnVal = "WINRAR file \n winrar"; + break; + case ".exe": + fileType = 12; + returnVal = "Program \n exe"; + break; + case ".jar": + fileType = 13; + returnVal = "Java file \n java"; + break; + case ".iso": + fileType = 14; + returnVal = "CD Image file \n iso"; + break; + case ".avi": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".m4v": + fileType = 15; + returnVal = "Video (MPEG-4) \n video"; + break; + case ".mp4": + fileType = 15; + returnVal = "Video (MPEG-4) \n video"; + break; + case ".wmv": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".m2v": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".m3u": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".mts": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".dv": + fileType = 15; + returnVal = "Video (Digital Video) \n video"; + break; + case ".flv": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".m1v": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".m2ts": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".mkv": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".mov": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".mpeg4": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".mpeg": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".mpg": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".3gp": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".m4p": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".mp2": + fileType = 21; + returnVal = "Audio \n video"; + break; + case ".mp3": + fileType = 21; + returnVal = "Audio \n video"; + break; + case ".wav": + fileType = 21; + returnVal = "Audio \n video"; + break; + case ".nls": + fileType = 16; + returnVal = "Font file \n font"; + break; + case ".dll": + fileType = 17; + returnVal = "System File \n sys"; + break; + case ".bat": + fileType = 18; + returnVal = "MS-DOS Batch file \n winterm"; + break; + case ".url": + fileType = 19; + returnVal = "Shortcut \n short"; + break; + case ".sh": + fileType = 20; + returnVal = "BASH file \n winterm"; + break; + case ".win": + fileType = 17; + returnVal = "System file \n sys"; + break; + } + return returnVal; + } + + //Private Sub windows_explorer_Closed(sender As Object, e As EventArgs) Handles Me.Closed + // IsFileDialog = False + //End Sub + void WinClassicWindowsExplorer_Load(object sender, EventArgs e) { + diskView.ImageList = new ImageList(); + + diskView.ImageList.Images.Add(Properties.Resources.Win95DesktopIcon); + diskView.ImageList.Images.Add(Properties.Resources.Win95HardDiskIcon); + diskView.ImageList.Images.Add(Properties.Resources.WinClassicFolderSmall); + diskView.ImageList.Images.Add(Properties.Resources.WinClassicOpenFolderSmall); + diskView.ImageList.Images.Add(Properties.Resources.Win95ControlPanelIcon); + diskView.ImageList.Images.Add(Properties.Resources.Win95PrintersFolder); + diskView.ImageList.Images.Add(Properties.Resources.Win95ComputerIcon); + diskView.ImageList.Images.Add(Properties.Resources.Win95NetworkIcon); + diskView.ImageList.Images.Add(Properties.Resources.Win95RecycleIcon); + + program.BringToFront(); + + int loc = 0; + TreeNode[] folders = new TreeNode[new DirectoryInfo(currentDirectory).GetDirectories().Length]; + foreach (DirectoryInfo folder in new DirectoryInfo(currentDirectory).GetDirectories()) + { + if (folder.GetDirectories().Length > 0) + { + string label = ReadDataFile(folder.FullName, false); + TreeNode[] tn = createSubDirNodes(folder); + folders[loc] = new TreeNode(label ?? folder.Name, 2, 3, tn); + folders[loc].Tag = folder.FullName; + } + else + { + string label = ReadDataFile(folder.FullName, false); + folders[loc] = new TreeNode(label ?? folder.Name, 2, 3); + folders[loc].Tag = folder.FullName; + } + loc++; + } + TreeNode[] mypcarray = new TreeNode[3]; + mypcarray[0] = new TreeNode("(C:)", 1, 1, folders); + mypcarray[1] = new TreeNode("Control Panel", 4, 4); + mypcarray[2] = new TreeNode("Printers", 5, 5); + TreeNode[] desktoparray = new TreeNode[3]; + desktoparray[0] = new TreeNode("My Computer", 6, 6, mypcarray); + desktoparray[1] = new TreeNode("Network Neighborhood", 7, 7); + desktoparray[2] = new TreeNode("Recycle Bin", 8, 8); + diskView.Nodes.Add(new TreeNode("Desktop", 0, 0, desktoparray)); + + + //diskView.Items.Add("My Computer", 0); + Application.DoEvents(); + + RefreshAll(); + + if (FileDialogBoxManager.IsInOpenDialog) + { + IsFileOpenDialog = true; + } + else if (FileDialogBoxManager.IsInSaveDialog) + { + IsFileSaveDialog = true; + } + + if (IsFileOpenDialog == true) + { + pnlSave.Show(); + Button1.Text = "Open"; + } + else + { + if (IsFileSaveDialog == true) + { + pnlSave.Show(); + Button1.Text = "Save"; + } + } + + onlyViewExtension = FileDialogBoxManager.OnlyViewExtension; + } + + void mainView_DoubleClick(object sender, EventArgs e) + { + try + { + if (mainView.FocusedItem.Tag == null) + { // If it isn't a file + GoToDir(Path.Combine(currentDirectory, mainView.FocusedItem.ImageKey.ToString())); + } + else + { // If it is a file + if (IsFileOpenDialog == true || IsFileSaveDialog == true) + { + if (new FileInfo(Path.Combine(currentDirectory, txtSave.Text)).Extension == onlyViewExtension) + { + Program.WindowsExplorerReturnPath = Path.Combine(currentDirectory, txtSave.Text); + } + + + FileDialogBoxManager.IsInOpenDialog = false; + FileDialogBoxManager.IsInSaveDialog = false; + + ((Form)this.TopLevelControl).Close(); + } + else + { + OpenFile((string)mainView.FocusedItem.Tag); + } + } + } catch (Exception ex) { + MessageBox.Show(ex.Message); + } + } + + void diskView_AfterSelect(object sender, EventArgs e) + { + try + { + if (diskView.SelectedNode != null) + { + if (diskView.SelectedNode.Text == "My Computer") + { + GoToDir(ProfileFileSystemDirectory); + } + else if (diskView.SelectedNode.Text == "(C:)") + { + GoToDir(ProfileMyComputerDirectory); + } + else + { + if (diskView.SelectedNode.Tag != null) + { + // It is a directory: + + try + { + GoToDir(diskView.SelectedNode.Tag.ToString()); + } + catch { } + } + } + } + } catch { + } + } + + void GoToDir(string dir) + { + mainView.Show(); + mainView.BringToFront(); + currentDirectory = dir; + RefreshAll(); + } + + private void FolderToolStripMenuItem_Click(object sender, EventArgs e) + { + if (File.Exists(currentDirectory + "\\New Folder")) { + wm.StartInfobox95("Windows Explorer", "This directory already exists", Properties.Resources.Win95Info); + } else { + Directory.CreateDirectory(currentDirectory + "\\New Folder"); + SaveDirectoryInfo(currentDirectory + "\\New Folder", false, "New Folder", true); + + RefreshAll(); + } + } + + private void Button1_Click(object sender, EventArgs e) + { + try + { + bool OpenFile = false; + if (mainView.FocusedItem != null) + { + if ((string)mainView.FocusedItem.Tag == "") + { // If it isn't a file + GoToDir(Path.Combine(currentDirectory, mainView.FocusedItem.Tag.ToString())); + } + else OpenFile = true; // If it is a file + } + else OpenFile = true; + if (OpenFile == true) + { + if (txtSave.Text == "") + { + wm.StartInfobox95("Windows Explorer", "Please enter a filename", Properties.Resources.Win95Info); + } + else + { + if (new FileInfo(Path.Combine(currentDirectory, txtSave.Text)).Extension == onlyViewExtension) + { + + Program.WindowsExplorerReturnPath = Path.Combine(currentDirectory, txtSave.Text); + + } + + + FileDialogBoxManager.IsInOpenDialog = false; + FileDialogBoxManager.IsInSaveDialog = false; + + ((Form)this.TopLevelControl).Close(); + } + } + } catch { + + } + } + + private void DeleteToolStripMenuItem_Click(object sender, EventArgs e) + { + try + { + if (!FileOrDirectoryExists(Path.Combine(currentDirectory, mainView.FocusedItem.Text))) + { + wm.StartInfobox95("Windows Explorer", "This directory doesn't exist", Properties.Resources.Win95Info); + } + else + { + if (Directory.Exists(Path.Combine(currentDirectory, mainView.FocusedItem.Text))) Directory.Delete(Path.Combine(currentDirectory, mainView.FocusedItem.Text), true); + else File.Delete(Path.Combine(currentDirectory, mainView.FocusedItem.Text)); + + RefreshAll(); + } + } catch + { + RefreshAll(); + } + + } + + internal static bool FileOrDirectoryExists(string path) + { + return (Directory.Exists(path) || File.Exists(path)); + } + + private void CloseToolStripMenuItem_Click(object sender, EventArgs e) + { + ((Form)this.TopLevelControl).Close(); + } + private void AboutWindows95ToolStripMenuItem_Click(object sender, EventArgs e) + { + WindowManager wm = new WindowManager(); + wm.StartAboutBox95("Windows 95", "Microsoft Windows 95 Rev B", Properties.Resources.WinClassicAbout95); + } + + private void RenameToolStripMenuItem_Click(object sender, EventArgs e) + { + try + { + // The AfterLabelEdit event will kick in after this + oldLabelText = mainView.FocusedItem.Text; + mainView.LabelEdit = true; + mainView.FocusedItem.BeginEdit(); + } catch + { + + } + } + + private void mainView_AfterLabelEdit(object sender, LabelEditEventArgs e) + { + + string setText; + setText = mainView.FocusedItem.Text; + if (setText == "") + { + wm.StartInfobox95("Windows Explorer", "Please enter a new directory name", Properties.Resources.Win95Info); + } + else + { + if (Directory.Exists(setText)) + { + wm.StartInfobox95("Windows Explorer", "That directory already exists.", Properties.Resources.Win95Info); + } + else + { + Directory.Delete(Path.Combine(currentDirectory, oldLabelText), true); + Directory.CreateDirectory(Path.Combine(currentDirectory, setText)); + } + } + RefreshAll(); + } + + private TreeNode[] createSubDirNodes(DirectoryInfo folder) + { + TreeNode[] toReturn = new TreeNode[folder.GetDirectories().Length]; + int loc = 0; + foreach (DirectoryInfo fold in folder.GetDirectories()) + { + if (fold.GetDirectories().Length > 0) + { + string label = ReadDataFile(fold.FullName, false); + TreeNode[] tn = createSubDirNodes(fold); + toReturn[loc] = new TreeNode(label ?? fold.Name, 2, 3, tn); + toReturn[loc].Tag = fold.FullName; + } + else + { + string label = ReadDataFile(fold.FullName, false); + toReturn[loc] = new TreeNode(label ?? fold.Name, 2, 3); + toReturn[loc].Tag = fold.FullName; + } + loc++; + } + return toReturn; + } + } +} diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.resx b/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.resx new file mode 100644 index 0000000..bb70361 --- /dev/null +++ b/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.Designer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.Designer.cs deleted file mode 100644 index 26d376d..0000000 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.Designer.cs +++ /dev/null @@ -1,611 +0,0 @@ -namespace TimeHACK.OS.Win95.Win95Apps -{ - partial class WinClassicWindowsExplorer - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.program = new System.Windows.Forms.Panel(); - this.mainView = new System.Windows.Forms.ListView(); - this.diskView = new System.Windows.Forms.TreeView(); - this.MenuStrip1 = new System.Windows.Forms.MenuStrip(); - this.FileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.CreateShortcutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.FolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ShortcutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.TextDocumentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.BitmapImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.DeleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.RenameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.CloseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.EditToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.UndoCtrlZToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.CutCtrlXToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.CopyCtrlCToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.PasteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.PasteShortcutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.SellectAllCtrlAToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.InvertSelectionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ViewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolbarToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.StatusBarToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.LargeIconsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.SmallIconsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ListToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.DetailsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ArrangeIconsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ByDriveLetterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ByTypeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.BySizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ByFreeSpaceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.LineUpIconsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.RefreshToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.OptionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.FindToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.FilesOrFoldersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ComputerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.OnTheInternetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.PeopleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.MapNetworkDriveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.DisconnectNetworkDriveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.GoToToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.HelpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.HelpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.AboutWindows95ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toprightcorner = new System.Windows.Forms.Panel(); - this.bottomrightcorner = new System.Windows.Forms.Panel(); - this.bottomleftcorner = new System.Windows.Forms.Panel(); - this.topleftcorner = new System.Windows.Forms.Panel(); - this.pnlSave = new System.Windows.Forms.Panel(); - this.Button1 = new System.Windows.Forms.Button(); - this.Label1 = new System.Windows.Forms.Label(); - this.txtSave = new System.Windows.Forms.TextBox(); - this.program.SuspendLayout(); - this.MenuStrip1.SuspendLayout(); - this.pnlSave.SuspendLayout(); - this.SuspendLayout(); - // - // program - // - this.program.BackColor = System.Drawing.Color.Silver; - this.program.Controls.Add(this.mainView); - this.program.Controls.Add(this.diskView); - this.program.Controls.Add(this.MenuStrip1); - this.program.Controls.Add(this.toprightcorner); - this.program.Controls.Add(this.bottomrightcorner); - this.program.Controls.Add(this.bottomleftcorner); - this.program.Controls.Add(this.topleftcorner); - this.program.Controls.Add(this.pnlSave); - this.program.Dock = System.Windows.Forms.DockStyle.Fill; - this.program.Location = new System.Drawing.Point(0, 0); - this.program.Name = "program"; - this.program.Size = new System.Drawing.Size(704, 517); - this.program.TabIndex = 13; - // - // mainView - // - this.mainView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.mainView.Location = new System.Drawing.Point(215, 27); - this.mainView.Name = "mainView"; - this.mainView.Size = new System.Drawing.Size(486, 444); - this.mainView.TabIndex = 10; - this.mainView.UseCompatibleStateImageBehavior = false; - this.mainView.View = System.Windows.Forms.View.List; - this.mainView.DoubleClick += new System.EventHandler(this.mainView_DoubleClick); - // - // diskView - // - this.diskView.Location = new System.Drawing.Point(3, 27); - this.diskView.Name = "diskView"; - this.diskView.Size = new System.Drawing.Size(213, 444); - this.diskView.TabIndex = 13; - this.diskView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.diskView_AfterSelect); - // - // MenuStrip1 - // - this.MenuStrip1.BackColor = System.Drawing.Color.Silver; - this.MenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.FileToolStripMenuItem, - this.EditToolStripMenuItem, - this.ViewToolStripMenuItem, - this.ToolsToolStripMenuItem, - this.HelpToolStripMenuItem}); - this.MenuStrip1.Location = new System.Drawing.Point(0, 0); - this.MenuStrip1.Name = "MenuStrip1"; - this.MenuStrip1.Size = new System.Drawing.Size(704, 24); - this.MenuStrip1.TabIndex = 6; - this.MenuStrip1.Text = "MenuStrip1"; - // - // FileToolStripMenuItem - // - this.FileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.CreateShortcutToolStripMenuItem, - this.DeleteToolStripMenuItem, - this.RenameToolStripMenuItem, - this.CloseToolStripMenuItem}); - this.FileToolStripMenuItem.Name = "FileToolStripMenuItem"; - this.FileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); - this.FileToolStripMenuItem.Text = "File"; - // - // CreateShortcutToolStripMenuItem - // - this.CreateShortcutToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.FolderToolStripMenuItem, - this.ShortcutToolStripMenuItem, - this.TextDocumentToolStripMenuItem, - this.BitmapImageToolStripMenuItem}); - this.CreateShortcutToolStripMenuItem.Name = "CreateShortcutToolStripMenuItem"; - this.CreateShortcutToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.CreateShortcutToolStripMenuItem.Text = "New"; - // - // FolderToolStripMenuItem - // - this.FolderToolStripMenuItem.Name = "FolderToolStripMenuItem"; - this.FolderToolStripMenuItem.Size = new System.Drawing.Size(154, 22); - 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"; - this.TextDocumentToolStripMenuItem.Size = new System.Drawing.Size(154, 22); - this.TextDocumentToolStripMenuItem.Text = "Text Document"; - // - // BitmapImageToolStripMenuItem - // - this.BitmapImageToolStripMenuItem.Name = "BitmapImageToolStripMenuItem"; - this.BitmapImageToolStripMenuItem.Size = new System.Drawing.Size(154, 22); - this.BitmapImageToolStripMenuItem.Text = "Bitmap Image"; - // - // DeleteToolStripMenuItem - // - this.DeleteToolStripMenuItem.Name = "DeleteToolStripMenuItem"; - this.DeleteToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.DeleteToolStripMenuItem.Text = "Delete"; - this.DeleteToolStripMenuItem.Click += new System.EventHandler(this.DeleteToolStripMenuItem_Click); - // - // RenameToolStripMenuItem - // - this.RenameToolStripMenuItem.Name = "RenameToolStripMenuItem"; - this.RenameToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.RenameToolStripMenuItem.Text = "Rename"; - this.RenameToolStripMenuItem.Click += new System.EventHandler(this.RenameToolStripMenuItem_Click); - // - // CloseToolStripMenuItem - // - this.CloseToolStripMenuItem.Name = "CloseToolStripMenuItem"; - this.CloseToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.CloseToolStripMenuItem.Text = "Close"; - this.CloseToolStripMenuItem.Click += new System.EventHandler(this.CloseToolStripMenuItem_Click); - // - // EditToolStripMenuItem - // - this.EditToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.UndoCtrlZToolStripMenuItem, - this.CutCtrlXToolStripMenuItem, - this.CopyCtrlCToolStripMenuItem, - this.PasteToolStripMenuItem, - this.PasteShortcutToolStripMenuItem, - this.SellectAllCtrlAToolStripMenuItem, - this.InvertSelectionToolStripMenuItem}); - this.EditToolStripMenuItem.Name = "EditToolStripMenuItem"; - this.EditToolStripMenuItem.Size = new System.Drawing.Size(39, 20); - this.EditToolStripMenuItem.Text = "Edit"; - // - // UndoCtrlZToolStripMenuItem - // - this.UndoCtrlZToolStripMenuItem.Name = "UndoCtrlZToolStripMenuItem"; - this.UndoCtrlZToolStripMenuItem.Size = new System.Drawing.Size(197, 22); - this.UndoCtrlZToolStripMenuItem.Text = "Undo Ctrl+Z"; - // - // CutCtrlXToolStripMenuItem - // - this.CutCtrlXToolStripMenuItem.Name = "CutCtrlXToolStripMenuItem"; - this.CutCtrlXToolStripMenuItem.Size = new System.Drawing.Size(197, 22); - this.CutCtrlXToolStripMenuItem.Text = "Cut Ctrl+X"; - // - // CopyCtrlCToolStripMenuItem - // - this.CopyCtrlCToolStripMenuItem.Name = "CopyCtrlCToolStripMenuItem"; - this.CopyCtrlCToolStripMenuItem.Size = new System.Drawing.Size(197, 22); - this.CopyCtrlCToolStripMenuItem.Text = "Copy Ctrl+C"; - // - // PasteToolStripMenuItem - // - this.PasteToolStripMenuItem.Name = "PasteToolStripMenuItem"; - this.PasteToolStripMenuItem.Size = new System.Drawing.Size(197, 22); - this.PasteToolStripMenuItem.Text = "Paste Ctrl+V"; - // - // PasteShortcutToolStripMenuItem - // - this.PasteShortcutToolStripMenuItem.Name = "PasteShortcutToolStripMenuItem"; - this.PasteShortcutToolStripMenuItem.Size = new System.Drawing.Size(197, 22); - this.PasteShortcutToolStripMenuItem.Text = "Paste Shortcut"; - // - // SellectAllCtrlAToolStripMenuItem - // - this.SellectAllCtrlAToolStripMenuItem.Name = "SellectAllCtrlAToolStripMenuItem"; - this.SellectAllCtrlAToolStripMenuItem.Size = new System.Drawing.Size(197, 22); - this.SellectAllCtrlAToolStripMenuItem.Text = "Sellect All Ctrl+A"; - // - // InvertSelectionToolStripMenuItem - // - this.InvertSelectionToolStripMenuItem.Name = "InvertSelectionToolStripMenuItem"; - this.InvertSelectionToolStripMenuItem.Size = new System.Drawing.Size(197, 22); - this.InvertSelectionToolStripMenuItem.Text = "Invert Selection"; - // - // ViewToolStripMenuItem - // - this.ViewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ToolbarToolStripMenuItem, - this.StatusBarToolStripMenuItem, - this.LargeIconsToolStripMenuItem, - this.SmallIconsToolStripMenuItem, - this.ListToolStripMenuItem, - this.DetailsToolStripMenuItem, - this.ArrangeIconsToolStripMenuItem, - this.LineUpIconsToolStripMenuItem, - this.RefreshToolStripMenuItem, - this.OptionsToolStripMenuItem}); - this.ViewToolStripMenuItem.Name = "ViewToolStripMenuItem"; - this.ViewToolStripMenuItem.Size = new System.Drawing.Size(44, 20); - this.ViewToolStripMenuItem.Text = "View"; - // - // ToolbarToolStripMenuItem - // - this.ToolbarToolStripMenuItem.Name = "ToolbarToolStripMenuItem"; - this.ToolbarToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.ToolbarToolStripMenuItem.Text = "Toolbar"; - // - // StatusBarToolStripMenuItem - // - this.StatusBarToolStripMenuItem.Name = "StatusBarToolStripMenuItem"; - this.StatusBarToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.StatusBarToolStripMenuItem.Text = "Status Bar"; - // - // LargeIconsToolStripMenuItem - // - this.LargeIconsToolStripMenuItem.Name = "LargeIconsToolStripMenuItem"; - this.LargeIconsToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.LargeIconsToolStripMenuItem.Text = "Large Icons"; - // - // SmallIconsToolStripMenuItem - // - this.SmallIconsToolStripMenuItem.Name = "SmallIconsToolStripMenuItem"; - this.SmallIconsToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.SmallIconsToolStripMenuItem.Text = "Small Icons"; - // - // ListToolStripMenuItem - // - this.ListToolStripMenuItem.Name = "ListToolStripMenuItem"; - this.ListToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.ListToolStripMenuItem.Text = "List"; - // - // DetailsToolStripMenuItem - // - this.DetailsToolStripMenuItem.Name = "DetailsToolStripMenuItem"; - this.DetailsToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.DetailsToolStripMenuItem.Text = "Details"; - // - // ArrangeIconsToolStripMenuItem - // - this.ArrangeIconsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.ByDriveLetterToolStripMenuItem, - this.ByTypeToolStripMenuItem, - this.BySizeToolStripMenuItem, - this.ByFreeSpaceToolStripMenuItem}); - this.ArrangeIconsToolStripMenuItem.Name = "ArrangeIconsToolStripMenuItem"; - this.ArrangeIconsToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.ArrangeIconsToolStripMenuItem.Text = "Arrange Icons"; - // - // ByDriveLetterToolStripMenuItem - // - this.ByDriveLetterToolStripMenuItem.Name = "ByDriveLetterToolStripMenuItem"; - this.ByDriveLetterToolStripMenuItem.Size = new System.Drawing.Size(150, 22); - this.ByDriveLetterToolStripMenuItem.Text = "by Drive Letter"; - // - // ByTypeToolStripMenuItem - // - this.ByTypeToolStripMenuItem.Name = "ByTypeToolStripMenuItem"; - this.ByTypeToolStripMenuItem.Size = new System.Drawing.Size(150, 22); - this.ByTypeToolStripMenuItem.Text = "by Type"; - // - // BySizeToolStripMenuItem - // - this.BySizeToolStripMenuItem.Name = "BySizeToolStripMenuItem"; - this.BySizeToolStripMenuItem.Size = new System.Drawing.Size(150, 22); - this.BySizeToolStripMenuItem.Text = "by Size"; - // - // ByFreeSpaceToolStripMenuItem - // - this.ByFreeSpaceToolStripMenuItem.Name = "ByFreeSpaceToolStripMenuItem"; - this.ByFreeSpaceToolStripMenuItem.Size = new System.Drawing.Size(150, 22); - this.ByFreeSpaceToolStripMenuItem.Text = "by Free Space"; - // - // LineUpIconsToolStripMenuItem - // - this.LineUpIconsToolStripMenuItem.Name = "LineUpIconsToolStripMenuItem"; - this.LineUpIconsToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.LineUpIconsToolStripMenuItem.Text = "Line up Icons"; - // - // RefreshToolStripMenuItem - // - this.RefreshToolStripMenuItem.Name = "RefreshToolStripMenuItem"; - this.RefreshToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.RefreshToolStripMenuItem.Text = "Refresh"; - // - // OptionsToolStripMenuItem - // - this.OptionsToolStripMenuItem.Name = "OptionsToolStripMenuItem"; - this.OptionsToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.OptionsToolStripMenuItem.Text = "Options..."; - // - // ToolsToolStripMenuItem - // - this.ToolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.FindToolStripMenuItem, - this.MapNetworkDriveToolStripMenuItem, - this.DisconnectNetworkDriveToolStripMenuItem, - this.GoToToolStripMenuItem}); - this.ToolsToolStripMenuItem.Name = "ToolsToolStripMenuItem"; - this.ToolsToolStripMenuItem.Size = new System.Drawing.Size(47, 20); - this.ToolsToolStripMenuItem.Text = "Tools"; - // - // FindToolStripMenuItem - // - this.FindToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.FilesOrFoldersToolStripMenuItem, - this.ComputerToolStripMenuItem, - this.OnTheInternetToolStripMenuItem, - this.PeopleToolStripMenuItem}); - this.FindToolStripMenuItem.Name = "FindToolStripMenuItem"; - this.FindToolStripMenuItem.Size = new System.Drawing.Size(220, 22); - this.FindToolStripMenuItem.Text = "Find"; - // - // FilesOrFoldersToolStripMenuItem - // - this.FilesOrFoldersToolStripMenuItem.Name = "FilesOrFoldersToolStripMenuItem"; - this.FilesOrFoldersToolStripMenuItem.Size = new System.Drawing.Size(161, 22); - this.FilesOrFoldersToolStripMenuItem.Text = "Files or Folders..."; - // - // ComputerToolStripMenuItem - // - this.ComputerToolStripMenuItem.Name = "ComputerToolStripMenuItem"; - this.ComputerToolStripMenuItem.Size = new System.Drawing.Size(161, 22); - this.ComputerToolStripMenuItem.Text = "Computer..."; - // - // OnTheInternetToolStripMenuItem - // - this.OnTheInternetToolStripMenuItem.Name = "OnTheInternetToolStripMenuItem"; - this.OnTheInternetToolStripMenuItem.Size = new System.Drawing.Size(161, 22); - this.OnTheInternetToolStripMenuItem.Text = "On the Internet"; - // - // PeopleToolStripMenuItem - // - this.PeopleToolStripMenuItem.Name = "PeopleToolStripMenuItem"; - this.PeopleToolStripMenuItem.Size = new System.Drawing.Size(161, 22); - this.PeopleToolStripMenuItem.Text = "People..."; - // - // MapNetworkDriveToolStripMenuItem - // - this.MapNetworkDriveToolStripMenuItem.Name = "MapNetworkDriveToolStripMenuItem"; - this.MapNetworkDriveToolStripMenuItem.Size = new System.Drawing.Size(220, 22); - this.MapNetworkDriveToolStripMenuItem.Text = "Map Network Drive..."; - // - // DisconnectNetworkDriveToolStripMenuItem - // - this.DisconnectNetworkDriveToolStripMenuItem.Name = "DisconnectNetworkDriveToolStripMenuItem"; - this.DisconnectNetworkDriveToolStripMenuItem.Size = new System.Drawing.Size(220, 22); - this.DisconnectNetworkDriveToolStripMenuItem.Text = "Disconnect Network Drive..."; - // - // GoToToolStripMenuItem - // - this.GoToToolStripMenuItem.Name = "GoToToolStripMenuItem"; - this.GoToToolStripMenuItem.Size = new System.Drawing.Size(220, 22); - this.GoToToolStripMenuItem.Text = "Go to..."; - // - // HelpToolStripMenuItem - // - this.HelpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.HelpToolStripMenuItem1, - this.AboutWindows95ToolStripMenuItem}); - this.HelpToolStripMenuItem.Name = "HelpToolStripMenuItem"; - this.HelpToolStripMenuItem.Size = new System.Drawing.Size(44, 20); - this.HelpToolStripMenuItem.Text = "Help"; - // - // HelpToolStripMenuItem1 - // - this.HelpToolStripMenuItem1.Name = "HelpToolStripMenuItem1"; - this.HelpToolStripMenuItem1.Size = new System.Drawing.Size(174, 22); - this.HelpToolStripMenuItem1.Text = "Help Topics"; - // - // AboutWindows95ToolStripMenuItem - // - this.AboutWindows95ToolStripMenuItem.Name = "AboutWindows95ToolStripMenuItem"; - this.AboutWindows95ToolStripMenuItem.Size = new System.Drawing.Size(174, 22); - this.AboutWindows95ToolStripMenuItem.Text = "About Windows 95"; - this.AboutWindows95ToolStripMenuItem.Click += new System.EventHandler(this.AboutWindows95ToolStripMenuItem_Click); - // - // toprightcorner - // - this.toprightcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.toprightcorner.Location = new System.Drawing.Point(700, 0); - this.toprightcorner.Name = "toprightcorner"; - this.toprightcorner.Size = new System.Drawing.Size(4, 4); - this.toprightcorner.TabIndex = 6; - // - // bottomrightcorner - // - this.bottomrightcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.bottomrightcorner.Cursor = System.Windows.Forms.Cursors.SizeNWSE; - this.bottomrightcorner.Location = new System.Drawing.Point(700, 513); - this.bottomrightcorner.Name = "bottomrightcorner"; - this.bottomrightcorner.Size = new System.Drawing.Size(4, 4); - this.bottomrightcorner.TabIndex = 4; - // - // bottomleftcorner - // - this.bottomleftcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.bottomleftcorner.Location = new System.Drawing.Point(0, 513); - this.bottomleftcorner.Name = "bottomleftcorner"; - this.bottomleftcorner.Size = new System.Drawing.Size(4, 4); - this.bottomleftcorner.TabIndex = 2; - // - // topleftcorner - // - this.topleftcorner.Location = new System.Drawing.Point(0, 0); - this.topleftcorner.Name = "topleftcorner"; - this.topleftcorner.Size = new System.Drawing.Size(4, 4); - this.topleftcorner.TabIndex = 1; - // - // pnlSave - // - this.pnlSave.Controls.Add(this.Button1); - this.pnlSave.Controls.Add(this.Label1); - this.pnlSave.Controls.Add(this.txtSave); - this.pnlSave.Location = new System.Drawing.Point(3, 474); - this.pnlSave.Name = "pnlSave"; - this.pnlSave.Size = new System.Drawing.Size(850, 35); - this.pnlSave.TabIndex = 18; - this.pnlSave.Visible = false; - // - // Button1 - // - this.Button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.Button1.Location = new System.Drawing.Point(608, 1); - this.Button1.Name = "Button1"; - this.Button1.Size = new System.Drawing.Size(75, 23); - this.Button1.TabIndex = 17; - this.Button1.Text = "Save"; - this.Button1.UseVisualStyleBackColor = true; - this.Button1.Click += new System.EventHandler(this.Button1_Click); - // - // Label1 - // - this.Label1.AutoSize = true; - this.Label1.Location = new System.Drawing.Point(3, 6); - this.Label1.Name = "Label1"; - this.Label1.Size = new System.Drawing.Size(57, 13); - this.Label1.TabIndex = 16; - this.Label1.Text = "File Name:"; - // - // txtSave - // - this.txtSave.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtSave.Location = new System.Drawing.Point(60, 3); - this.txtSave.Name = "txtSave"; - this.txtSave.Size = new System.Drawing.Size(542, 20); - this.txtSave.TabIndex = 15; - // - // WinClassicWindowsExplorer - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.program); - this.Name = "WinClassicWindowsExplorer"; - this.Size = new System.Drawing.Size(704, 517); - this.Load += new System.EventHandler(this.WinClassicWindowsExplorer_Load); - this.program.ResumeLayout(false); - this.program.PerformLayout(); - this.MenuStrip1.ResumeLayout(false); - this.MenuStrip1.PerformLayout(); - this.pnlSave.ResumeLayout(false); - this.pnlSave.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - internal System.Windows.Forms.Panel program; - internal System.Windows.Forms.TreeView diskView; - internal System.Windows.Forms.MenuStrip MenuStrip1; - internal System.Windows.Forms.ToolStripMenuItem FileToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem CreateShortcutToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem FolderToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem ShortcutToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem TextDocumentToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem BitmapImageToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem DeleteToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem RenameToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem CloseToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem EditToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem UndoCtrlZToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem CutCtrlXToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem CopyCtrlCToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem PasteToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem PasteShortcutToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem SellectAllCtrlAToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem InvertSelectionToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem ViewToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem ToolbarToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem StatusBarToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem LargeIconsToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem SmallIconsToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem ListToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem DetailsToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem ArrangeIconsToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem ByDriveLetterToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem ByTypeToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem BySizeToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem ByFreeSpaceToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem LineUpIconsToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem RefreshToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem OptionsToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem ToolsToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem FindToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem FilesOrFoldersToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem ComputerToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem OnTheInternetToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem PeopleToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem MapNetworkDriveToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem DisconnectNetworkDriveToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem GoToToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem HelpToolStripMenuItem; - internal System.Windows.Forms.ToolStripMenuItem HelpToolStripMenuItem1; - internal System.Windows.Forms.ToolStripMenuItem AboutWindows95ToolStripMenuItem; - internal System.Windows.Forms.Panel toprightcorner; - internal System.Windows.Forms.Panel bottomrightcorner; - internal System.Windows.Forms.Panel bottomleftcorner; - internal System.Windows.Forms.Panel topleftcorner; - internal System.Windows.Forms.ListView mainView; - internal System.Windows.Forms.Panel pnlSave; - internal System.Windows.Forms.Button Button1; - internal System.Windows.Forms.Label Label1; - internal System.Windows.Forms.TextBox txtSave; - } -} diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs deleted file mode 100644 index 1b12fbc..0000000 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.cs +++ /dev/null @@ -1,799 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; -using static TimeHACK.Engine.SaveSystem; -using System.IO; -using TimeHACK.Engine; -using Newtonsoft.Json; -using TimeHACK.Engine.Template; - -namespace TimeHACK.OS.Win95.Win95Apps -{ - public partial class WinClassicWindowsExplorer : UserControl - { - public bool IsFileOpenDialog = false; - public bool IsFileSaveDialog = false; - public string onlyViewExtension = ""; - - string ToReplaceWith = ProfileDirectory; - string currentDirectory = Path.Combine(ProfileDirectory, "folders", "Computer"); - string oldLabelText; - int fileType = 6; - //string attemptedDirectory = ""; - WindowManager wm = new WindowManager(); - - public WinClassicWindowsExplorer() - { - InitializeComponent(); - } - - //'Private Sub TreeView1_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) - //' mainView.Items.Clear() - //' Dim childamount As TreeNodeCollection - //' childamount = TreeView1.SelectedNode.Nodes - //' lblamountofobjects.Text = (childamount.Count & " objects(s)") - //' For Each TreeNode In TreeView1.SelectedNode.Nodes - //' If TreeNode.tag = "file" Then - //' TreeNode.forecolor = TreeView1.BackColor - //' End If - //' mainView.Items.Add(TreeNode.text) - //' Next - //'End Sub - - string ReadDataFile(string reqDirectory, bool returnYesIfProtected = false) { - string Val = ""; - string directoryFileInfo; - directoryFileInfo = File.ReadAllText(Path.Combine(reqDirectory, "_data.info")); - FileSystemFolderInfo toRead = new FileSystemFolderInfo(); - toRead = JsonConvert.DeserializeObject(directoryFileInfo); - - if (returnYesIfProtected == true) - { - if (toRead.Isprotected == true) - { - return "yes"; - } - } - else - { - return toRead.label; - } - return Val; - } - - void RefreshAll() { - try { - // Refresh the right listview - this.mainView.Items.Clear(); - // For Each drive As string In My.Computer.FileSystem.GetDirectories(GameMain.MyDocuments & "\HistacomVB\" & GameMain.SaveProfile & "\HistacomVB\Folders") - // If GetPropetiesForDir(drive)(4) = "isMyDocuments" Then - // diskView.Items.Add("", 0) - // End If - //Next - foreach (string str in Directory.GetDirectories(currentDirectory)) - { - string label = ReadDataFile(str, false); - if (label == "") - { - ListViewItem itm = this.mainView.Items.Add(Path.GetFileName(str)); - itm.ImageKey = str; - } else { - ListViewItem itm = this.mainView.Items.Add(label); - itm.ImageKey = str; - } - } - foreach (string str in Directory.GetFiles(currentDirectory)) - { - // Get the app Icon - - //int AppIcon = 2; - - //switch (new FileInfo(str).Extension) - //{ - // case ".exe": - // string contents; - - // contents = File.ReadAllText(str); - - // switch (contents.ToLower()) - // { - // case "calc": - // AppIcon = 3; - // break; - // case "explorer": - // AppIcon = 4; - // break; - // } - // break; - //} - - - - if (IsFileOpenDialog == true || IsFileSaveDialog == true) - { - if (!(Path.GetFileName(str) == "_data.info")) - { - if (new FileInfo(str).Extension == onlyViewExtension) - { - ListViewItem itm = this.mainView.Items.Add(Path.GetFileName(str)); - itm.Tag = str; - } - } - } else { - if (!(Path.GetFileName(str) == "_data.info")) { - ListViewItem itm = this.mainView.Items.Add(Path.GetFileName(str)); - itm.Tag = str; - } - } - } - } catch (Exception ex) { - wm.StartInfobox95("Exploring - C:", "Error with the file explorer \n" + ex.Message, Properties.Resources.Win95Info); - ((Form)this.TopLevelControl).Close(); - } - } - - void OpenFile(string fileDir) - { - try - { - ReturnType(new FileInfo(fileDir).Extension); - switch (fileType) - { - case 1: - WinClassicNotepad np = new WinClassicNotepad(); - np.mainText.Text = FileDialogBoxManager.ReadTextFile(fileDir); - WinClassic app = wm.StartWin95(np, "Notepad", Properties.Resources.Win95IconNotepad, true, true); - - Program.AddTaskbarItem(app, app.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad); - - break; - case 12: - OpenApplication(FileDialogBoxManager.ReadTextFile(fileDir)); - break; - } - } catch { - } - - } - - void OpenApplication(string appname) - { - switch (appname.ToLower()) - { - case "explorer": - Engine.Template.WinClassic app = wm.StartWin95(new WinClassicWindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); - Program.AddTaskbarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); - break; - case "calc": - Engine.Template.WinClassic appCalc = wm.StartWin95(new WinClassicCalculator(), "Calculator", Properties.Resources.WinClassicCalc, true, true); - Program.AddTaskbarItem(appCalc, appCalc.Tag.ToString(), "Calculator", Properties.Resources.WinClassicCalc); - - Program.nonimportantapps.Add(appCalc); - Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront(); - Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(Program.NonImportantApp_Closing); - - break; - case "wordpad": - Engine.Template.WinClassic appWP = wm.StartWin95(new WinClassicWordPad(), "Wordpad", Properties.Resources.WinClassicWordpad, true, true); - Program.AddTaskbarItem(appWP, appWP.Tag.ToString(), "Wordpad", Properties.Resources.WinClassicWordpad); - - Program.nonimportantapps.Add(appWP); - Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront(); - Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(Program.NonImportantApp_Closing); - - break; - case "addressbook": - WinClassic appAdBk = wm.StartWin95(new WinClassicAddressBook(), "Address Book", Properties.Resources.WinClassicAddressBook, true, true); - Program.AddTaskbarItem(appAdBk, appAdBk.Tag.ToString(), "Address Book", Properties.Resources.WinClassicAddressBook); - - Program.nonimportantapps.Add(appAdBk); - Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront(); - Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(Program.NonImportantApp_Closing); - - break; - } - } - - string ReturnType(string extension) { - string returnVal = ""; - fileType = 1; - switch (extension) { - case ".txt": - fileType = 1; - returnVal = "Text Document \n createtext"; - break; - case ".dat": - fileType = 1; - returnVal = "Text Document \n createtext"; - break; - case ".rtf": - fileType = 2; - returnVal = "Rich Text Document \n createtext"; - break; - case ".cfg": - fileType = 1; - returnVal = "Config file \n createtext"; - break; - case ".log": - fileType = 1; - returnVal = "log text file \n createtext"; - break; - case ".properties": - fileType = 1; - returnVal = "Config file \n createtext"; - break; - case ".json": - fileType = 1; - returnVal = "Config file \n createtext"; - break; - case ".doc": - fileType = 3; - returnVal = "Word Document (Old) \n word"; - break; - case ".docx": - fileType = 3; - returnVal = "Word Document \n word"; - break; - case ".docm": - fileType = 3; - returnVal = "Macro-Enabled Word Document \n word"; - break; - case ".xls": - fileType = 4; - returnVal = "Excel Spreadsheets (Old) \n excel"; - break; - case ".xlsx": - fileType = 4; - returnVal = "Excel Spreadsheets \n excel"; - break; - case ".ppt": - fileType = 5; - returnVal = "Powerpoint Presentation (Old) \n powerpoint"; - break; - case ".pptx": - fileType = 5; - returnVal = "Powerpoint Presentation \n powerpoint"; - break; - case ".pub": - fileType = 7; - returnVal = "Publisher Document \n powerpoint"; - break; - case ".xps": - fileType = 8; - returnVal = "XPS Document \n xpsview"; - break; - case ".htm": - fileType = 9; - returnVal = "HTML web page \n html"; - break; - case ".html": - fileType = 9; - returnVal = "HTML web page \n html"; - break; - case ".wps": - fileType = 10; - returnVal = "Works document \n works"; - break; - case ".wmf": - fileType = 11; - returnVal = "Windows Metafile (A picture) \n createart"; - break; - case ".emf": - fileType = 11; - returnVal = "Enhanced Metafile (A picture) \n createart"; - break; - case ".png": - fileType = 11; - returnVal = "Picture file (Portable Network Graphics) \n createart"; - break; - case ".jpg": - fileType = 11; - returnVal = "Picture file \n createart"; - break; - case ".jpeg": - fileType = 11; - returnVal = "Picture file \n createart"; - break; - case ".gif": - fileType = 12; - returnVal = "Picture file \n gifman"; - break; - case ".tif": - fileType = 11; - returnVal = "Picture file \n createart"; - break; - case ".bmp": - fileType = 11; - returnVal = "Picture file \n createart"; - break; - case ".zip": - fileType = 11; - returnVal = "Compressed ZIP file \n winrar"; - break; - case ".rar": - fileType = 11; - returnVal = "WINRAR Compressed file \n winrar"; - break; - case ".gz": - fileType = 11; - returnVal = "WINRAR file \n winrar"; - break; - case ".7z": - fileType = 11; - returnVal = "7ZIP file \n 7z"; - break; - case ".ace": - fileType = 11; - returnVal = "WINRAR file \n winrar"; - break; - case ".arj": - fileType = 11; - returnVal = "WINRAR file \n winrar"; - break; - case ".bz2": - fileType = 11; - returnVal = "WINRAR file \n winrar"; - break; - case ".gzip": - fileType = 11; - returnVal = "WINRAR file \n winrar"; - break; - case ".lzh": - fileType = 11; - returnVal = "WINRAR file \n winrar"; - break; - case ".tar": - fileType = 11; - returnVal = "WINRAR file \n winrar"; - break; - case ".uue": - fileType = 11; - returnVal = "WINRAR file \n winrar"; - break; - case ".xz": - fileType = 11; - returnVal = "WINRAR file \n winrar"; - break; - case ".z": - fileType = 11; - returnVal = "WINRAR file \n winrar"; - break; - case ".001": - fileType = 11; - returnVal = "WINRAR file \n winrar"; - break; - case ".exe": - fileType = 12; - returnVal = "Program \n exe"; - break; - case ".jar": - fileType = 13; - returnVal = "Java file \n java"; - break; - case ".iso": - fileType = 14; - returnVal = "CD Image file \n iso"; - break; - case ".avi": - fileType = 15; - returnVal = "Video \n video"; - break; - case ".m4v": - fileType = 15; - returnVal = "Video (MPEG-4) \n video"; - break; - case ".mp4": - fileType = 15; - returnVal = "Video (MPEG-4) \n video"; - break; - case ".wmv": - fileType = 15; - returnVal = "Video \n video"; - break; - case ".m2v": - fileType = 15; - returnVal = "Video \n video"; - break; - case ".m3u": - fileType = 15; - returnVal = "Video \n video"; - break; - case ".mts": - fileType = 15; - returnVal = "Video \n video"; - break; - case ".dv": - fileType = 15; - returnVal = "Video (Digital Video) \n video"; - break; - case ".flv": - fileType = 15; - returnVal = "Video \n video"; - break; - case ".m1v": - fileType = 15; - returnVal = "Video \n video"; - break; - case ".m2ts": - fileType = 15; - returnVal = "Video \n video"; - break; - case ".mkv": - fileType = 15; - returnVal = "Video \n video"; - break; - case ".mov": - fileType = 15; - returnVal = "Video \n video"; - break; - case ".mpeg4": - fileType = 15; - returnVal = "Video \n video"; - break; - case ".mpeg": - fileType = 15; - returnVal = "Video \n video"; - break; - case ".mpg": - fileType = 15; - returnVal = "Video \n video"; - break; - case ".3gp": - fileType = 15; - returnVal = "Video \n video"; - break; - case ".m4p": - fileType = 15; - returnVal = "Video \n video"; - break; - case ".mp2": - fileType = 21; - returnVal = "Audio \n video"; - break; - case ".mp3": - fileType = 21; - returnVal = "Audio \n video"; - break; - case ".wav": - fileType = 21; - returnVal = "Audio \n video"; - break; - case ".nls": - fileType = 16; - returnVal = "Font file \n font"; - break; - case ".dll": - fileType = 17; - returnVal = "System File \n sys"; - break; - case ".bat": - fileType = 18; - returnVal = "MS-DOS Batch file \n winterm"; - break; - case ".url": - fileType = 19; - returnVal = "Shortcut \n short"; - break; - case ".sh": - fileType = 20; - returnVal = "BASH file \n winterm"; - break; - case ".win": - fileType = 17; - returnVal = "System file \n sys"; - break; - } - return returnVal; - } - - //Private Sub windows_explorer_Closed(sender As Object, e As EventArgs) Handles Me.Closed - // IsFileDialog = False - //End Sub - void WinClassicWindowsExplorer_Load(object sender, EventArgs e) { - diskView.ImageList = new ImageList(); - - diskView.ImageList.Images.Add(Properties.Resources.Win95DesktopIcon); - diskView.ImageList.Images.Add(Properties.Resources.Win95HardDiskIcon); - diskView.ImageList.Images.Add(Properties.Resources.WinClassicFolderSmall); - diskView.ImageList.Images.Add(Properties.Resources.WinClassicOpenFolderSmall); - diskView.ImageList.Images.Add(Properties.Resources.Win95ControlPanelIcon); - diskView.ImageList.Images.Add(Properties.Resources.Win95PrintersFolder); - diskView.ImageList.Images.Add(Properties.Resources.Win95ComputerIcon); - diskView.ImageList.Images.Add(Properties.Resources.Win95NetworkIcon); - diskView.ImageList.Images.Add(Properties.Resources.Win95RecycleIcon); - - program.BringToFront(); - - int loc = 0; - TreeNode[] folders = new TreeNode[new DirectoryInfo(currentDirectory).GetDirectories().Length]; - foreach (DirectoryInfo folder in new DirectoryInfo(currentDirectory).GetDirectories()) - { - if (folder.GetDirectories().Length > 0) - { - string label = ReadDataFile(folder.FullName, false); - TreeNode[] tn = createSubDirNodes(folder); - folders[loc] = new TreeNode(label ?? folder.Name, 2, 3, tn); - folders[loc].Tag = folder.FullName; - } - else - { - string label = ReadDataFile(folder.FullName, false); - folders[loc] = new TreeNode(label ?? folder.Name, 2, 3); - folders[loc].Tag = folder.FullName; - } - loc++; - } - TreeNode[] mypcarray = new TreeNode[3]; - mypcarray[0] = new TreeNode("(C:)", 1, 1, folders); - mypcarray[1] = new TreeNode("Control Panel", 4, 4); - mypcarray[2] = new TreeNode("Printers", 5, 5); - TreeNode[] desktoparray = new TreeNode[3]; - desktoparray[0] = new TreeNode("My Computer", 6, 6, mypcarray); - desktoparray[1] = new TreeNode("Network Neighborhood", 7, 7); - desktoparray[2] = new TreeNode("Recycle Bin", 8, 8); - diskView.Nodes.Add(new TreeNode("Desktop", 0, 0, desktoparray)); - - - //diskView.Items.Add("My Computer", 0); - Application.DoEvents(); - - RefreshAll(); - - if (FileDialogBoxManager.IsInOpenDialog) - { - IsFileOpenDialog = true; - } - else if (FileDialogBoxManager.IsInSaveDialog) - { - IsFileSaveDialog = true; - } - - if (IsFileOpenDialog == true) - { - pnlSave.Show(); - Button1.Text = "Open"; - } - else - { - if (IsFileSaveDialog == true) - { - pnlSave.Show(); - Button1.Text = "Save"; - } - } - - onlyViewExtension = FileDialogBoxManager.OnlyViewExtension; - } - - void mainView_DoubleClick(object sender, EventArgs e) - { - try - { - if (mainView.FocusedItem.Tag == null) - { // If it isn't a file - GoToDir(Path.Combine(currentDirectory, mainView.FocusedItem.ImageKey.ToString())); - } - else - { // If it is a file - if (IsFileOpenDialog == true || IsFileSaveDialog == true) - { - if (new FileInfo(Path.Combine(currentDirectory, txtSave.Text)).Extension == onlyViewExtension) - { - Program.WindowsExplorerReturnPath = Path.Combine(currentDirectory, txtSave.Text); - } - - - FileDialogBoxManager.IsInOpenDialog = false; - FileDialogBoxManager.IsInSaveDialog = false; - - ((Form)this.TopLevelControl).Close(); - } - else - { - OpenFile((string)mainView.FocusedItem.Tag); - } - } - } catch (Exception ex) { - MessageBox.Show(ex.Message); - } - } - - void diskView_AfterSelect(object sender, EventArgs e) - { - try - { - if (diskView.SelectedNode != null) - { - if (diskView.SelectedNode.Text == "My Computer") - { - GoToDir(ProfileFileSystemDirectory); - } - else if (diskView.SelectedNode.Text == "(C:)") - { - GoToDir(ProfileMyComputerDirectory); - } - else - { - if (diskView.SelectedNode.Tag != null) - { - // It is a directory: - - try - { - GoToDir(diskView.SelectedNode.Tag.ToString()); - } - catch { } - } - } - } - } catch { - } - } - - void GoToDir(string dir) - { - mainView.Show(); - mainView.BringToFront(); - currentDirectory = dir; - RefreshAll(); - } - - private void FolderToolStripMenuItem_Click(object sender, EventArgs e) - { - if (File.Exists(currentDirectory + "\\New Folder")) { - wm.StartInfobox95("Windows Explorer", "This directory already exists", Properties.Resources.Win95Info); - } else { - Directory.CreateDirectory(currentDirectory + "\\New Folder"); - SaveDirectoryInfo(currentDirectory + "\\New Folder", false, "New Folder", true); - - RefreshAll(); - } - } - - private void Button1_Click(object sender, EventArgs e) - { - try - { - bool OpenFile = false; - if (mainView.FocusedItem != null) - { - if ((string)mainView.FocusedItem.Tag == "") - { // If it isn't a file - GoToDir(Path.Combine(currentDirectory, mainView.FocusedItem.Tag.ToString())); - } - else OpenFile = true; // If it is a file - } - else OpenFile = true; - if (OpenFile == true) - { - if (txtSave.Text == "") - { - wm.StartInfobox95("Windows Explorer", "Please enter a filename", Properties.Resources.Win95Info); - } - else - { - if (new FileInfo(Path.Combine(currentDirectory, txtSave.Text)).Extension == onlyViewExtension) - { - - Program.WindowsExplorerReturnPath = Path.Combine(currentDirectory, txtSave.Text); - - } - - - FileDialogBoxManager.IsInOpenDialog = false; - FileDialogBoxManager.IsInSaveDialog = false; - - ((Form)this.TopLevelControl).Close(); - } - } - } catch { - - } - } - - private void DeleteToolStripMenuItem_Click(object sender, EventArgs e) - { - try - { - if (!FileOrDirectoryExists(Path.Combine(currentDirectory, mainView.FocusedItem.Text))) - { - wm.StartInfobox95("Windows Explorer", "This directory doesn't exist", Properties.Resources.Win95Info); - } - else - { - if (Directory.Exists(Path.Combine(currentDirectory, mainView.FocusedItem.Text))) Directory.Delete(Path.Combine(currentDirectory, mainView.FocusedItem.Text), true); - else File.Delete(Path.Combine(currentDirectory, mainView.FocusedItem.Text)); - - RefreshAll(); - } - } catch - { - RefreshAll(); - } - - } - - internal static bool FileOrDirectoryExists(string path) - { - return (Directory.Exists(path) || File.Exists(path)); - } - - private void CloseToolStripMenuItem_Click(object sender, EventArgs e) - { - ((Form)this.TopLevelControl).Close(); - } - private void AboutWindows95ToolStripMenuItem_Click(object sender, EventArgs e) - { - WindowManager wm = new WindowManager(); - wm.StartAboutBox95("Windows 95", "Microsoft Windows 95 Rev B", Properties.Resources.WinClassicAbout95); - } - - private void RenameToolStripMenuItem_Click(object sender, EventArgs e) - { - try - { - // The AfterLabelEdit event will kick in after this - oldLabelText = mainView.FocusedItem.Text; - mainView.LabelEdit = true; - mainView.FocusedItem.BeginEdit(); - } catch - { - - } - } - - private void mainView_AfterLabelEdit(object sender, LabelEditEventArgs e) - { - - string setText; - setText = mainView.FocusedItem.Text; - if (setText == "") - { - wm.StartInfobox95("Windows Explorer", "Please enter a new directory name", Properties.Resources.Win95Info); - } - else - { - if (Directory.Exists(setText)) - { - wm.StartInfobox95("Windows Explorer", "That directory already exists.", Properties.Resources.Win95Info); - } - else - { - Directory.Delete(Path.Combine(currentDirectory, oldLabelText), true); - Directory.CreateDirectory(Path.Combine(currentDirectory, setText)); - } - } - RefreshAll(); - } - - private TreeNode[] createSubDirNodes(DirectoryInfo folder) - { - TreeNode[] toReturn = new TreeNode[folder.GetDirectories().Length]; - int loc = 0; - foreach (DirectoryInfo fold in folder.GetDirectories()) - { - if (fold.GetDirectories().Length > 0) - { - string label = ReadDataFile(fold.FullName, false); - TreeNode[] tn = createSubDirNodes(fold); - toReturn[loc] = new TreeNode(label ?? fold.Name, 2, 3, tn); - toReturn[loc].Tag = fold.FullName; - } - else - { - string label = ReadDataFile(fold.FullName, false); - toReturn[loc] = new TreeNode(label ?? fold.Name, 2, 3); - toReturn[loc].Tag = fold.FullName; - } - loc++; - } - return toReturn; - } - } -} diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.resx b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.resx deleted file mode 100644 index bb70361..0000000 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWindowsExplorer.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - \ No newline at end of file diff --git a/TimeHACK.Main/OS/Win98/Win98.cs b/TimeHACK.Main/OS/Win98/Win98.cs index 5deba5a..54415af 100644 --- a/TimeHACK.Main/OS/Win98/Win98.cs +++ b/TimeHACK.Main/OS/Win98/Win98.cs @@ -363,7 +363,7 @@ namespace TimeHACK.OS.Win98 { FileDialogBoxManager.IsInOpenDialog = false; FileDialogBoxManager.IsInSaveDialog = false; - WinClassicWindowsExplorer we = new WinClassicWindowsExplorer(); + Win95WindowsExplorer we = new Win95WindowsExplorer(); WinClassic app = wm.StartWin95(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); diff --git a/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs b/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs new file mode 100644 index 0000000..aff4742 --- /dev/null +++ b/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs @@ -0,0 +1,611 @@ +namespace TimeHACK.OS.Win95.Win95Apps +{ + partial class WinClassicWindowsExplorer + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.program = new System.Windows.Forms.Panel(); + this.mainView = new System.Windows.Forms.ListView(); + this.diskView = new System.Windows.Forms.TreeView(); + this.MenuStrip1 = new System.Windows.Forms.MenuStrip(); + this.FileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.CreateShortcutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.FolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ShortcutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.TextDocumentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.BitmapImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.DeleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.RenameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.CloseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.EditToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.UndoCtrlZToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.CutCtrlXToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.CopyCtrlCToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.PasteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.PasteShortcutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.SellectAllCtrlAToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.InvertSelectionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ViewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ToolbarToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.StatusBarToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.LargeIconsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.SmallIconsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ListToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.DetailsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ArrangeIconsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ByDriveLetterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ByTypeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.BySizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ByFreeSpaceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.LineUpIconsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.RefreshToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.OptionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ToolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.FindToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.FilesOrFoldersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ComputerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.OnTheInternetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.PeopleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.MapNetworkDriveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.DisconnectNetworkDriveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.GoToToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.HelpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.HelpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.AboutWindows95ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toprightcorner = new System.Windows.Forms.Panel(); + this.bottomrightcorner = new System.Windows.Forms.Panel(); + this.bottomleftcorner = new System.Windows.Forms.Panel(); + this.topleftcorner = new System.Windows.Forms.Panel(); + this.pnlSave = new System.Windows.Forms.Panel(); + this.Button1 = new System.Windows.Forms.Button(); + this.Label1 = new System.Windows.Forms.Label(); + this.txtSave = new System.Windows.Forms.TextBox(); + this.program.SuspendLayout(); + this.MenuStrip1.SuspendLayout(); + this.pnlSave.SuspendLayout(); + this.SuspendLayout(); + // + // program + // + this.program.BackColor = System.Drawing.Color.Silver; + this.program.Controls.Add(this.mainView); + this.program.Controls.Add(this.diskView); + this.program.Controls.Add(this.MenuStrip1); + this.program.Controls.Add(this.toprightcorner); + this.program.Controls.Add(this.bottomrightcorner); + this.program.Controls.Add(this.bottomleftcorner); + this.program.Controls.Add(this.topleftcorner); + this.program.Controls.Add(this.pnlSave); + this.program.Dock = System.Windows.Forms.DockStyle.Fill; + this.program.Location = new System.Drawing.Point(0, 0); + this.program.Name = "program"; + this.program.Size = new System.Drawing.Size(704, 517); + this.program.TabIndex = 13; + // + // mainView + // + this.mainView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.mainView.Location = new System.Drawing.Point(215, 27); + this.mainView.Name = "mainView"; + this.mainView.Size = new System.Drawing.Size(486, 444); + this.mainView.TabIndex = 10; + this.mainView.UseCompatibleStateImageBehavior = false; + this.mainView.View = System.Windows.Forms.View.List; + this.mainView.DoubleClick += new System.EventHandler(this.mainView_DoubleClick); + // + // diskView + // + this.diskView.Location = new System.Drawing.Point(3, 27); + this.diskView.Name = "diskView"; + this.diskView.Size = new System.Drawing.Size(213, 444); + this.diskView.TabIndex = 13; + this.diskView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.diskView_AfterSelect); + // + // MenuStrip1 + // + this.MenuStrip1.BackColor = System.Drawing.Color.Silver; + this.MenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.FileToolStripMenuItem, + this.EditToolStripMenuItem, + this.ViewToolStripMenuItem, + this.ToolsToolStripMenuItem, + this.HelpToolStripMenuItem}); + this.MenuStrip1.Location = new System.Drawing.Point(0, 0); + this.MenuStrip1.Name = "MenuStrip1"; + this.MenuStrip1.Size = new System.Drawing.Size(704, 24); + this.MenuStrip1.TabIndex = 6; + this.MenuStrip1.Text = "MenuStrip1"; + // + // FileToolStripMenuItem + // + this.FileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.CreateShortcutToolStripMenuItem, + this.DeleteToolStripMenuItem, + this.RenameToolStripMenuItem, + this.CloseToolStripMenuItem}); + this.FileToolStripMenuItem.Name = "FileToolStripMenuItem"; + this.FileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); + this.FileToolStripMenuItem.Text = "File"; + // + // CreateShortcutToolStripMenuItem + // + this.CreateShortcutToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.FolderToolStripMenuItem, + this.ShortcutToolStripMenuItem, + this.TextDocumentToolStripMenuItem, + this.BitmapImageToolStripMenuItem}); + this.CreateShortcutToolStripMenuItem.Name = "CreateShortcutToolStripMenuItem"; + this.CreateShortcutToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.CreateShortcutToolStripMenuItem.Text = "New"; + // + // FolderToolStripMenuItem + // + this.FolderToolStripMenuItem.Name = "FolderToolStripMenuItem"; + this.FolderToolStripMenuItem.Size = new System.Drawing.Size(154, 22); + 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"; + this.TextDocumentToolStripMenuItem.Size = new System.Drawing.Size(154, 22); + this.TextDocumentToolStripMenuItem.Text = "Text Document"; + // + // BitmapImageToolStripMenuItem + // + this.BitmapImageToolStripMenuItem.Name = "BitmapImageToolStripMenuItem"; + this.BitmapImageToolStripMenuItem.Size = new System.Drawing.Size(154, 22); + this.BitmapImageToolStripMenuItem.Text = "Bitmap Image"; + // + // DeleteToolStripMenuItem + // + this.DeleteToolStripMenuItem.Name = "DeleteToolStripMenuItem"; + this.DeleteToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.DeleteToolStripMenuItem.Text = "Delete"; + this.DeleteToolStripMenuItem.Click += new System.EventHandler(this.DeleteToolStripMenuItem_Click); + // + // RenameToolStripMenuItem + // + this.RenameToolStripMenuItem.Name = "RenameToolStripMenuItem"; + this.RenameToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.RenameToolStripMenuItem.Text = "Rename"; + this.RenameToolStripMenuItem.Click += new System.EventHandler(this.RenameToolStripMenuItem_Click); + // + // CloseToolStripMenuItem + // + this.CloseToolStripMenuItem.Name = "CloseToolStripMenuItem"; + this.CloseToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.CloseToolStripMenuItem.Text = "Close"; + this.CloseToolStripMenuItem.Click += new System.EventHandler(this.CloseToolStripMenuItem_Click); + // + // EditToolStripMenuItem + // + this.EditToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.UndoCtrlZToolStripMenuItem, + this.CutCtrlXToolStripMenuItem, + this.CopyCtrlCToolStripMenuItem, + this.PasteToolStripMenuItem, + this.PasteShortcutToolStripMenuItem, + this.SellectAllCtrlAToolStripMenuItem, + this.InvertSelectionToolStripMenuItem}); + this.EditToolStripMenuItem.Name = "EditToolStripMenuItem"; + this.EditToolStripMenuItem.Size = new System.Drawing.Size(39, 20); + this.EditToolStripMenuItem.Text = "Edit"; + // + // UndoCtrlZToolStripMenuItem + // + this.UndoCtrlZToolStripMenuItem.Name = "UndoCtrlZToolStripMenuItem"; + this.UndoCtrlZToolStripMenuItem.Size = new System.Drawing.Size(197, 22); + this.UndoCtrlZToolStripMenuItem.Text = "Undo Ctrl+Z"; + // + // CutCtrlXToolStripMenuItem + // + this.CutCtrlXToolStripMenuItem.Name = "CutCtrlXToolStripMenuItem"; + this.CutCtrlXToolStripMenuItem.Size = new System.Drawing.Size(197, 22); + this.CutCtrlXToolStripMenuItem.Text = "Cut Ctrl+X"; + // + // CopyCtrlCToolStripMenuItem + // + this.CopyCtrlCToolStripMenuItem.Name = "CopyCtrlCToolStripMenuItem"; + this.CopyCtrlCToolStripMenuItem.Size = new System.Drawing.Size(197, 22); + this.CopyCtrlCToolStripMenuItem.Text = "Copy Ctrl+C"; + // + // PasteToolStripMenuItem + // + this.PasteToolStripMenuItem.Name = "PasteToolStripMenuItem"; + this.PasteToolStripMenuItem.Size = new System.Drawing.Size(197, 22); + this.PasteToolStripMenuItem.Text = "Paste Ctrl+V"; + // + // PasteShortcutToolStripMenuItem + // + this.PasteShortcutToolStripMenuItem.Name = "PasteShortcutToolStripMenuItem"; + this.PasteShortcutToolStripMenuItem.Size = new System.Drawing.Size(197, 22); + this.PasteShortcutToolStripMenuItem.Text = "Paste Shortcut"; + // + // SellectAllCtrlAToolStripMenuItem + // + this.SellectAllCtrlAToolStripMenuItem.Name = "SellectAllCtrlAToolStripMenuItem"; + this.SellectAllCtrlAToolStripMenuItem.Size = new System.Drawing.Size(197, 22); + this.SellectAllCtrlAToolStripMenuItem.Text = "Sellect All Ctrl+A"; + // + // InvertSelectionToolStripMenuItem + // + this.InvertSelectionToolStripMenuItem.Name = "InvertSelectionToolStripMenuItem"; + this.InvertSelectionToolStripMenuItem.Size = new System.Drawing.Size(197, 22); + this.InvertSelectionToolStripMenuItem.Text = "Invert Selection"; + // + // ViewToolStripMenuItem + // + this.ViewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.ToolbarToolStripMenuItem, + this.StatusBarToolStripMenuItem, + this.LargeIconsToolStripMenuItem, + this.SmallIconsToolStripMenuItem, + this.ListToolStripMenuItem, + this.DetailsToolStripMenuItem, + this.ArrangeIconsToolStripMenuItem, + this.LineUpIconsToolStripMenuItem, + this.RefreshToolStripMenuItem, + this.OptionsToolStripMenuItem}); + this.ViewToolStripMenuItem.Name = "ViewToolStripMenuItem"; + this.ViewToolStripMenuItem.Size = new System.Drawing.Size(44, 20); + this.ViewToolStripMenuItem.Text = "View"; + // + // ToolbarToolStripMenuItem + // + this.ToolbarToolStripMenuItem.Name = "ToolbarToolStripMenuItem"; + this.ToolbarToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.ToolbarToolStripMenuItem.Text = "Toolbar"; + // + // StatusBarToolStripMenuItem + // + this.StatusBarToolStripMenuItem.Name = "StatusBarToolStripMenuItem"; + this.StatusBarToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.StatusBarToolStripMenuItem.Text = "Status Bar"; + // + // LargeIconsToolStripMenuItem + // + this.LargeIconsToolStripMenuItem.Name = "LargeIconsToolStripMenuItem"; + this.LargeIconsToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.LargeIconsToolStripMenuItem.Text = "Large Icons"; + // + // SmallIconsToolStripMenuItem + // + this.SmallIconsToolStripMenuItem.Name = "SmallIconsToolStripMenuItem"; + this.SmallIconsToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.SmallIconsToolStripMenuItem.Text = "Small Icons"; + // + // ListToolStripMenuItem + // + this.ListToolStripMenuItem.Name = "ListToolStripMenuItem"; + this.ListToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.ListToolStripMenuItem.Text = "List"; + // + // DetailsToolStripMenuItem + // + this.DetailsToolStripMenuItem.Name = "DetailsToolStripMenuItem"; + this.DetailsToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.DetailsToolStripMenuItem.Text = "Details"; + // + // ArrangeIconsToolStripMenuItem + // + this.ArrangeIconsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.ByDriveLetterToolStripMenuItem, + this.ByTypeToolStripMenuItem, + this.BySizeToolStripMenuItem, + this.ByFreeSpaceToolStripMenuItem}); + this.ArrangeIconsToolStripMenuItem.Name = "ArrangeIconsToolStripMenuItem"; + this.ArrangeIconsToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.ArrangeIconsToolStripMenuItem.Text = "Arrange Icons"; + // + // ByDriveLetterToolStripMenuItem + // + this.ByDriveLetterToolStripMenuItem.Name = "ByDriveLetterToolStripMenuItem"; + this.ByDriveLetterToolStripMenuItem.Size = new System.Drawing.Size(150, 22); + this.ByDriveLetterToolStripMenuItem.Text = "by Drive Letter"; + // + // ByTypeToolStripMenuItem + // + this.ByTypeToolStripMenuItem.Name = "ByTypeToolStripMenuItem"; + this.ByTypeToolStripMenuItem.Size = new System.Drawing.Size(150, 22); + this.ByTypeToolStripMenuItem.Text = "by Type"; + // + // BySizeToolStripMenuItem + // + this.BySizeToolStripMenuItem.Name = "BySizeToolStripMenuItem"; + this.BySizeToolStripMenuItem.Size = new System.Drawing.Size(150, 22); + this.BySizeToolStripMenuItem.Text = "by Size"; + // + // ByFreeSpaceToolStripMenuItem + // + this.ByFreeSpaceToolStripMenuItem.Name = "ByFreeSpaceToolStripMenuItem"; + this.ByFreeSpaceToolStripMenuItem.Size = new System.Drawing.Size(150, 22); + this.ByFreeSpaceToolStripMenuItem.Text = "by Free Space"; + // + // LineUpIconsToolStripMenuItem + // + this.LineUpIconsToolStripMenuItem.Name = "LineUpIconsToolStripMenuItem"; + this.LineUpIconsToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.LineUpIconsToolStripMenuItem.Text = "Line up Icons"; + // + // RefreshToolStripMenuItem + // + this.RefreshToolStripMenuItem.Name = "RefreshToolStripMenuItem"; + this.RefreshToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.RefreshToolStripMenuItem.Text = "Refresh"; + // + // OptionsToolStripMenuItem + // + this.OptionsToolStripMenuItem.Name = "OptionsToolStripMenuItem"; + this.OptionsToolStripMenuItem.Size = new System.Drawing.Size(147, 22); + this.OptionsToolStripMenuItem.Text = "Options..."; + // + // ToolsToolStripMenuItem + // + this.ToolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.FindToolStripMenuItem, + this.MapNetworkDriveToolStripMenuItem, + this.DisconnectNetworkDriveToolStripMenuItem, + this.GoToToolStripMenuItem}); + this.ToolsToolStripMenuItem.Name = "ToolsToolStripMenuItem"; + this.ToolsToolStripMenuItem.Size = new System.Drawing.Size(47, 20); + this.ToolsToolStripMenuItem.Text = "Tools"; + // + // FindToolStripMenuItem + // + this.FindToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.FilesOrFoldersToolStripMenuItem, + this.ComputerToolStripMenuItem, + this.OnTheInternetToolStripMenuItem, + this.PeopleToolStripMenuItem}); + this.FindToolStripMenuItem.Name = "FindToolStripMenuItem"; + this.FindToolStripMenuItem.Size = new System.Drawing.Size(220, 22); + this.FindToolStripMenuItem.Text = "Find"; + // + // FilesOrFoldersToolStripMenuItem + // + this.FilesOrFoldersToolStripMenuItem.Name = "FilesOrFoldersToolStripMenuItem"; + this.FilesOrFoldersToolStripMenuItem.Size = new System.Drawing.Size(161, 22); + this.FilesOrFoldersToolStripMenuItem.Text = "Files or Folders..."; + // + // ComputerToolStripMenuItem + // + this.ComputerToolStripMenuItem.Name = "ComputerToolStripMenuItem"; + this.ComputerToolStripMenuItem.Size = new System.Drawing.Size(161, 22); + this.ComputerToolStripMenuItem.Text = "Computer..."; + // + // OnTheInternetToolStripMenuItem + // + this.OnTheInternetToolStripMenuItem.Name = "OnTheInternetToolStripMenuItem"; + this.OnTheInternetToolStripMenuItem.Size = new System.Drawing.Size(161, 22); + this.OnTheInternetToolStripMenuItem.Text = "On the Internet"; + // + // PeopleToolStripMenuItem + // + this.PeopleToolStripMenuItem.Name = "PeopleToolStripMenuItem"; + this.PeopleToolStripMenuItem.Size = new System.Drawing.Size(161, 22); + this.PeopleToolStripMenuItem.Text = "People..."; + // + // MapNetworkDriveToolStripMenuItem + // + this.MapNetworkDriveToolStripMenuItem.Name = "MapNetworkDriveToolStripMenuItem"; + this.MapNetworkDriveToolStripMenuItem.Size = new System.Drawing.Size(220, 22); + this.MapNetworkDriveToolStripMenuItem.Text = "Map Network Drive..."; + // + // DisconnectNetworkDriveToolStripMenuItem + // + this.DisconnectNetworkDriveToolStripMenuItem.Name = "DisconnectNetworkDriveToolStripMenuItem"; + this.DisconnectNetworkDriveToolStripMenuItem.Size = new System.Drawing.Size(220, 22); + this.DisconnectNetworkDriveToolStripMenuItem.Text = "Disconnect Network Drive..."; + // + // GoToToolStripMenuItem + // + this.GoToToolStripMenuItem.Name = "GoToToolStripMenuItem"; + this.GoToToolStripMenuItem.Size = new System.Drawing.Size(220, 22); + this.GoToToolStripMenuItem.Text = "Go to..."; + // + // HelpToolStripMenuItem + // + this.HelpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.HelpToolStripMenuItem1, + this.AboutWindows95ToolStripMenuItem}); + this.HelpToolStripMenuItem.Name = "HelpToolStripMenuItem"; + this.HelpToolStripMenuItem.Size = new System.Drawing.Size(44, 20); + this.HelpToolStripMenuItem.Text = "Help"; + // + // HelpToolStripMenuItem1 + // + this.HelpToolStripMenuItem1.Name = "HelpToolStripMenuItem1"; + this.HelpToolStripMenuItem1.Size = new System.Drawing.Size(174, 22); + this.HelpToolStripMenuItem1.Text = "Help Topics"; + // + // AboutWindows95ToolStripMenuItem + // + this.AboutWindows95ToolStripMenuItem.Name = "AboutWindows95ToolStripMenuItem"; + this.AboutWindows95ToolStripMenuItem.Size = new System.Drawing.Size(174, 22); + this.AboutWindows95ToolStripMenuItem.Text = "About Windows 95"; + this.AboutWindows95ToolStripMenuItem.Click += new System.EventHandler(this.AboutWindows95ToolStripMenuItem_Click); + // + // toprightcorner + // + this.toprightcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.toprightcorner.Location = new System.Drawing.Point(700, 0); + this.toprightcorner.Name = "toprightcorner"; + this.toprightcorner.Size = new System.Drawing.Size(4, 4); + this.toprightcorner.TabIndex = 6; + // + // bottomrightcorner + // + this.bottomrightcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.bottomrightcorner.Cursor = System.Windows.Forms.Cursors.SizeNWSE; + this.bottomrightcorner.Location = new System.Drawing.Point(700, 513); + this.bottomrightcorner.Name = "bottomrightcorner"; + this.bottomrightcorner.Size = new System.Drawing.Size(4, 4); + this.bottomrightcorner.TabIndex = 4; + // + // bottomleftcorner + // + this.bottomleftcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.bottomleftcorner.Location = new System.Drawing.Point(0, 513); + this.bottomleftcorner.Name = "bottomleftcorner"; + this.bottomleftcorner.Size = new System.Drawing.Size(4, 4); + this.bottomleftcorner.TabIndex = 2; + // + // topleftcorner + // + this.topleftcorner.Location = new System.Drawing.Point(0, 0); + this.topleftcorner.Name = "topleftcorner"; + this.topleftcorner.Size = new System.Drawing.Size(4, 4); + this.topleftcorner.TabIndex = 1; + // + // pnlSave + // + this.pnlSave.Controls.Add(this.Button1); + this.pnlSave.Controls.Add(this.Label1); + this.pnlSave.Controls.Add(this.txtSave); + this.pnlSave.Location = new System.Drawing.Point(3, 474); + this.pnlSave.Name = "pnlSave"; + this.pnlSave.Size = new System.Drawing.Size(850, 35); + this.pnlSave.TabIndex = 18; + this.pnlSave.Visible = false; + // + // Button1 + // + this.Button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.Button1.Location = new System.Drawing.Point(608, 1); + this.Button1.Name = "Button1"; + this.Button1.Size = new System.Drawing.Size(75, 23); + this.Button1.TabIndex = 17; + this.Button1.Text = "Save"; + this.Button1.UseVisualStyleBackColor = true; + this.Button1.Click += new System.EventHandler(this.Button1_Click); + // + // Label1 + // + this.Label1.AutoSize = true; + this.Label1.Location = new System.Drawing.Point(3, 6); + this.Label1.Name = "Label1"; + this.Label1.Size = new System.Drawing.Size(57, 13); + this.Label1.TabIndex = 16; + this.Label1.Text = "File Name:"; + // + // txtSave + // + this.txtSave.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtSave.Location = new System.Drawing.Point(60, 3); + this.txtSave.Name = "txtSave"; + this.txtSave.Size = new System.Drawing.Size(542, 20); + this.txtSave.TabIndex = 15; + // + // WinClassicWindowsExplorer + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.program); + this.Name = "WinClassicWindowsExplorer"; + this.Size = new System.Drawing.Size(704, 517); + this.Load += new System.EventHandler(this.WinClassicWindowsExplorer_Load); + this.program.ResumeLayout(false); + this.program.PerformLayout(); + this.MenuStrip1.ResumeLayout(false); + this.MenuStrip1.PerformLayout(); + this.pnlSave.ResumeLayout(false); + this.pnlSave.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + internal System.Windows.Forms.Panel program; + internal System.Windows.Forms.TreeView diskView; + internal System.Windows.Forms.MenuStrip MenuStrip1; + internal System.Windows.Forms.ToolStripMenuItem FileToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem CreateShortcutToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem FolderToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ShortcutToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem TextDocumentToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem BitmapImageToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem DeleteToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem RenameToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem CloseToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem EditToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem UndoCtrlZToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem CutCtrlXToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem CopyCtrlCToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem PasteToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem PasteShortcutToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem SellectAllCtrlAToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem InvertSelectionToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ViewToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ToolbarToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem StatusBarToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem LargeIconsToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem SmallIconsToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ListToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem DetailsToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ArrangeIconsToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ByDriveLetterToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ByTypeToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem BySizeToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ByFreeSpaceToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem LineUpIconsToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem RefreshToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem OptionsToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ToolsToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem FindToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem FilesOrFoldersToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ComputerToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem OnTheInternetToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem PeopleToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem MapNetworkDriveToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem DisconnectNetworkDriveToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem GoToToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem HelpToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem HelpToolStripMenuItem1; + internal System.Windows.Forms.ToolStripMenuItem AboutWindows95ToolStripMenuItem; + internal System.Windows.Forms.Panel toprightcorner; + internal System.Windows.Forms.Panel bottomrightcorner; + internal System.Windows.Forms.Panel bottomleftcorner; + internal System.Windows.Forms.Panel topleftcorner; + internal System.Windows.Forms.ListView mainView; + internal System.Windows.Forms.Panel pnlSave; + internal System.Windows.Forms.Button Button1; + internal System.Windows.Forms.Label Label1; + internal System.Windows.Forms.TextBox txtSave; + } +} diff --git a/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs b/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs new file mode 100644 index 0000000..0f030a4 --- /dev/null +++ b/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs @@ -0,0 +1,799 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using static TimeHACK.Engine.SaveSystem; +using System.IO; +using TimeHACK.Engine; +using Newtonsoft.Json; +using TimeHACK.Engine.Template; + +namespace TimeHACK.OS.Win95.Win95Apps +{ + public partial class WinClassicWindowsExplorer : UserControl + { + public bool IsFileOpenDialog = false; + public bool IsFileSaveDialog = false; + public string onlyViewExtension = ""; + + string ToReplaceWith = ProfileDirectory; + string currentDirectory = Path.Combine(ProfileDirectory, "folders", "Computer"); + string oldLabelText; + int fileType = 6; + //string attemptedDirectory = ""; + WindowManager wm = new WindowManager(); + + public WinClassicWindowsExplorer() + { + InitializeComponent(); + } + + //'Private Sub TreeView1_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) + //' mainView.Items.Clear() + //' Dim childamount As TreeNodeCollection + //' childamount = TreeView1.SelectedNode.Nodes + //' lblamountofobjects.Text = (childamount.Count & " objects(s)") + //' For Each TreeNode In TreeView1.SelectedNode.Nodes + //' If TreeNode.tag = "file" Then + //' TreeNode.forecolor = TreeView1.BackColor + //' End If + //' mainView.Items.Add(TreeNode.text) + //' Next + //'End Sub + + string ReadDataFile(string reqDirectory, bool returnYesIfProtected = false) { + string Val = ""; + string directoryFileInfo; + directoryFileInfo = File.ReadAllText(Path.Combine(reqDirectory, "_data.info")); + FileSystemFolderInfo toRead = new FileSystemFolderInfo(); + toRead = JsonConvert.DeserializeObject(directoryFileInfo); + + if (returnYesIfProtected == true) + { + if (toRead.Isprotected == true) + { + return "yes"; + } + } + else + { + return toRead.label; + } + return Val; + } + + void RefreshAll() { + try { + // Refresh the right listview + this.mainView.Items.Clear(); + // For Each drive As string In My.Computer.FileSystem.GetDirectories(GameMain.MyDocuments & "\HistacomVB\" & GameMain.SaveProfile & "\HistacomVB\Folders") + // If GetPropetiesForDir(drive)(4) = "isMyDocuments" Then + // diskView.Items.Add("", 0) + // End If + //Next + foreach (string str in Directory.GetDirectories(currentDirectory)) + { + string label = ReadDataFile(str, false); + if (label == "") + { + ListViewItem itm = this.mainView.Items.Add(Path.GetFileName(str)); + itm.ImageKey = str; + } else { + ListViewItem itm = this.mainView.Items.Add(label); + itm.ImageKey = str; + } + } + foreach (string str in Directory.GetFiles(currentDirectory)) + { + // Get the app Icon + + //int AppIcon = 2; + + //switch (new FileInfo(str).Extension) + //{ + // case ".exe": + // string contents; + + // contents = File.ReadAllText(str); + + // switch (contents.ToLower()) + // { + // case "calc": + // AppIcon = 3; + // break; + // case "explorer": + // AppIcon = 4; + // break; + // } + // break; + //} + + + + if (IsFileOpenDialog == true || IsFileSaveDialog == true) + { + if (!(Path.GetFileName(str) == "_data.info")) + { + if (new FileInfo(str).Extension == onlyViewExtension) + { + ListViewItem itm = this.mainView.Items.Add(Path.GetFileName(str)); + itm.Tag = str; + } + } + } else { + if (!(Path.GetFileName(str) == "_data.info")) { + ListViewItem itm = this.mainView.Items.Add(Path.GetFileName(str)); + itm.Tag = str; + } + } + } + } catch (Exception ex) { + wm.StartInfobox95("Exploring - C:", "Error with the file explorer \n" + ex.Message, Properties.Resources.Win95Info); + ((Form)this.TopLevelControl).Close(); + } + } + + void OpenFile(string fileDir) + { + try + { + ReturnType(new FileInfo(fileDir).Extension); + switch (fileType) + { + case 1: + WinClassicNotepad np = new WinClassicNotepad(); + np.mainText.Text = FileDialogBoxManager.ReadTextFile(fileDir); + WinClassic app = wm.StartWin95(np, "Notepad", Properties.Resources.Win95IconNotepad, true, true); + + Program.AddTaskbarItem(app, app.Tag.ToString(), "Notepad", Properties.Resources.Win95IconNotepad); + + break; + case 12: + OpenApplication(FileDialogBoxManager.ReadTextFile(fileDir)); + break; + } + } catch { + } + + } + + void OpenApplication(string appname) + { + switch (appname.ToLower()) + { + case "explorer": + Engine.Template.WinClassic app = wm.StartWin95(new Win95WindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); + Program.AddTaskbarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); + break; + case "calc": + Engine.Template.WinClassic appCalc = wm.StartWin95(new WinClassicCalculator(), "Calculator", Properties.Resources.WinClassicCalc, true, true); + Program.AddTaskbarItem(appCalc, appCalc.Tag.ToString(), "Calculator", Properties.Resources.WinClassicCalc); + + Program.nonimportantapps.Add(appCalc); + Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront(); + Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(Program.NonImportantApp_Closing); + + break; + case "wordpad": + Engine.Template.WinClassic appWP = wm.StartWin95(new WinClassicWordPad(), "Wordpad", Properties.Resources.WinClassicWordpad, true, true); + Program.AddTaskbarItem(appWP, appWP.Tag.ToString(), "Wordpad", Properties.Resources.WinClassicWordpad); + + Program.nonimportantapps.Add(appWP); + Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront(); + Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(Program.NonImportantApp_Closing); + + break; + case "addressbook": + WinClassic appAdBk = wm.StartWin95(new WinClassicAddressBook(), "Address Book", Properties.Resources.WinClassicAddressBook, true, true); + Program.AddTaskbarItem(appAdBk, appAdBk.Tag.ToString(), "Address Book", Properties.Resources.WinClassicAddressBook); + + Program.nonimportantapps.Add(appAdBk); + Program.nonimportantapps[Program.nonimportantapps.Count - 1].BringToFront(); + Program.nonimportantapps[Program.nonimportantapps.Count - 1].FormClosing += new FormClosingEventHandler(Program.NonImportantApp_Closing); + + break; + } + } + + string ReturnType(string extension) { + string returnVal = ""; + fileType = 1; + switch (extension) { + case ".txt": + fileType = 1; + returnVal = "Text Document \n createtext"; + break; + case ".dat": + fileType = 1; + returnVal = "Text Document \n createtext"; + break; + case ".rtf": + fileType = 2; + returnVal = "Rich Text Document \n createtext"; + break; + case ".cfg": + fileType = 1; + returnVal = "Config file \n createtext"; + break; + case ".log": + fileType = 1; + returnVal = "log text file \n createtext"; + break; + case ".properties": + fileType = 1; + returnVal = "Config file \n createtext"; + break; + case ".json": + fileType = 1; + returnVal = "Config file \n createtext"; + break; + case ".doc": + fileType = 3; + returnVal = "Word Document (Old) \n word"; + break; + case ".docx": + fileType = 3; + returnVal = "Word Document \n word"; + break; + case ".docm": + fileType = 3; + returnVal = "Macro-Enabled Word Document \n word"; + break; + case ".xls": + fileType = 4; + returnVal = "Excel Spreadsheets (Old) \n excel"; + break; + case ".xlsx": + fileType = 4; + returnVal = "Excel Spreadsheets \n excel"; + break; + case ".ppt": + fileType = 5; + returnVal = "Powerpoint Presentation (Old) \n powerpoint"; + break; + case ".pptx": + fileType = 5; + returnVal = "Powerpoint Presentation \n powerpoint"; + break; + case ".pub": + fileType = 7; + returnVal = "Publisher Document \n powerpoint"; + break; + case ".xps": + fileType = 8; + returnVal = "XPS Document \n xpsview"; + break; + case ".htm": + fileType = 9; + returnVal = "HTML web page \n html"; + break; + case ".html": + fileType = 9; + returnVal = "HTML web page \n html"; + break; + case ".wps": + fileType = 10; + returnVal = "Works document \n works"; + break; + case ".wmf": + fileType = 11; + returnVal = "Windows Metafile (A picture) \n createart"; + break; + case ".emf": + fileType = 11; + returnVal = "Enhanced Metafile (A picture) \n createart"; + break; + case ".png": + fileType = 11; + returnVal = "Picture file (Portable Network Graphics) \n createart"; + break; + case ".jpg": + fileType = 11; + returnVal = "Picture file \n createart"; + break; + case ".jpeg": + fileType = 11; + returnVal = "Picture file \n createart"; + break; + case ".gif": + fileType = 12; + returnVal = "Picture file \n gifman"; + break; + case ".tif": + fileType = 11; + returnVal = "Picture file \n createart"; + break; + case ".bmp": + fileType = 11; + returnVal = "Picture file \n createart"; + break; + case ".zip": + fileType = 11; + returnVal = "Compressed ZIP file \n winrar"; + break; + case ".rar": + fileType = 11; + returnVal = "WINRAR Compressed file \n winrar"; + break; + case ".gz": + fileType = 11; + returnVal = "WINRAR file \n winrar"; + break; + case ".7z": + fileType = 11; + returnVal = "7ZIP file \n 7z"; + break; + case ".ace": + fileType = 11; + returnVal = "WINRAR file \n winrar"; + break; + case ".arj": + fileType = 11; + returnVal = "WINRAR file \n winrar"; + break; + case ".bz2": + fileType = 11; + returnVal = "WINRAR file \n winrar"; + break; + case ".gzip": + fileType = 11; + returnVal = "WINRAR file \n winrar"; + break; + case ".lzh": + fileType = 11; + returnVal = "WINRAR file \n winrar"; + break; + case ".tar": + fileType = 11; + returnVal = "WINRAR file \n winrar"; + break; + case ".uue": + fileType = 11; + returnVal = "WINRAR file \n winrar"; + break; + case ".xz": + fileType = 11; + returnVal = "WINRAR file \n winrar"; + break; + case ".z": + fileType = 11; + returnVal = "WINRAR file \n winrar"; + break; + case ".001": + fileType = 11; + returnVal = "WINRAR file \n winrar"; + break; + case ".exe": + fileType = 12; + returnVal = "Program \n exe"; + break; + case ".jar": + fileType = 13; + returnVal = "Java file \n java"; + break; + case ".iso": + fileType = 14; + returnVal = "CD Image file \n iso"; + break; + case ".avi": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".m4v": + fileType = 15; + returnVal = "Video (MPEG-4) \n video"; + break; + case ".mp4": + fileType = 15; + returnVal = "Video (MPEG-4) \n video"; + break; + case ".wmv": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".m2v": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".m3u": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".mts": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".dv": + fileType = 15; + returnVal = "Video (Digital Video) \n video"; + break; + case ".flv": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".m1v": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".m2ts": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".mkv": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".mov": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".mpeg4": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".mpeg": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".mpg": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".3gp": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".m4p": + fileType = 15; + returnVal = "Video \n video"; + break; + case ".mp2": + fileType = 21; + returnVal = "Audio \n video"; + break; + case ".mp3": + fileType = 21; + returnVal = "Audio \n video"; + break; + case ".wav": + fileType = 21; + returnVal = "Audio \n video"; + break; + case ".nls": + fileType = 16; + returnVal = "Font file \n font"; + break; + case ".dll": + fileType = 17; + returnVal = "System File \n sys"; + break; + case ".bat": + fileType = 18; + returnVal = "MS-DOS Batch file \n winterm"; + break; + case ".url": + fileType = 19; + returnVal = "Shortcut \n short"; + break; + case ".sh": + fileType = 20; + returnVal = "BASH file \n winterm"; + break; + case ".win": + fileType = 17; + returnVal = "System file \n sys"; + break; + } + return returnVal; + } + + //Private Sub windows_explorer_Closed(sender As Object, e As EventArgs) Handles Me.Closed + // IsFileDialog = False + //End Sub + void WinClassicWindowsExplorer_Load(object sender, EventArgs e) { + diskView.ImageList = new ImageList(); + + diskView.ImageList.Images.Add(Properties.Resources.Win95DesktopIcon); + diskView.ImageList.Images.Add(Properties.Resources.Win95HardDiskIcon); + diskView.ImageList.Images.Add(Properties.Resources.WinClassicFolderSmall); + diskView.ImageList.Images.Add(Properties.Resources.WinClassicOpenFolderSmall); + diskView.ImageList.Images.Add(Properties.Resources.Win95ControlPanelIcon); + diskView.ImageList.Images.Add(Properties.Resources.Win95PrintersFolder); + diskView.ImageList.Images.Add(Properties.Resources.Win95ComputerIcon); + diskView.ImageList.Images.Add(Properties.Resources.Win95NetworkIcon); + diskView.ImageList.Images.Add(Properties.Resources.Win95RecycleIcon); + + program.BringToFront(); + + int loc = 0; + TreeNode[] folders = new TreeNode[new DirectoryInfo(currentDirectory).GetDirectories().Length]; + foreach (DirectoryInfo folder in new DirectoryInfo(currentDirectory).GetDirectories()) + { + if (folder.GetDirectories().Length > 0) + { + string label = ReadDataFile(folder.FullName, false); + TreeNode[] tn = createSubDirNodes(folder); + folders[loc] = new TreeNode(label ?? folder.Name, 2, 3, tn); + folders[loc].Tag = folder.FullName; + } + else + { + string label = ReadDataFile(folder.FullName, false); + folders[loc] = new TreeNode(label ?? folder.Name, 2, 3); + folders[loc].Tag = folder.FullName; + } + loc++; + } + TreeNode[] mypcarray = new TreeNode[3]; + mypcarray[0] = new TreeNode("(C:)", 1, 1, folders); + mypcarray[1] = new TreeNode("Control Panel", 4, 4); + mypcarray[2] = new TreeNode("Printers", 5, 5); + TreeNode[] desktoparray = new TreeNode[3]; + desktoparray[0] = new TreeNode("My Computer", 6, 6, mypcarray); + desktoparray[1] = new TreeNode("Network Neighborhood", 7, 7); + desktoparray[2] = new TreeNode("Recycle Bin", 8, 8); + diskView.Nodes.Add(new TreeNode("Desktop", 0, 0, desktoparray)); + + + //diskView.Items.Add("My Computer", 0); + Application.DoEvents(); + + RefreshAll(); + + if (FileDialogBoxManager.IsInOpenDialog) + { + IsFileOpenDialog = true; + } + else if (FileDialogBoxManager.IsInSaveDialog) + { + IsFileSaveDialog = true; + } + + if (IsFileOpenDialog == true) + { + pnlSave.Show(); + Button1.Text = "Open"; + } + else + { + if (IsFileSaveDialog == true) + { + pnlSave.Show(); + Button1.Text = "Save"; + } + } + + onlyViewExtension = FileDialogBoxManager.OnlyViewExtension; + } + + void mainView_DoubleClick(object sender, EventArgs e) + { + try + { + if (mainView.FocusedItem.Tag == null) + { // If it isn't a file + GoToDir(Path.Combine(currentDirectory, mainView.FocusedItem.ImageKey.ToString())); + } + else + { // If it is a file + if (IsFileOpenDialog == true || IsFileSaveDialog == true) + { + if (new FileInfo(Path.Combine(currentDirectory, txtSave.Text)).Extension == onlyViewExtension) + { + Program.WindowsExplorerReturnPath = Path.Combine(currentDirectory, txtSave.Text); + } + + + FileDialogBoxManager.IsInOpenDialog = false; + FileDialogBoxManager.IsInSaveDialog = false; + + ((Form)this.TopLevelControl).Close(); + } + else + { + OpenFile((string)mainView.FocusedItem.Tag); + } + } + } catch (Exception ex) { + MessageBox.Show(ex.Message); + } + } + + void diskView_AfterSelect(object sender, EventArgs e) + { + try + { + if (diskView.SelectedNode != null) + { + if (diskView.SelectedNode.Text == "My Computer") + { + GoToDir(ProfileFileSystemDirectory); + } + else if (diskView.SelectedNode.Text == "(C:)") + { + GoToDir(ProfileMyComputerDirectory); + } + else + { + if (diskView.SelectedNode.Tag != null) + { + // It is a directory: + + try + { + GoToDir(diskView.SelectedNode.Tag.ToString()); + } + catch { } + } + } + } + } catch { + } + } + + void GoToDir(string dir) + { + mainView.Show(); + mainView.BringToFront(); + currentDirectory = dir; + RefreshAll(); + } + + private void FolderToolStripMenuItem_Click(object sender, EventArgs e) + { + if (File.Exists(currentDirectory + "\\New Folder")) { + wm.StartInfobox95("Windows Explorer", "This directory already exists", Properties.Resources.Win95Info); + } else { + Directory.CreateDirectory(currentDirectory + "\\New Folder"); + SaveDirectoryInfo(currentDirectory + "\\New Folder", false, "New Folder", true); + + RefreshAll(); + } + } + + private void Button1_Click(object sender, EventArgs e) + { + try + { + bool OpenFile = false; + if (mainView.FocusedItem != null) + { + if ((string)mainView.FocusedItem.Tag == "") + { // If it isn't a file + GoToDir(Path.Combine(currentDirectory, mainView.FocusedItem.Tag.ToString())); + } + else OpenFile = true; // If it is a file + } + else OpenFile = true; + if (OpenFile == true) + { + if (txtSave.Text == "") + { + wm.StartInfobox95("Windows Explorer", "Please enter a filename", Properties.Resources.Win95Info); + } + else + { + if (new FileInfo(Path.Combine(currentDirectory, txtSave.Text)).Extension == onlyViewExtension) + { + + Program.WindowsExplorerReturnPath = Path.Combine(currentDirectory, txtSave.Text); + + } + + + FileDialogBoxManager.IsInOpenDialog = false; + FileDialogBoxManager.IsInSaveDialog = false; + + ((Form)this.TopLevelControl).Close(); + } + } + } catch { + + } + } + + private void DeleteToolStripMenuItem_Click(object sender, EventArgs e) + { + try + { + if (!FileOrDirectoryExists(Path.Combine(currentDirectory, mainView.FocusedItem.Text))) + { + wm.StartInfobox95("Windows Explorer", "This directory doesn't exist", Properties.Resources.Win95Info); + } + else + { + if (Directory.Exists(Path.Combine(currentDirectory, mainView.FocusedItem.Text))) Directory.Delete(Path.Combine(currentDirectory, mainView.FocusedItem.Text), true); + else File.Delete(Path.Combine(currentDirectory, mainView.FocusedItem.Text)); + + RefreshAll(); + } + } catch + { + RefreshAll(); + } + + } + + internal static bool FileOrDirectoryExists(string path) + { + return (Directory.Exists(path) || File.Exists(path)); + } + + private void CloseToolStripMenuItem_Click(object sender, EventArgs e) + { + ((Form)this.TopLevelControl).Close(); + } + private void AboutWindows95ToolStripMenuItem_Click(object sender, EventArgs e) + { + WindowManager wm = new WindowManager(); + wm.StartAboutBox95("Windows 95", "Microsoft Windows 95 Rev B", Properties.Resources.WinClassicAbout95); + } + + private void RenameToolStripMenuItem_Click(object sender, EventArgs e) + { + try + { + // The AfterLabelEdit event will kick in after this + oldLabelText = mainView.FocusedItem.Text; + mainView.LabelEdit = true; + mainView.FocusedItem.BeginEdit(); + } catch + { + + } + } + + private void mainView_AfterLabelEdit(object sender, LabelEditEventArgs e) + { + + string setText; + setText = mainView.FocusedItem.Text; + if (setText == "") + { + wm.StartInfobox95("Windows Explorer", "Please enter a new directory name", Properties.Resources.Win95Info); + } + else + { + if (Directory.Exists(setText)) + { + wm.StartInfobox95("Windows Explorer", "That directory already exists.", Properties.Resources.Win95Info); + } + else + { + Directory.Delete(Path.Combine(currentDirectory, oldLabelText), true); + Directory.CreateDirectory(Path.Combine(currentDirectory, setText)); + } + } + RefreshAll(); + } + + private TreeNode[] createSubDirNodes(DirectoryInfo folder) + { + TreeNode[] toReturn = new TreeNode[folder.GetDirectories().Length]; + int loc = 0; + foreach (DirectoryInfo fold in folder.GetDirectories()) + { + if (fold.GetDirectories().Length > 0) + { + string label = ReadDataFile(fold.FullName, false); + TreeNode[] tn = createSubDirNodes(fold); + toReturn[loc] = new TreeNode(label ?? fold.Name, 2, 3, tn); + toReturn[loc].Tag = fold.FullName; + } + else + { + string label = ReadDataFile(fold.FullName, false); + toReturn[loc] = new TreeNode(label ?? fold.Name, 2, 3); + toReturn[loc].Tag = fold.FullName; + } + loc++; + } + return toReturn; + } + } +} diff --git a/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.resx b/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.resx new file mode 100644 index 0000000..bb70361 --- /dev/null +++ b/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/TimeHACK.Main/Program.cs b/TimeHACK.Main/Program.cs index 559c922..86f1a54 100644 --- a/TimeHACK.Main/Program.cs +++ b/TimeHACK.Main/Program.cs @@ -67,7 +67,7 @@ namespace TimeHACK public static string OpenFileExplorerAsDialogAndReturnGivenPath() { - WinClassicWindowsExplorer we = new WinClassicWindowsExplorer(); + Win95WindowsExplorer we = new Win95WindowsExplorer(); WinClassic app = wm.StartWin95(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true, true); try diff --git a/TimeHACK.Main/TimeHACK.Main.csproj b/TimeHACK.Main/TimeHACK.Main.csproj index dbb1ff1..e575aec 100644 --- a/TimeHACK.Main/TimeHACK.Main.csproj +++ b/TimeHACK.Main/TimeHACK.Main.csproj @@ -206,11 +206,11 @@ WinClassicWelcome.cs - + UserControl - - WinClassicWindowsExplorer.cs + + Win95WindowsExplorer.cs UserControl @@ -230,6 +230,12 @@ Win98.cs + + UserControl + + + WinClassicWindowsExplorer.cs + Form @@ -373,8 +379,8 @@ WinClassicWelcome.cs - - WinClassicWindowsExplorer.cs + + Win95WindowsExplorer.cs Designer @@ -384,6 +390,10 @@ Win98.cs Designer + + WinClassicWindowsExplorer.cs + Designer + LoadGameDialog.cs -- cgit v1.2.3 From 294592d1bcb6886863fd1d9a4b21936e98cd7f46 Mon Sep 17 00:00:00 2001 From: Alex-TIMEHACK Date: Sat, 22 Jul 2017 10:17:11 +0100 Subject: Win98 Designer Finished! At least for me... --- TimeHACK.Engine/SaveSystem.cs | 8 +- TimeHACK.Engine/Theme.cs | 17 ++ .../Win95Apps/Win95WindowsExplorer.Designer.cs | 3 +- TimeHACK.Main/OS/Win98/Win98.cs | 3 +- .../AddressBook/WinClassicAddressBook.Designer.cs | 39 ++- .../WinClassicWindowsExplorer.Designer.cs | 334 +++++++++++---------- .../Win98/Win98Apps/WinClassicWindowsExplorer.cs | 15 + .../Win98/Win98Apps/WinClassicWindowsExplorer.resx | 2 +- TimeHACK.Main/Properties/Resources.Designer.cs | 20 ++ TimeHACK.Main/Properties/Resources.resx | 6 + ...nClassicGENERALApplicationToolBoxBackground.png | Bin 458 -> 309 bytes TimeHACK.Main/Resources/XCross.png | Bin 0 -> 210 bytes TimeHACK.Main/Resources/XCross_highlighted.png | Bin 0 -> 225 bytes TimeHACK.Main/TimeHACK.Main.csproj | 2 + 14 files changed, 257 insertions(+), 192 deletions(-) create mode 100644 TimeHACK.Main/Resources/XCross.png create mode 100644 TimeHACK.Main/Resources/XCross_highlighted.png (limited to 'TimeHACK.Engine/SaveSystem.cs') diff --git a/TimeHACK.Engine/SaveSystem.cs b/TimeHACK.Engine/SaveSystem.cs index f8cc662..de34318 100644 --- a/TimeHACK.Engine/SaveSystem.cs +++ b/TimeHACK.Engine/SaveSystem.cs @@ -125,9 +125,7 @@ namespace TimeHACK.Engine } public static void NewGame() - { - //TODO: User must set a username....somehow - + { var save = new Save(); save.ExperiencedStories = new List(); if (DevMode == true) @@ -136,6 +134,7 @@ namespace TimeHACK.Engine { save.CurrentOS = "98"; save.ThemeName = "default98"; + currentTheme = new Default98Theme(); } else { @@ -258,6 +257,9 @@ namespace TimeHACK.Engine case "default95": currentTheme = new Default95Theme(); break; + case "default98": + currentTheme = new Default98Theme(); + break; case "dangeranimals": currentTheme = new DangerousCreaturesTheme(); break; diff --git a/TimeHACK.Engine/Theme.cs b/TimeHACK.Engine/Theme.cs index 89c913d..2b22072 100644 --- a/TimeHACK.Engine/Theme.cs +++ b/TimeHACK.Engine/Theme.cs @@ -40,6 +40,23 @@ namespace TimeHACK.Engine } } + public class Default98Theme : Theme + { + public Default98Theme() + { + startSound = Properties.Resources.Win95Start; + stopSound = Properties.Resources.Win95Stop; + + asteriskSound = Properties.Resources.CHORD; + critStopSound = Properties.Resources.CHORD; + progErrorSound = Properties.Resources.CHORD; + questionSound = Properties.Resources.CHORD; + + defaultWallpaper = null; + themeName = "default98"; + } + } + public class DangerousCreaturesTheme: Theme { public DangerousCreaturesTheme() diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs index 19af4e5..abdf2b8 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.Designer.cs @@ -127,7 +127,8 @@ // // MenuStrip1 // - this.MenuStrip1.BackColor = System.Drawing.Color.Silver; + this.MenuStrip1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(212)))), ((int)(((byte)(208)))), ((int)(((byte)(200))))); + this.MenuStrip1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.MenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.FileToolStripMenuItem, this.EditToolStripMenuItem, diff --git a/TimeHACK.Main/OS/Win98/Win98.cs b/TimeHACK.Main/OS/Win98/Win98.cs index 54415af..e3e7043 100644 --- a/TimeHACK.Main/OS/Win98/Win98.cs +++ b/TimeHACK.Main/OS/Win98/Win98.cs @@ -363,8 +363,7 @@ namespace TimeHACK.OS.Win98 { FileDialogBoxManager.IsInOpenDialog = false; FileDialogBoxManager.IsInSaveDialog = false; - Win95WindowsExplorer we = new Win95WindowsExplorer(); - WinClassic app = wm.StartWin95(we, "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); + WinClassic app = wm.StartWin95(new WinClassicWindowsExplorer(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer, true, true); AddTaskBarItem(app, app.Tag.ToString(), "Windows Explorer", Properties.Resources.WinClassicFileExplorer); nonimportantapps.Add(app); diff --git a/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs index 41107e8..201d159 100644 --- a/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs +++ b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.Designer.cs @@ -105,67 +105,67 @@ // newContactToolStripMenuItem // this.newContactToolStripMenuItem.Name = "newContactToolStripMenuItem"; - this.newContactToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.newContactToolStripMenuItem.Size = new System.Drawing.Size(150, 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(152, 22); + this.newFolderToolStripMenuItem.Size = new System.Drawing.Size(150, 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(149, 6); + this.toolStripSeparator1.Size = new System.Drawing.Size(147, 6); // // propertiesToolStripMenuItem // this.propertiesToolStripMenuItem.Name = "propertiesToolStripMenuItem"; - this.propertiesToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.propertiesToolStripMenuItem.Size = new System.Drawing.Size(150, 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(152, 22); + this.deleteToolStripMenuItem.Size = new System.Drawing.Size(150, 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(149, 6); + this.toolStripSeparator2.Size = new System.Drawing.Size(147, 6); // // importToolStripMenuItem // this.importToolStripMenuItem.Name = "importToolStripMenuItem"; - this.importToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.importToolStripMenuItem.Size = new System.Drawing.Size(150, 22); this.importToolStripMenuItem.Text = "Import..."; // // exportToolStripMenuItem // this.exportToolStripMenuItem.Name = "exportToolStripMenuItem"; - this.exportToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.exportToolStripMenuItem.Size = new System.Drawing.Size(150, 22); this.exportToolStripMenuItem.Text = "Export..."; // // toolStripSeparator3 // this.toolStripSeparator3.Name = "toolStripSeparator3"; - this.toolStripSeparator3.Size = new System.Drawing.Size(149, 6); + this.toolStripSeparator3.Size = new System.Drawing.Size(147, 6); // // toolStripSeparator4 // this.toolStripSeparator4.Name = "toolStripSeparator4"; - this.toolStripSeparator4.Size = new System.Drawing.Size(149, 6); + this.toolStripSeparator4.Size = new System.Drawing.Size(147, 6); // // exitToolStripMenuItem // this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; - this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.exitToolStripMenuItem.Size = new System.Drawing.Size(150, 22); this.exitToolStripMenuItem.Text = "Exit"; this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); // @@ -184,7 +184,7 @@ this.toolbarToolStripMenuItem.CheckOnClick = true; this.toolbarToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; this.toolbarToolStripMenuItem.Name = "toolbarToolStripMenuItem"; - this.toolbarToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.toolbarToolStripMenuItem.Size = new System.Drawing.Size(114, 22); this.toolbarToolStripMenuItem.Text = "Toolbar"; this.toolbarToolStripMenuItem.Click += new System.EventHandler(this.toolbarToolStripMenuItem_Click); // @@ -194,7 +194,7 @@ this.foldersToolStripMenuItem.CheckOnClick = true; this.foldersToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; this.foldersToolStripMenuItem.Name = "foldersToolStripMenuItem"; - this.foldersToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.foldersToolStripMenuItem.Size = new System.Drawing.Size(114, 22); this.foldersToolStripMenuItem.Text = "Folders"; this.foldersToolStripMenuItem.Click += new System.EventHandler(this.foldersToolStripMenuItem_Click); // @@ -213,25 +213,25 @@ this.dialToolStripMenuItem, this.internetToolStripMenuItem}); this.actionToolStripMenuItem.Name = "actionToolStripMenuItem"; - this.actionToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.actionToolStripMenuItem.Size = new System.Drawing.Size(109, 22); this.actionToolStripMenuItem.Text = "Action"; // // sendMailToolStripMenuItem // this.sendMailToolStripMenuItem.Name = "sendMailToolStripMenuItem"; - this.sendMailToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.sendMailToolStripMenuItem.Size = new System.Drawing.Size(138, 22); this.sendMailToolStripMenuItem.Text = "Send Mail"; // // dialToolStripMenuItem // this.dialToolStripMenuItem.Name = "dialToolStripMenuItem"; - this.dialToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.dialToolStripMenuItem.Size = new System.Drawing.Size(138, 22); this.dialToolStripMenuItem.Text = "Dial"; // // internetToolStripMenuItem // this.internetToolStripMenuItem.Name = "internetToolStripMenuItem"; - this.internetToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.internetToolStripMenuItem.Size = new System.Drawing.Size(138, 22); this.internetToolStripMenuItem.Text = "Internet Call"; // // helpToolStripMenuItem @@ -273,9 +273,8 @@ // // toolbar // - this.toolbar.BackColor = System.Drawing.Color.Silver; - this.toolbar.BackgroundImage = global::TimeHACK.Properties.Resources.WinClassicGENERALApplicationToolbarBackground; - this.toolbar.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.toolbar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(212)))), ((int)(((byte)(208)))), ((int)(((byte)(200))))); + this.toolbar.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.toolbar.Controls.Add(this.toolProp); this.toolbar.Controls.Add(this.toolNew); this.toolbar.Controls.Add(this.toolDelete); diff --git a/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs b/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs index c74b102..0e51ce7 100644 --- a/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs +++ b/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs @@ -30,6 +30,21 @@ { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WinClassicWindowsExplorer)); this.program = new System.Windows.Forms.Panel(); + this.mainView = new System.Windows.Forms.ListView(); + this.toprightcorner = new System.Windows.Forms.Panel(); + this.bottomrightcorner = new System.Windows.Forms.Panel(); + this.bottomleftcorner = new System.Windows.Forms.Panel(); + this.topleftcorner = new System.Windows.Forms.Panel(); + this.pnlSave = new System.Windows.Forms.Panel(); + this.Button1 = new System.Windows.Forms.Button(); + this.Label1 = new System.Windows.Forms.Label(); + this.txtSave = new System.Windows.Forms.TextBox(); + this.pnlInfo = new System.Windows.Forms.Panel(); + this.pnlFolders = new System.Windows.Forms.Panel(); + this.pnlFoldersTop = new System.Windows.Forms.Panel(); + this.label2 = new System.Windows.Forms.Label(); + this.btnFolderClose = new System.Windows.Forms.PictureBox(); + this.diskView = new System.Windows.Forms.TreeView(); this.MenuStrip1 = new System.Windows.Forms.MenuStrip(); this.FileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.CreateShortcutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -72,28 +87,13 @@ this.HelpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.HelpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.AboutWindows95ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.mainView = new System.Windows.Forms.ListView(); - this.toprightcorner = new System.Windows.Forms.Panel(); - this.bottomrightcorner = new System.Windows.Forms.Panel(); - this.bottomleftcorner = new System.Windows.Forms.Panel(); - this.topleftcorner = new System.Windows.Forms.Panel(); - this.pnlSave = new System.Windows.Forms.Panel(); - this.Button1 = new System.Windows.Forms.Button(); - this.Label1 = new System.Windows.Forms.Label(); - this.txtSave = new System.Windows.Forms.TextBox(); - this.pnlInfo = new System.Windows.Forms.Panel(); - this.pnlFolders = new System.Windows.Forms.Panel(); - this.pnlFoldersTop = new System.Windows.Forms.Panel(); - this.diskView = new System.Windows.Forms.TreeView(); - this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.label2 = new System.Windows.Forms.Label(); this.program.SuspendLayout(); - this.MenuStrip1.SuspendLayout(); this.pnlSave.SuspendLayout(); this.pnlInfo.SuspendLayout(); this.pnlFolders.SuspendLayout(); this.pnlFoldersTop.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.btnFolderClose)).BeginInit(); + this.MenuStrip1.SuspendLayout(); this.SuspendLayout(); // // program @@ -113,9 +113,156 @@ this.program.Size = new System.Drawing.Size(704, 517); this.program.TabIndex = 13; // + // mainView + // + this.mainView.Dock = System.Windows.Forms.DockStyle.Right; + this.mainView.Location = new System.Drawing.Point(403, 24); + this.mainView.Name = "mainView"; + this.mainView.Size = new System.Drawing.Size(301, 458); + this.mainView.TabIndex = 10; + this.mainView.UseCompatibleStateImageBehavior = false; + this.mainView.View = System.Windows.Forms.View.List; + this.mainView.DoubleClick += new System.EventHandler(this.mainView_DoubleClick); + // + // toprightcorner + // + this.toprightcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.toprightcorner.Location = new System.Drawing.Point(700, 0); + this.toprightcorner.Name = "toprightcorner"; + this.toprightcorner.Size = new System.Drawing.Size(4, 4); + this.toprightcorner.TabIndex = 6; + // + // bottomrightcorner + // + this.bottomrightcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.bottomrightcorner.Cursor = System.Windows.Forms.Cursors.SizeNWSE; + this.bottomrightcorner.Location = new System.Drawing.Point(700, 513); + this.bottomrightcorner.Name = "bottomrightcorner"; + this.bottomrightcorner.Size = new System.Drawing.Size(4, 4); + this.bottomrightcorner.TabIndex = 4; + // + // bottomleftcorner + // + this.bottomleftcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.bottomleftcorner.Location = new System.Drawing.Point(0, 513); + this.bottomleftcorner.Name = "bottomleftcorner"; + this.bottomleftcorner.Size = new System.Drawing.Size(4, 4); + this.bottomleftcorner.TabIndex = 2; + // + // topleftcorner + // + this.topleftcorner.Location = new System.Drawing.Point(0, 0); + this.topleftcorner.Name = "topleftcorner"; + this.topleftcorner.Size = new System.Drawing.Size(4, 4); + this.topleftcorner.TabIndex = 1; + // + // pnlSave + // + this.pnlSave.Controls.Add(this.Button1); + this.pnlSave.Controls.Add(this.Label1); + this.pnlSave.Controls.Add(this.txtSave); + this.pnlSave.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnlSave.Location = new System.Drawing.Point(0, 482); + this.pnlSave.Name = "pnlSave"; + this.pnlSave.Size = new System.Drawing.Size(704, 35); + this.pnlSave.TabIndex = 18; + this.pnlSave.Visible = false; + // + // Button1 + // + this.Button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.Button1.Location = new System.Drawing.Point(626, 3); + this.Button1.Name = "Button1"; + this.Button1.Size = new System.Drawing.Size(75, 23); + this.Button1.TabIndex = 17; + this.Button1.Text = "Save"; + this.Button1.UseVisualStyleBackColor = true; + this.Button1.Click += new System.EventHandler(this.Button1_Click); + // + // Label1 + // + this.Label1.AutoSize = true; + this.Label1.Location = new System.Drawing.Point(3, 6); + this.Label1.Name = "Label1"; + this.Label1.Size = new System.Drawing.Size(57, 13); + this.Label1.TabIndex = 16; + this.Label1.Text = "File Name:"; + // + // txtSave + // + this.txtSave.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtSave.Location = new System.Drawing.Point(60, 3); + this.txtSave.Name = "txtSave"; + this.txtSave.Size = new System.Drawing.Size(560, 20); + this.txtSave.TabIndex = 15; + // + // pnlInfo + // + this.pnlInfo.Controls.Add(this.pnlFolders); + this.pnlInfo.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlInfo.Location = new System.Drawing.Point(0, 24); + this.pnlInfo.Name = "pnlInfo"; + this.pnlInfo.Size = new System.Drawing.Size(704, 493); + this.pnlInfo.TabIndex = 19; + // + // pnlFolders + // + this.pnlFolders.Controls.Add(this.pnlFoldersTop); + this.pnlFolders.Controls.Add(this.diskView); + this.pnlFolders.Dock = System.Windows.Forms.DockStyle.Left; + this.pnlFolders.Location = new System.Drawing.Point(0, 0); + this.pnlFolders.Name = "pnlFolders"; + this.pnlFolders.Size = new System.Drawing.Size(168, 493); + this.pnlFolders.TabIndex = 0; + // + // pnlFoldersTop + // + this.pnlFoldersTop.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(212)))), ((int)(((byte)(208)))), ((int)(((byte)(200))))); + this.pnlFoldersTop.Controls.Add(this.label2); + this.pnlFoldersTop.Controls.Add(this.btnFolderClose); + this.pnlFoldersTop.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlFoldersTop.Location = new System.Drawing.Point(0, 0); + this.pnlFoldersTop.Name = "pnlFoldersTop"; + this.pnlFoldersTop.Size = new System.Drawing.Size(168, 22); + this.pnlFoldersTop.TabIndex = 20; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(3, 3); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(41, 13); + this.label2.TabIndex = 1; + this.label2.Text = "Folders"; + // + // btnFolderClose + // + this.btnFolderClose.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(212)))), ((int)(((byte)(208)))), ((int)(((byte)(200))))); + this.btnFolderClose.Image = ((System.Drawing.Image)(resources.GetObject("btnFolderClose.Image"))); + this.btnFolderClose.Location = new System.Drawing.Point(144, 3); + this.btnFolderClose.Name = "btnFolderClose"; + this.btnFolderClose.Size = new System.Drawing.Size(21, 16); + this.btnFolderClose.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; + this.btnFolderClose.TabIndex = 20; + this.btnFolderClose.TabStop = false; + this.btnFolderClose.Click += new System.EventHandler(this.btnFolderClose_Click); + this.btnFolderClose.MouseEnter += new System.EventHandler(this.pictureBox1_MouseEnter); + this.btnFolderClose.MouseLeave += new System.EventHandler(this.btnFolderClose_MouseLeave); + // + // diskView + // + this.diskView.Dock = System.Windows.Forms.DockStyle.Fill; + this.diskView.Location = new System.Drawing.Point(0, 0); + this.diskView.Name = "diskView"; + this.diskView.Size = new System.Drawing.Size(168, 493); + this.diskView.TabIndex = 13; + this.diskView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.diskView_AfterSelect); + // // MenuStrip1 // - this.MenuStrip1.BackColor = System.Drawing.Color.Silver; + this.MenuStrip1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(212)))), ((int)(((byte)(208)))), ((int)(((byte)(200))))); this.MenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.FileToolStripMenuItem, this.EditToolStripMenuItem, @@ -423,149 +570,6 @@ this.AboutWindows95ToolStripMenuItem.Text = "About Windows 95"; this.AboutWindows95ToolStripMenuItem.Click += new System.EventHandler(this.AboutWindows95ToolStripMenuItem_Click); // - // mainView - // - this.mainView.Dock = System.Windows.Forms.DockStyle.Right; - this.mainView.Location = new System.Drawing.Point(403, 24); - this.mainView.Name = "mainView"; - this.mainView.Size = new System.Drawing.Size(301, 458); - this.mainView.TabIndex = 10; - this.mainView.UseCompatibleStateImageBehavior = false; - this.mainView.View = System.Windows.Forms.View.List; - this.mainView.DoubleClick += new System.EventHandler(this.mainView_DoubleClick); - // - // toprightcorner - // - this.toprightcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.toprightcorner.Location = new System.Drawing.Point(700, 0); - this.toprightcorner.Name = "toprightcorner"; - this.toprightcorner.Size = new System.Drawing.Size(4, 4); - this.toprightcorner.TabIndex = 6; - // - // bottomrightcorner - // - this.bottomrightcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.bottomrightcorner.Cursor = System.Windows.Forms.Cursors.SizeNWSE; - this.bottomrightcorner.Location = new System.Drawing.Point(700, 513); - this.bottomrightcorner.Name = "bottomrightcorner"; - this.bottomrightcorner.Size = new System.Drawing.Size(4, 4); - this.bottomrightcorner.TabIndex = 4; - // - // bottomleftcorner - // - this.bottomleftcorner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.bottomleftcorner.Location = new System.Drawing.Point(0, 513); - this.bottomleftcorner.Name = "bottomleftcorner"; - this.bottomleftcorner.Size = new System.Drawing.Size(4, 4); - this.bottomleftcorner.TabIndex = 2; - // - // topleftcorner - // - this.topleftcorner.Location = new System.Drawing.Point(0, 0); - this.topleftcorner.Name = "topleftcorner"; - this.topleftcorner.Size = new System.Drawing.Size(4, 4); - this.topleftcorner.TabIndex = 1; - // - // pnlSave - // - this.pnlSave.Controls.Add(this.Button1); - this.pnlSave.Controls.Add(this.Label1); - this.pnlSave.Controls.Add(this.txtSave); - this.pnlSave.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pnlSave.Location = new System.Drawing.Point(0, 482); - this.pnlSave.Name = "pnlSave"; - this.pnlSave.Size = new System.Drawing.Size(704, 35); - this.pnlSave.TabIndex = 18; - this.pnlSave.Visible = false; - // - // Button1 - // - this.Button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.Button1.Location = new System.Drawing.Point(626, 3); - this.Button1.Name = "Button1"; - this.Button1.Size = new System.Drawing.Size(75, 23); - this.Button1.TabIndex = 17; - this.Button1.Text = "Save"; - this.Button1.UseVisualStyleBackColor = true; - this.Button1.Click += new System.EventHandler(this.Button1_Click); - // - // Label1 - // - this.Label1.AutoSize = true; - this.Label1.Location = new System.Drawing.Point(3, 6); - this.Label1.Name = "Label1"; - this.Label1.Size = new System.Drawing.Size(57, 13); - this.Label1.TabIndex = 16; - this.Label1.Text = "File Name:"; - // - // txtSave - // - this.txtSave.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtSave.Location = new System.Drawing.Point(60, 3); - this.txtSave.Name = "txtSave"; - this.txtSave.Size = new System.Drawing.Size(560, 20); - this.txtSave.TabIndex = 15; - // - // pnlInfo - // - this.pnlInfo.Controls.Add(this.pnlFolders); - this.pnlInfo.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlInfo.Location = new System.Drawing.Point(0, 24); - this.pnlInfo.Name = "pnlInfo"; - this.pnlInfo.Size = new System.Drawing.Size(704, 493); - this.pnlInfo.TabIndex = 19; - // - // pnlFolders - // - this.pnlFolders.Controls.Add(this.pnlFoldersTop); - this.pnlFolders.Controls.Add(this.diskView); - this.pnlFolders.Dock = System.Windows.Forms.DockStyle.Left; - this.pnlFolders.Location = new System.Drawing.Point(0, 0); - this.pnlFolders.Name = "pnlFolders"; - this.pnlFolders.Size = new System.Drawing.Size(168, 493); - this.pnlFolders.TabIndex = 0; - // - // pnlFoldersTop - // - this.pnlFoldersTop.Controls.Add(this.label2); - this.pnlFoldersTop.Controls.Add(this.pictureBox1); - this.pnlFoldersTop.Dock = System.Windows.Forms.DockStyle.Top; - this.pnlFoldersTop.Location = new System.Drawing.Point(0, 0); - this.pnlFoldersTop.Name = "pnlFoldersTop"; - this.pnlFoldersTop.Size = new System.Drawing.Size(168, 22); - this.pnlFoldersTop.TabIndex = 20; - // - // diskView - // - this.diskView.Dock = System.Windows.Forms.DockStyle.Fill; - this.diskView.Location = new System.Drawing.Point(0, 0); - this.diskView.Name = "diskView"; - this.diskView.Size = new System.Drawing.Size(168, 493); - this.diskView.TabIndex = 13; - this.diskView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.diskView_AfterSelect); - // - // pictureBox1 - // - this.pictureBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(212)))), ((int)(((byte)(208)))), ((int)(((byte)(200))))); - this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); - this.pictureBox1.Location = new System.Drawing.Point(144, 3); - this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(21, 16); - this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; - this.pictureBox1.TabIndex = 20; - this.pictureBox1.TabStop = false; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(3, 3); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(41, 13); - this.label2.TabIndex = 1; - this.label2.Text = "Folders"; - // // WinClassicWindowsExplorer // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -576,15 +580,15 @@ this.Load += new System.EventHandler(this.WinClassicWindowsExplorer_Load); this.program.ResumeLayout(false); this.program.PerformLayout(); - this.MenuStrip1.ResumeLayout(false); - this.MenuStrip1.PerformLayout(); this.pnlSave.ResumeLayout(false); this.pnlSave.PerformLayout(); this.pnlInfo.ResumeLayout(false); this.pnlFolders.ResumeLayout(false); this.pnlFoldersTop.ResumeLayout(false); this.pnlFoldersTop.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.btnFolderClose)).EndInit(); + this.MenuStrip1.ResumeLayout(false); + this.MenuStrip1.PerformLayout(); this.ResumeLayout(false); } @@ -647,7 +651,7 @@ private System.Windows.Forms.Panel pnlInfo; private System.Windows.Forms.Panel pnlFolders; private System.Windows.Forms.Panel pnlFoldersTop; - private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.PictureBox btnFolderClose; private System.Windows.Forms.Label label2; } } diff --git a/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs b/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs index 0f030a4..ed376c9 100644 --- a/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs +++ b/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs @@ -795,5 +795,20 @@ namespace TimeHACK.OS.Win95.Win95Apps } return toReturn; } + + private void pictureBox1_MouseEnter(object sender, EventArgs e) + { + btnFolderClose.Image = Properties.Resources.XCross_highlighted; + } + + private void btnFolderClose_MouseLeave(object sender, EventArgs e) + { + btnFolderClose.Image = Properties.Resources.XCross; + } + + private void btnFolderClose_Click(object sender, EventArgs e) + { + pnlFolders.Hide(); + } } } diff --git a/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.resx b/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.resx index 4ab5a31..521f476 100644 --- a/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.resx +++ b/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.resx @@ -118,7 +118,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + iVBORw0KGgoAAAANSUhEUgAAAAwAAAAJCAIAAACJ2loDAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO wwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xNkRpr/UAAABCSURBVChThYox diff --git a/TimeHACK.Main/Properties/Resources.Designer.cs b/TimeHACK.Main/Properties/Resources.Designer.cs index 7334f29..3603469 100644 --- a/TimeHACK.Main/Properties/Resources.Designer.cs +++ b/TimeHACK.Main/Properties/Resources.Designer.cs @@ -1360,5 +1360,25 @@ namespace TimeHACK.Properties { return ((byte[])(obj)); } } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap XCross { + get { + object obj = ResourceManager.GetObject("XCross", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap XCross_highlighted { + get { + object obj = ResourceManager.GetObject("XCross_highlighted", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/TimeHACK.Main/Properties/Resources.resx b/TimeHACK.Main/Properties/Resources.resx index 4e158fb..e8ffa48 100644 --- a/TimeHACK.Main/Properties/Resources.resx +++ b/TimeHACK.Main/Properties/Resources.resx @@ -660,4 +660,10 @@ ..\Resources\WinClassicGENERALApplicationToolBoxBackground.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\XCross.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\XCross_highlighted.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/WinClassicGENERALApplicationToolBoxBackground.png b/TimeHACK.Main/Resources/WinClassicGENERALApplicationToolBoxBackground.png index da677c5..17f28cd 100644 Binary files a/TimeHACK.Main/Resources/WinClassicGENERALApplicationToolBoxBackground.png and b/TimeHACK.Main/Resources/WinClassicGENERALApplicationToolBoxBackground.png differ diff --git a/TimeHACK.Main/Resources/XCross.png b/TimeHACK.Main/Resources/XCross.png new file mode 100644 index 0000000..cb3639a Binary files /dev/null and b/TimeHACK.Main/Resources/XCross.png differ diff --git a/TimeHACK.Main/Resources/XCross_highlighted.png b/TimeHACK.Main/Resources/XCross_highlighted.png new file mode 100644 index 0000000..d739087 Binary files /dev/null and b/TimeHACK.Main/Resources/XCross_highlighted.png differ diff --git a/TimeHACK.Main/TimeHACK.Main.csproj b/TimeHACK.Main/TimeHACK.Main.csproj index 6f489b8..fc48270 100644 --- a/TimeHACK.Main/TimeHACK.Main.csproj +++ b/TimeHACK.Main/TimeHACK.Main.csproj @@ -477,6 +477,8 @@ + + -- cgit v1.2.3 From bc6a8c1ada9230cab511aa5bcc9bdfbf43956e7e Mon Sep 17 00:00:00 2001 From: Alex-TIMEHACK Date: Sat, 22 Jul 2017 11:41:27 +0100 Subject: Fully Working Web View Part 2 --- TimeHACK.Engine/SaveSystem.cs | 2 +- .../WinClassicWindowsExplorer.Designer.cs | 21 ++++++++-------- .../Win98/Win98Apps/WinClassicWindowsExplorer.cs | 28 +++++++++++++++++++++- 3 files changed, 39 insertions(+), 12 deletions(-) (limited to 'TimeHACK.Engine/SaveSystem.cs') diff --git a/TimeHACK.Engine/SaveSystem.cs b/TimeHACK.Engine/SaveSystem.cs index de34318..383a372 100644 --- a/TimeHACK.Engine/SaveSystem.cs +++ b/TimeHACK.Engine/SaveSystem.cs @@ -58,7 +58,7 @@ namespace TimeHACK.Engine { get { - return Path.Combine(ProfileFileSystemDirectory, "Computer"); + return Path.Combine(ProfileFileSystemDirectory, "CDrive"); } } diff --git a/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs b/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs index 131ed1f..a7e5bf1 100644 --- a/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs +++ b/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.Designer.cs @@ -36,6 +36,7 @@ this.txtInfoTitle = new System.Windows.Forms.Label(); this.pnlInfoContent = new System.Windows.Forms.Panel(); this.InfoDesc = new System.Windows.Forms.Panel(); + this.txtInfoDescSize = new System.Windows.Forms.Label(); this.txtInfoDescModified = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.txtInfoDescType = new System.Windows.Forms.Label(); @@ -75,7 +76,6 @@ this.HelpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.HelpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.AboutWindows95ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.txtInfoDescSize = new System.Windows.Forms.Label(); this.program.SuspendLayout(); this.pnlInfo.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); @@ -139,6 +139,7 @@ this.pictureBox1.Location = new System.Drawing.Point(15, 18); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(30, 30); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pictureBox1.TabIndex = 20; this.pictureBox1.TabStop = false; // @@ -180,6 +181,15 @@ this.InfoDesc.TabIndex = 22; this.InfoDesc.Visible = false; // + // txtInfoDescSize + // + this.txtInfoDescSize.AutoSize = true; + this.txtInfoDescSize.Location = new System.Drawing.Point(12, 81); + this.txtInfoDescSize.Name = "txtInfoDescSize"; + this.txtInfoDescSize.Size = new System.Drawing.Size(59, 13); + this.txtInfoDescSize.TabIndex = 0; + this.txtInfoDescSize.Text = "FILE_SIZE"; + // // txtInfoDescModified // this.txtInfoDescModified.AutoSize = true; @@ -518,15 +528,6 @@ this.AboutWindows95ToolStripMenuItem.Text = "About Windows 95"; this.AboutWindows95ToolStripMenuItem.Click += new System.EventHandler(this.AboutWindows95ToolStripMenuItem_Click); // - // txtInfoDescSize - // - this.txtInfoDescSize.AutoSize = true; - this.txtInfoDescSize.Location = new System.Drawing.Point(12, 81); - this.txtInfoDescSize.Name = "txtInfoDescSize"; - this.txtInfoDescSize.Size = new System.Drawing.Size(59, 13); - this.txtInfoDescSize.TabIndex = 0; - this.txtInfoDescSize.Text = "FILE_SIZE"; - // // WinClassicWindowsExplorer // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); diff --git a/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs b/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs index af95868..ae64ff5 100644 --- a/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs +++ b/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs @@ -76,6 +76,29 @@ namespace TimeHACK.OS.Win95.Win95Apps // diskView.Items.Add("", 0) // End If //Next + + // Update the WebView + + if (Directory.Exists(currentDirectory)) + { + if (currentDirectory == SaveSystem.ProfileMyComputerDirectory) + { + pictureBox1.Image = Properties.Resources.Win95HardDiskIcon; + } else if (currentDirectory == SaveSystem.ProfileFileSystemDirectory) { + pictureBox1.Image = Properties.Resources.Win95Computer; + } else { + pictureBox1.Image = Properties.Resources.WinClassicFolder; + } + + } else { + // If it is the drive give it that icon + + + } + + string weblabel = ReadDataFile(currentDirectory, false); + + txtInfoTitle.Text = weblabel ?? new FileInfo(currentDirectory).Name; foreach (string str in Directory.GetDirectories(currentDirectory)) { string label = ReadDataFile(str, false); @@ -875,7 +898,8 @@ namespace TimeHACK.OS.Win95.Win95Apps txtInfoDescType.Text = ReturnType(fi.Extension).Split('\n')[0]; txtInfoDescModified.Text = fi.CreationTime.ToString(); - txtInfoDescSize.Text = $"{fi.Length} bytes."; + txtInfoDescSize.Show(); + txtInfoDescSize.Text = $"Size: {fi.Length} bytes."; } } else if (Directory.Exists(Path.Combine(currentDirectory, mainView.FocusedItem.Text))) { @@ -887,6 +911,8 @@ namespace TimeHACK.OS.Win95.Win95Apps txtInfoDescName.Text = mainView.FocusedItem.Text; txtInfoDescType.Text = "File Folder"; txtInfoDescModified.Text = fi.CreationTime.ToString(); + + txtInfoDescSize.Hide(); } } } -- cgit v1.2.3 From 46eb239008fc30830b026b5eedc7da036d14d3f2 Mon Sep 17 00:00:00 2001 From: Alex-TIMEHACK Date: Sat, 22 Jul 2017 12:45:53 +0100 Subject: Fixed bugs --- TimeHACK.Engine/SaveSystem.cs | 10 ++++++-- .../OS/Win95/Win95Apps/Win95WindowsExplorer.cs | 2 +- TimeHACK.Main/OS/Win98/Win98.cs | 2 ++ .../Win98/Win98Apps/WinClassicWindowsExplorer.cs | 27 +++++++++------------- 4 files changed, 22 insertions(+), 19 deletions(-) (limited to 'TimeHACK.Engine/SaveSystem.cs') diff --git a/TimeHACK.Engine/SaveSystem.cs b/TimeHACK.Engine/SaveSystem.cs index 383a372..2a372e3 100644 --- a/TimeHACK.Engine/SaveSystem.cs +++ b/TimeHACK.Engine/SaveSystem.cs @@ -171,8 +171,8 @@ namespace TimeHACK.Engine SaveDirectoryInfo(ProfileFileSystemDirectory, false, "My Computer", false); SaveDirectoryInfo(ProfileMyComputerDirectory, false, "Win95 (C:)", true); - if (CurrentSave.CurrentOS == "95") SaveDirectoryInfo(ProfileDocumentsDirectory, false, "My Documents", true); - if (CurrentSave.CurrentOS != "95") SaveDirectoryInfo(ProfileSettingsDirectory, false, "Documents and Settings", true); + if (CurrentSave.CurrentOS == "95" || CurrentSave.CurrentOS == "98") SaveDirectoryInfo(ProfileDocumentsDirectory, false, "My Documents", true); + if (CurrentSave.CurrentOS == "2000" || CurrentSave.CurrentOS == "ME") SaveDirectoryInfo(ProfileSettingsDirectory, false, "Documents and Settings", true); SaveDirectoryInfo(Path.Combine(ProfileProgramsDirectory, "Accessories"), false, "Accessories", true); SaveDirectoryInfo(ProfileProgramsDirectory, true, "Program Files", true); SaveDirectoryInfo(ProfileWindowsDirectory, true, "Windows", true); @@ -210,6 +210,12 @@ namespace TimeHACK.Engine // All the above OSes share basically the same file layout! // (Excluding Documents And Settings) which is 2000 and ME only + // Rename the C Drive to Win98 + + SaveDirectoryInfo(ProfileMyComputerDirectory, false, "Win98 (C:)", true); + + // Add Address Book into existance! + SaveDirectoryInfo(Path.Combine(ProfileProgramsDirectory, "Outlook Express"), false, "Outlook Express", true); CreateWindowsFile(Path.Combine(ProfileProgramsDirectory, "Outlook Express", "WAB.exe"), "addressbook"); } diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs index a685fa6..e85b39f 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs @@ -22,7 +22,7 @@ namespace TimeHACK.OS.Win95.Win95Apps public string onlyViewExtension = ""; string ToReplaceWith = ProfileDirectory; - string CurrentDirectory = Path.Combine(ProfileDirectory, "folders", "Computer"); + string CurrentDirectory = ProfileMyComputerDirectory; string OldLabelText; int fileType = 6; //string attemptedDirectory = ""; diff --git a/TimeHACK.Main/OS/Win98/Win98.cs b/TimeHACK.Main/OS/Win98/Win98.cs index e3e7043..5585e7d 100644 --- a/TimeHACK.Main/OS/Win98/Win98.cs +++ b/TimeHACK.Main/OS/Win98/Win98.cs @@ -71,6 +71,8 @@ namespace TimeHACK.OS.Win98 // When New Game is clicked in TitleScreen.cs private void Desktop_Load(object sender, EventArgs e) { + UpgradeFileSystem("95", "98"); + if (currentTheme.defaultWallpaper != null) desktopicons.BackgroundImage = new Bitmap(currentTheme.defaultWallpaper, Width, Height); //Start Menu Color - Commented until it works reliably //startmenuitems.Renderer = new MyRenderer(); diff --git a/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs b/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs index 3a87805..e97276d 100644 --- a/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs +++ b/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs @@ -22,7 +22,7 @@ namespace TimeHACK.OS.Win95.Win95Apps public string onlyViewExtension = ""; string ToReplaceWith = ProfileDirectory; - string CurrentDirectory = Path.Combine(ProfileDirectory, "folders", "Computer"); + string CurrentDirectory = ProfileMyComputerDirectory; string OldLabelText; int fileType = 6; //string attemptedDirectory = ""; @@ -162,23 +162,18 @@ namespace TimeHACK.OS.Win95.Win95Apps // Update the WebView - if (Directory.Exists(CurrentDirectory)) + if (CurrentDirectory == SaveSystem.ProfileMyComputerDirectory) { - if (CurrentDirectory == SaveSystem.ProfileMyComputerDirectory) - { - pictureBox1.Image = Properties.Resources.Win95HardDiskIcon; - } else if (CurrentDirectory == SaveSystem.ProfileFileSystemDirectory) { - pictureBox1.Image = Properties.Resources.Win95Computer; - } else { - pictureBox1.Image = Properties.Resources.WinClassicFolder; - } - + pictureBox1.Image = Properties.Resources.Win95HardDiskIcon; + } else if (CurrentDirectory == SaveSystem.ProfileFileSystemDirectory) { + pictureBox1.Image = Properties.Resources.Win95Computer; } else { - // If it is the drive give it that icon - - + pictureBox1.Image = Properties.Resources.WinClassicFolder; } + txtInfoTip.Show(); + InfoDesc.Hide(); + string weblabel = ReadDataFile(CurrentDirectory, false); txtInfoTitle.Text = weblabel ?? new FileInfo(CurrentDirectory).Name; @@ -621,7 +616,7 @@ namespace TimeHACK.OS.Win95.Win95Apps } else { - OpenFile((string)mainView.FocusedItem.Tag); + OpenFile(mainView.FocusedItem.Tag.ToString()); } } } catch (Exception ex) { @@ -756,7 +751,7 @@ namespace TimeHACK.OS.Win95.Win95Apps private void AboutWindows95ToolStripMenuItem_Click(object sender, EventArgs e) { WindowManager wm = new WindowManager(); - wm.StartAboutBox95("Windows 95", "Microsoft Windows 98", Properties.Resources.WinClassicAbout95); + wm.StartAboutBox95("Windows 98", "Microsoft Windows 98", Properties.Resources.WinClassicAbout95); } private void RenameToolStripMenuItem_Click(object sender, EventArgs e) -- cgit v1.2.3