From 71ec75dc79e2b5632216dc801dfeaf7510e25210 Mon Sep 17 00:00:00 2001 From: JayXKanz666 Date: Sun, 2 Jul 2017 22:44:11 +0200 Subject: Added lots of features to WinClassicTerminal.cs -Added CMD redirection -Added menubar that was missing -And more (look at the source :P) --- TimeHACK.Engine/BSODCreator.cs | 2 +- TimeHACK.Engine/Paintbrush.cs | 2 +- TimeHACK.Engine/WindowManager.cs | 11 ++++++----- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'TimeHACK.Engine') diff --git a/TimeHACK.Engine/BSODCreator.cs b/TimeHACK.Engine/BSODCreator.cs index 4e25fea..6c49b7b 100644 --- a/TimeHACK.Engine/BSODCreator.cs +++ b/TimeHACK.Engine/BSODCreator.cs @@ -21,7 +21,7 @@ namespace TimeHACK.Engine public Win9XBSOD throw9XBSOD(bool except, BSODCauses type) { - pfc.AddFontFile(SaveSystem.GameDirectory + "\\Data\\windows_command_prompt.ttf"); + pfc.AddFontFile($@"{SaveSystem.GameDirectory}\Data\windows_command_prompt.ttf"); Win9XBSOD bsod = new Win9XBSOD(); foreach (Control ctrl in bsod.Controls) { ctrl.Font = new System.Drawing.Font(pfc.Families[0], 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((0))); diff --git a/TimeHACK.Engine/Paintbrush.cs b/TimeHACK.Engine/Paintbrush.cs index b343100..1b442bc 100644 --- a/TimeHACK.Engine/Paintbrush.cs +++ b/TimeHACK.Engine/Paintbrush.cs @@ -11,7 +11,7 @@ namespace TimeHACK.Engine public class Paintbrush { - public static void paintClassicBorders(object sender, PaintEventArgs e, int borderwidth) + public static void PaintClassicBorders(object sender, PaintEventArgs e, int borderwidth) { ControlPaint.DrawBorder(e.Graphics, ((Control)sender).ClientRectangle, SystemColors.ControlLightLight, borderwidth, ButtonBorderStyle.Outset, diff --git a/TimeHACK.Engine/WindowManager.cs b/TimeHACK.Engine/WindowManager.cs index aa9d941..9e96673 100644 --- a/TimeHACK.Engine/WindowManager.cs +++ b/TimeHACK.Engine/WindowManager.cs @@ -10,7 +10,7 @@ namespace TimeHACK.Engine { public static System.Drawing.Text.PrivateFontCollection pfc = new System.Drawing.Text.PrivateFontCollection(); - public WinClassic startWin95(UserControl content, String title, Image icon, Boolean MaxButton, Boolean MinButton, Boolean ShowApplicationAsDialog = false) + public WinClassic StartWin95(UserControl content, String title, Image icon, Boolean MaxButton, Boolean MinButton, Boolean ShowApplicationAsDialog = false) { // Setup Window WinClassic app = new WinClassic(); @@ -72,23 +72,24 @@ namespace TimeHACK.Engine return app; } - public WinClassic startInfobox95(String title, String text, Image erroricon) + public WinClassic StartInfobox95(String title, String text, Image erroricon) { Infobox95 app = new Infobox95(); app.infoText.Text = text; + SoundPlayer sp = new SoundPlayer(Properties.Resources.CHORD); sp.Play(); - return startWin95(app, title, null, false, false); + return StartWin95(app, title, null, false, false); } - public WinClassic startAboutBox95(String shortname, String longname, Image appicon) + public WinClassic StartAboutBox95(String shortname, String longname, Image appicon) { AboutBox95 uc = new AboutBox95(); uc.pictureBox1.Image = appicon; uc.textBox1.Text = longname + "\r\nWindows 95\r\nCopyright © 1981-1995 Microsoft Corp."; uc.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((0))); - return startWin95(uc, "About " + shortname, null, false, false); + return StartWin95(uc, "About " + shortname, null, false, false); } } } -- cgit v1.2.3