diff options
| author | lempamo <[email protected]> | 2017-07-30 00:10:22 -0400 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-07-30 00:10:22 -0400 |
| commit | 077fef3baf82e23a4a03bb3c73d83f8d8103fdb9 (patch) | |
| tree | 7136fb69ca87b175aee39e6a04b4e998905f22a0 /TimeHACK.Main | |
| parent | 71ccea956dc85e8b293dc8a30fbbf91b2709897f (diff) | |
| download | histacom2-077fef3baf82e23a4a03bb3c73d83f8d8103fdb9.tar.gz histacom2-077fef3baf82e23a4a03bb3c73d83f8d8103fdb9.tar.bz2 histacom2-077fef3baf82e23a4a03bb3c73d83f8d8103fdb9.zip | |
better infoboxes
Diffstat (limited to 'TimeHACK.Main')
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95.Designer.cs | 1 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95.cs | 22 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs | 8 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs | 28 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.cs | 6 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWordPad.cs | 2 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win98/Win98.cs | 18 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs | 2 | ||||
| -rw-r--r-- | TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs | 16 | ||||
| -rw-r--r-- | TimeHACK.Main/TitleScreen.cs | 32 |
10 files changed, 61 insertions, 74 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95.Designer.cs b/TimeHACK.Main/OS/Win95/Win95.Designer.cs index 15feef6..8aa6c9d 100644 --- a/TimeHACK.Main/OS/Win95/Win95.Designer.cs +++ b/TimeHACK.Main/OS/Win95/Win95.Designer.cs @@ -817,6 +817,7 @@ namespace TimeHACK.OS.Win95 this.PrintersToolStripMenuItem.Name = "PrintersToolStripMenuItem"; this.PrintersToolStripMenuItem.Size = new System.Drawing.Size(146, 22); this.PrintersToolStripMenuItem.Text = "Printers"; + this.PrintersToolStripMenuItem.Click += new System.EventHandler(infoboxTestToolStripMenuItem_Click); // // TaskbarToolStripMenuItem // diff --git a/TimeHACK.Main/OS/Win95/Win95.cs b/TimeHACK.Main/OS/Win95/Win95.cs index 619f3ba..5d02b16 100644 --- a/TimeHACK.Main/OS/Win95/Win95.cs +++ b/TimeHACK.Main/OS/Win95/Win95.cs @@ -175,7 +175,7 @@ namespace TimeHACK.OS.Win95 // Give Year Code - NYI private void taskbartime_Click(object sender, EventArgs e) { - //TODO: Set Up Save System + } // Set the Clock @@ -256,7 +256,7 @@ namespace TimeHACK.OS.Win95 private void InternetExplorerToolStripMenuItem_Click(object sender, EventArgs e) { - if (ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", Properties.Resources.Win95Warning); return; } + if (ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", InfoboxType.Warning, InfoboxButtons.OK); return; } ie = wm.StartWin95(new WinClassicIE4(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); AddTaskBarItem(ie, ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4); ie.BringToFront(); @@ -276,7 +276,7 @@ namespace TimeHACK.OS.Win95 { if (objListViewItem.Text == "Internet Explorer") { - if (ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", Properties.Resources.Win95Warning); return; } + if (ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", InfoboxType.Warning, InfoboxButtons.OK); return; } ie = wm.StartWin95(new WinClassicIE4(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); AddTaskBarItem(ie, ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4); ie.BringToFront(); @@ -301,13 +301,13 @@ namespace TimeHACK.OS.Win95 } else if (objListViewItem.Text == "Set Up The Microsoft Network") { - wm.StartInfobox95("Microsoft Network", "The Microsoft Network is already set up!", Properties.Resources.Win95Info); + wm.StartInfobox95("Microsoft Network", "The Microsoft Network is already set up!", InfoboxType.Info, InfoboxButtons.OK); } else if (objListViewItem.Text == "Outlook Express") { - wm.StartInfobox95("Win32 Application", "That is not a valid Win32 Application.", Properties.Resources.Win95Error); + //wm.StartInfobox95("Win32 Application", "That is not a valid Win32 Application.", Properties.Resources.Win95Error); } else if (objListViewItem.Text == "Inbox") { - wm.StartInfobox95("Win32 Application", "That is not a valid Win32 Application.", Properties.Resources.Win95Error); + //wm.StartInfobox95("Win32 Application", "That is not a valid Win32 Application.", Properties.Resources.Win95Error); } else { @@ -340,7 +340,7 @@ namespace TimeHACK.OS.Win95 private void infoboxTestToolStripMenuItem_Click(object sender, EventArgs e) { - WinClassic app = wm.StartInfobox95("AShifter's Infobox", "This is the very first TimeHACK Infobox. It's really easy to call, too! \n Just use wm.startInfobox95(string title, string text, Image erroricon)!", Properties.Resources.Win95Info); + WinClassic app = wm.StartInfobox95("AShifter's Infobox", "This is the very first TimeHACK Infobox. It's really easy to call, too! \nJust use wm.startInfobox95(string title, string text, InfoboxType type, InfoboxButtons btns)!", InfoboxType.Info, InfoboxButtons.OK); app.BringToFront(); startmenu.Hide(); @@ -514,7 +514,7 @@ namespace TimeHACK.OS.Win95 { if (Directory.Exists(Path.Combine(ProfileWindowsDirectory, "Desktop", "New Folder"))) { - wm.StartInfobox95("Windows Explorer", "A folder called New Folder already exists - please rename it.", Properties.Resources.Win95Error); + wm.StartInfobox95("Windows Explorer", "A folder called New Folder already exists - please rename it.", InfoboxType.Error, InfoboxButtons.OK); } else { @@ -527,7 +527,7 @@ namespace TimeHACK.OS.Win95 { if (File.Exists(Path.Combine(ProfileWindowsDirectory, "Desktop", "New Text Document.txt"))) { - wm.StartInfobox95("Windows Explorer", "A folder called New Text Document already exists - please rename it.", Properties.Resources.Win95Error); + wm.StartInfobox95("Windows Explorer", "A folder called New Text Document already exists - please rename it.", InfoboxType.Error, InfoboxButtons.OK); } else { @@ -562,11 +562,11 @@ namespace TimeHACK.OS.Win95 } else { - wm.StartInfobox95("Windows Explorer", "This object cannot be deleted.", Properties.Resources.Win95Error); + wm.StartInfobox95("Windows Explorer", "This object cannot be deleted.", InfoboxType.Error, InfoboxButtons.OK); } } } else { - wm.StartInfobox95("Windows Explorer", "This object cannot be deleted.", Properties.Resources.Win95Error); + wm.StartInfobox95("Windows Explorer", "This object cannot be deleted.", InfoboxType.Error, InfoboxButtons.OK); } } } diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs index cbcf2a1..8dda600 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WebChat1998.cs @@ -58,10 +58,10 @@ namespace TimeHACK.OS.Win95.Win95Apps } private void Button1_Click(object sender, EventArgs e) { - if (txtscreenname.Text == "") { wm.StartInfobox95("Invalid Username", "Your username cannot be blank.", Properties.Resources.Win95Warning); return; } - if (txtscreenname.Text.Length > 12) { wm.StartInfobox95("Invalid Username", "Your username needs to be less than 12 characters.", Properties.Resources.Win95Warning); return; } - if (txtscreenname.Text.Contains(" ")) { wm.StartInfobox95("Invalid Username", "Your username cannot contain spaces.", Properties.Resources.Win95Warning); return; } - if (txtscreenname.Text == "SkyHigh" | txtscreenname.Text == "rain49" | txtscreenname.Text == "12padams") { wm.StartInfobox95("Invalid Username", "That username is already taken.", Properties.Resources.Win95Warning); return; } + if (txtscreenname.Text == "") { wm.StartInfobox95("Invalid Username", "Your username cannot be blank.", InfoboxType.Warning, InfoboxButtons.OK); return; } + if (txtscreenname.Text.Length > 12) { wm.StartInfobox95("Invalid Username", "Your username needs to be less than 12 characters.", InfoboxType.Warning, InfoboxButtons.OK); return; } + if (txtscreenname.Text.Contains(" ")) { wm.StartInfobox95("Invalid Username", "Your username cannot contain spaces.", InfoboxType.Warning, InfoboxButtons.OK); return; } + if (txtscreenname.Text == "SkyHigh" | txtscreenname.Text == "rain49" | txtscreenname.Text == "12padams") { wm.StartInfobox95("Invalid Username", "That username is already taken.", InfoboxType.Warning, InfoboxButtons.OK); return; } ParentForm.AcceptButton = button2; TitleScreen.username = txtscreenname.Text; login.Hide(); diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs b/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs index e2a5a59..548ad4a 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/Win95WindowsExplorer.cs @@ -160,7 +160,7 @@ namespace TimeHACK.OS.Win95.Win95Apps } } } catch (Exception ex) { - wm.StartInfobox95("Exploring - C:", "Error with the file explorer \n" + ex.Message, Properties.Resources.Win95Info); + //wm.StartInfobox95("Exploring - C:", "Error with the file explorer \n" + ex.Message, Properties.Resources.Win95Info); add illegal operation dialog here later ((Form)this.TopLevelControl).Close(); } } @@ -216,7 +216,7 @@ namespace TimeHACK.OS.Win95.Win95Apps break; case 12: - OpenApplication(FileDialogBoxManager.ReadTextFile(fileDir)); + OpenApplication(FileDialogBoxManager.ReadTextFile(fileDir), fileDir); break; } } catch { @@ -224,7 +224,7 @@ namespace TimeHACK.OS.Win95.Win95Apps } - void OpenApplication(string appname) + void OpenApplication(string appname, string path) { switch (appname.ToLower()) { @@ -251,7 +251,7 @@ namespace TimeHACK.OS.Win95.Win95Apps break; case "ie": - if (TitleScreen.frm95.ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", Properties.Resources.Win95Warning); return; } + if (TitleScreen.frm95.ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", InfoboxType.Warning, InfoboxButtons.OK); return; } TitleScreen.frm95.ie = wm.StartWin95(new WinClassicIE4(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); Program.AddTaskbarItem(TitleScreen.frm95.ie, TitleScreen.frm95.ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4); TitleScreen.frm95.ie.BringToFront(); @@ -275,12 +275,11 @@ namespace TimeHACK.OS.Win95.Win95Apps break; case "iebrokeninstaller": - wm.StartInfobox95("Internet Explorer Installation", "Installation Failed: The INF file was not found", Properties.Resources.Win95Error); + wm.StartInfobox95("Internet Explorer Installer", "Installation Failed: The INF file was not found", InfoboxType.Error, InfoboxButtons.OK); break; - case "addressbook": - wm.StartInfobox95("Win32 Error", "This is not a valid Win32 Application.", Properties.Resources.Win95Error); - + default: + wm.StartInfobox95(path.Replace(ProfileMyComputerDirectory, "C:"), $"{path.Replace(ProfileMyComputerDirectory, "C:")} is not a valid Win32 application.", InfoboxType.Error, InfoboxButtons.OK); break; } } @@ -650,7 +649,8 @@ namespace TimeHACK.OS.Win95.Win95Apps { if (File.Exists(CurrentDirectory + "\\New Folder")) { - wm.StartInfobox95("Windows Explorer", "This directory already exists", Properties.Resources.Win95Info); + //wm.StartInfobox95("Windows Explorer", "This directory already exists", Properties.Resources.Win95Info); + //TODO: add making "New Folder (2)" } else { @@ -681,7 +681,7 @@ namespace TimeHACK.OS.Win95.Win95Apps { if (txtSave.Text == "") { - wm.StartInfobox95("Windows Explorer", "Please enter a filename", Properties.Resources.Win95Info); + wm.StartInfobox95("Windows Explorer", "Please enter a filename", InfoboxType.Info, InfoboxButtons.OK); } else { @@ -710,7 +710,7 @@ namespace TimeHACK.OS.Win95.Win95Apps { if (!FileOrDirectoryExists(Path.Combine(CurrentDirectory, mainView.FocusedItem.Text))) { - wm.StartInfobox95("Windows Explorer", "This directory doesn't exist", Properties.Resources.Win95Info); + wm.StartInfobox95("Windows Explorer", "This directory doesn't exist", InfoboxType.Info, InfoboxButtons.OK); } else { @@ -765,19 +765,19 @@ namespace TimeHACK.OS.Win95.Win95Apps setText = e.Label; if (setText == "") { - wm.StartInfobox95("Windows Explorer", "Please enter a new directory name", Properties.Resources.Win95Info); + wm.StartInfobox95("Windows Explorer", "Please enter a new directory name", InfoboxType.Info, InfoboxButtons.OK); } else { if (Directory.Exists(setText)) { - wm.StartInfobox95("Windows Explorer", "That directory already exists.", Properties.Resources.Win95Info); + wm.StartInfobox95("Windows Explorer", "That directory already exists.", InfoboxType.Info, InfoboxButtons.OK); } else { if (File.Exists(setText)) { - wm.StartInfobox95("Windows Explorer", "That file already exists.", Properties.Resources.Win95Info); + wm.StartInfobox95("Windows Explorer", "That file already exists.", InfoboxType.Info, InfoboxButtons.OK); } else { diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.cs index 58fadee..5eeeb33 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTerminal.cs @@ -86,7 +86,7 @@ namespace TimeHACK.OS.Win95.Win95Apps if (cmdPrompt.SelectedText.Length > 0) Clipboard.SetText(cmdPrompt.SelectedText); // Set the clipboard text to the selection of the RichTextBox else - wm.StartInfobox95("ERROR", "You need to select something to copy.", Properties.Resources.Win95Error); // Display an error message if the length is 0 + wm.StartInfobox95("ERROR", "You need to select something to copy.", Engine.Template.InfoboxType.Error, Engine.Template.InfoboxButtons.OK); // Display an error message if the length is 0 } private void btnPaste_Click(object sender, EventArgs e) @@ -94,12 +94,12 @@ namespace TimeHACK.OS.Win95.Win95Apps if (Clipboard.GetText() != "") Write(Clipboard.GetText()); // Write the contents of the Clipboard text in the RichTextBox else - wm.StartInfobox95("ERROR", "You need to have something in your clipboard to paste.", Properties.Resources.Win95Error); // Display an error message if the clipboard is null/empty + wm.StartInfobox95("ERROR", "You need to have something in your clipboard to paste.", Engine.Template.InfoboxType.Error, Engine.Template.InfoboxButtons.OK); // Display an error message if the clipboard is null/empty } private void btnSettings_Click(object sender, EventArgs e) { - wm.StartInfobox95("INFO", "This feature has not been implemented yet. Stay tuned! -Jason", Properties.Resources.Win95Info); + wm.StartInfobox95("INFO", "This feature has not been implemented yet. Stay tuned! -Jason", Engine.Template.InfoboxType.Info, Engine.Template.InfoboxButtons.OK); //TODO: Well, add the settings... } diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWordPad.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWordPad.cs index 2453abc..7d0dd1c 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWordPad.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicWordPad.cs @@ -61,7 +61,7 @@ namespace TimeHACK.OS.Win95.Win95Apps this.aboutWordpadToolStripMenuItem.Click += (sender, args) => wm.StartAboutBox95("Wordpad", "Microsoft Wordpad", Properties.Resources.Win95IconWordpad); this.btnNew.Click += (sender, args) => mainText.Text = ""; this.newToolStripMenuItem.Click += (sender, args) => mainText.Text = ""; - this.sendToolStripMenuItem.Click += (sender, args) => wm.StartInfobox95("Wordpad", "An error occured opening send option.", null); + this.sendToolStripMenuItem.Click += (sender, args) => wm.StartInfobox95("Wordpad", "An error occured opening send option.", Engine.Template.InfoboxType.Error, Engine.Template.InfoboxButtons.OK); this.bulletStyleToolStripMenuItem.Click += (sender, args) => mainText.SelectionBullet = bulletStyleToolStripMenuItem.Checked; this.comboFont.SelectedIndexChanged += (sender, args) => SetSelectedTextFont(comboFont.Text); this.comboSize.SelectedIndexChanged += (sender, args) => SetSelectedTextSize(comboSize.Text); diff --git a/TimeHACK.Main/OS/Win98/Win98.cs b/TimeHACK.Main/OS/Win98/Win98.cs index a01d91b..b1f7957 100644 --- a/TimeHACK.Main/OS/Win98/Win98.cs +++ b/TimeHACK.Main/OS/Win98/Win98.cs @@ -158,7 +158,7 @@ namespace TimeHACK.OS.Win98 // Give Year Code - NYI private void taskbartime_Click(object sender, EventArgs e) { - //TODO: Set Up Save System + } // Set the Clock @@ -241,7 +241,7 @@ namespace TimeHACK.OS.Win98 private void InternetExplorerToolStripMenuItem_Click(object sender, EventArgs e) { - if (ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", Properties.Resources.Win95Warning); return; } + if (ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", InfoboxType.Warning, InfoboxButtons.OK); return; } ie = wm.StartWin95(new WinClassicIE4(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); AddTaskBarItem(ie, ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4); ie.BringToFront(); @@ -261,7 +261,7 @@ namespace TimeHACK.OS.Win98 { if (objListViewItem.Text == "Internet Explorer") { - if (ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", Properties.Resources.Win95Warning); return; } + if (ie != null) { wm.StartInfobox95("Error Opening Internet Explorer", "An instance of Internet Explorer 4 is already open.", InfoboxType.Warning, InfoboxButtons.OK); return; } ie = wm.StartWin95(new WinClassicIE4(), "Internet Explorer 4", Properties.Resources.Win95IconIE4, true, true); AddTaskBarItem(ie, ie.Tag.ToString(), "Internet Explorer 4", Properties.Resources.Win95IconIE4); ie.BringToFront(); @@ -287,15 +287,15 @@ namespace TimeHACK.OS.Win98 } else if (objListViewItem.Text == "Set Up The Microsoft Network") { - wm.StartInfobox95("Microsoft Network", "The Microsoft Network is already set up!", Properties.Resources.Win95Info); + wm.StartInfobox95("Microsoft Network", "The Microsoft Network is already set up!", InfoboxType.Info, InfoboxButtons.OK); } else if (objListViewItem.Text == "Outlook Express") { - wm.StartInfobox95("Win32 Application", "That is not a valid Win32 Application.", Properties.Resources.Win95Error); + //wm.StartInfobox95("Win32 Application", "That is not a valid Win32 Application.", Properties.Resources.Win95Error); } else if (objListViewItem.Text == "Inbox") { - wm.StartInfobox95("Win32 Application", "That is not a valid Win32 Application.", Properties.Resources.Win95Error); + //wm.StartInfobox95("Win32 Application", "That is not a valid Win32 Application.", Properties.Resources.Win95Error); } else { @@ -328,7 +328,7 @@ namespace TimeHACK.OS.Win98 private void infoboxTestToolStripMenuItem_Click(object sender, EventArgs e) { - WinClassic app = wm.StartInfobox95("AShifter's Infobox", "This is the very first TimeHACK Infobox. It's really easy to call, too! \n Just use wm.startInfobox95(string title, string text, Image erroricon)!", Properties.Resources.Win95Info); + WinClassic app = wm.StartInfobox95("AShifter's Infobox", "This is the very first TimeHACK Infobox. It's really easy to call, too! \n Just use wm.startInfobox95(string title, string text, InfoboxType type, InfoboxButtons btns)!", InfoboxType.Info, InfoboxButtons.OK); app.BringToFront(); startmenu.Hide(); @@ -560,13 +560,13 @@ namespace TimeHACK.OS.Win98 } else { - wm.StartInfobox95("Windows Explorer", "This object cannot be deleted.", Properties.Resources.Win95Error); + wm.StartInfobox95("Windows Explorer", "This object cannot be deleted.", InfoboxType.Error, InfoboxButtons.OK); } } } else { - wm.StartInfobox95("Windows Explorer", "This object cannot be deleted.", Properties.Resources.Win95Error); + wm.StartInfobox95("Windows Explorer", "This object cannot be deleted.", InfoboxType.Error, InfoboxButtons.OK); } } } diff --git a/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs index 95ee509..18cfcf9 100644 --- a/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs +++ b/TimeHACK.Main/OS/Win98/Win98Apps/AddressBook/WinClassicAddressBook.cs @@ -133,7 +133,7 @@ namespace TimeHACK.OS.Win95.Win95Apps } else { - wm.StartInfobox95("Address Book - New Folder", "You must enter a folder name!", Properties.Resources.Win95Error); + wm.StartInfobox95("Address Book - New Folder", "You must enter a folder name!", InfoboxType.Error, InfoboxButtons.OK); } } } diff --git a/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs b/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs index 5f1f131..f21a851 100644 --- a/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs +++ b/TimeHACK.Main/OS/Win98/Win98Apps/WinClassicWindowsExplorer.cs @@ -195,7 +195,7 @@ namespace TimeHACK.OS.Win95.Win95Apps } } } catch (Exception ex) { - wm.StartInfobox95("Exploring - C:", "Error with the file explorer \n" + ex.Message, Properties.Resources.Win95Info); + //wm.StartInfobox95("Exploring - C:", "Error with the file explorer \n" + ex.Message, Properties.Resources.Win95Info); add illegal operation dialog here later ((Form)this.TopLevelControl).Close(); } } @@ -287,7 +287,7 @@ namespace TimeHACK.OS.Win95.Win95Apps break; case "iebrokeninstaller": - wm.StartInfobox95("Internet Explorer Installation", "Installation Failed: The INF file was not found", Properties.Resources.Win95Error); + wm.StartInfobox95("Internet Explorer Installer", "Installation Failed: The INF file was not found", InfoboxType.Error, InfoboxButtons.OK); break; case "addressbook": @@ -674,7 +674,7 @@ namespace TimeHACK.OS.Win95.Win95Apps 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); + wm.StartInfobox95("Windows Explorer", "This directory already exists", InfoboxType.Info, InfoboxButtons.OK); } else { Directory.CreateDirectory(Path.Combine(CurrentDirectory, "New Folder")); SaveDirectoryInfo(CurrentDirectory, "New Folder", false, "New Folder", true); @@ -703,7 +703,7 @@ namespace TimeHACK.OS.Win95.Win95Apps { if (txtSave.Text == "") { - wm.StartInfobox95("Windows Explorer", "Please enter a filename", Properties.Resources.Win95Info); + wm.StartInfobox95("Windows Explorer", "Please enter a filename", InfoboxType.Info, InfoboxButtons.OK); } else { @@ -732,7 +732,7 @@ namespace TimeHACK.OS.Win95.Win95Apps { if (!FileOrDirectoryExists(mainView.FocusedItem.ImageKey)) { - wm.StartInfobox95("Windows Explorer", "This directory doesn't exist", Properties.Resources.Win95Info); + wm.StartInfobox95("Windows Explorer", "This directory doesn't exist", InfoboxType.Info, InfoboxButtons.OK); } else { @@ -785,19 +785,19 @@ namespace TimeHACK.OS.Win95.Win95Apps setText = e.Label; if (setText == "") { - wm.StartInfobox95("Windows Explorer", "Please enter a new directory name", Properties.Resources.Win95Info); + wm.StartInfobox95("Windows Explorer", "Please enter a new directory name", InfoboxType.Info, InfoboxButtons.OK); } else { if (Directory.Exists(setText)) { - wm.StartInfobox95("Windows Explorer", "That directory already exists.", Properties.Resources.Win95Info); + wm.StartInfobox95("Windows Explorer", "That directory already exists.", InfoboxType.Info, InfoboxButtons.OK); } else { if (File.Exists(setText)) { - wm.StartInfobox95("Windows Explorer", "That file already exists.", Properties.Resources.Win95Info); + wm.StartInfobox95("Windows Explorer", "That file already exists.", InfoboxType.Info, InfoboxButtons.OK); } else { diff --git a/TimeHACK.Main/TitleScreen.cs b/TimeHACK.Main/TitleScreen.cs index 194776c..6ee2ef1 100644 --- a/TimeHACK.Main/TitleScreen.cs +++ b/TimeHACK.Main/TitleScreen.cs @@ -22,10 +22,7 @@ namespace TimeHACK public static Windows98 frm98; public static string username; public static string progress = "95"; - - public static DirectoryInfo thfolder; - public static DirectoryInfo datafolder; - public static DirectoryInfo profilefolder; + public static NewGameDialog newGameBox; public static LoadGameDialog loadGameBox; @@ -138,31 +135,20 @@ namespace TimeHACK // When the TitleScreen Loads private void TitleScreen_Load(object sender, EventArgs e) { - if (!Directory.Exists(GameDirectory)) - Directory.CreateDirectory(GameDirectory); - thfolder = new DirectoryInfo(GameDirectory); - - string Data = Path.Combine(thfolder.FullName, "Data"); - if (!Directory.Exists(Data)) - Directory.CreateDirectory(Data); - - string Profiles = Path.Combine(thfolder.FullName, "Profiles"); - if (!Directory.Exists(Profiles)) - Directory.CreateDirectory(Profiles); - - Resources.google.Save(Path.Combine(Data, "google.jpg")); - profilefolder = Directory.CreateDirectory(Path.Combine(thfolder.FullName, "\\Profiles")); - + Directory.CreateDirectory(GameDirectory); + Directory.CreateDirectory(DataDirectory); + Directory.CreateDirectory(AllProfilesDirectory); + Resources.google.Save(Path.Combine(DataDirectory, "google.jpg")); // Set GameVersion gameversion.Text = "Alpha 1.0.3"; // Initialize Font - File.WriteAllBytes(Data + "\\LeviWindows.ttf", Resources.LeviWindows); - File.WriteAllBytes(Data + "\\windows_command_prompt.ttf", Resources.windows_command_prompt); - pfc.AddFontFile(Data + "\\LeviWindows.ttf"); - pfc.AddFontFile(Data + "\\windows_command_prompt.ttf"); + File.WriteAllBytes(DataDirectory + "\\LeviWindows.ttf", Resources.LeviWindows); + File.WriteAllBytes(DataDirectory + "\\windows_command_prompt.ttf", Resources.windows_command_prompt); + pfc.AddFontFile(DataDirectory + "\\LeviWindows.ttf"); + pfc.AddFontFile(DataDirectory + "\\windows_command_prompt.ttf"); gameversion.Font = new Font(pfc.Families[0], 16F, FontStyle.Bold, GraphicsUnit.Point, (0)); ProgramsToolStripMenuItem.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); DocumentsToolStripMenuItem.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); |
