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/OS/Win95/Win95Apps | |
| parent | 71ccea956dc85e8b293dc8a30fbbf91b2709897f (diff) | |
| download | histacom2-077fef3baf82e23a4a03bb3c73d83f8d8103fdb9.tar.gz histacom2-077fef3baf82e23a4a03bb3c73d83f8d8103fdb9.tar.bz2 histacom2-077fef3baf82e23a4a03bb3c73d83f8d8103fdb9.zip | |
better infoboxes
Diffstat (limited to 'TimeHACK.Main/OS/Win95/Win95Apps')
4 files changed, 22 insertions, 22 deletions
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); |
