diff options
Diffstat (limited to 'TimeHACK.Engine/WindowManager.cs')
| -rw-r--r-- | TimeHACK.Engine/WindowManager.cs | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/TimeHACK.Engine/WindowManager.cs b/TimeHACK.Engine/WindowManager.cs index 193985a..ceca43f 100644 --- a/TimeHACK.Engine/WindowManager.cs +++ b/TimeHACK.Engine/WindowManager.cs @@ -1,7 +1,7 @@ using System; -using TimeHACK.Engine.Template; using System.Windows.Forms; using System.Drawing; +using TimeHACK.Engine.Template; namespace TimeHACK.Engine { @@ -9,7 +9,8 @@ namespace TimeHACK.Engine { public static System.Drawing.Text.PrivateFontCollection pfc = new System.Drawing.Text.PrivateFontCollection(); - public WinClassic startWinClassic(UserControl content, String title, PictureBox icon, Boolean MaxButton, Boolean MinButton) + + public WinClassic startWin95(UserControl content, String title, Image icon, Boolean MaxButton, Boolean MinButton) { // Setup Window WinClassic app = new WinClassic(); @@ -19,8 +20,9 @@ namespace TimeHACK.Engine app.Height = content.Height + 26; // Initialize Font pfc.AddFontFile(AppDomain.CurrentDomain.BaseDirectory + "\\LeviWindows.ttf"); - Font fnt = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); + Font fnt = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((0))); app.fnt = fnt; + app.Title.Font = new Font(pfc.Families[0], 16F, FontStyle.Bold, GraphicsUnit.Point, ((0))); // Setup UC content.Parent = app.programContent; content.BringToFront(); @@ -29,10 +31,11 @@ namespace TimeHACK.Engine // Check if icon is null if (icon == null) { - icon = app.programIcon; - icon.Image = Properties.Resources.nullIcon; + app.programIcon.Hide(); + app.programIcon.Image = Engine.Properties.Resources.nullIcon; + app.Title.Location = new Point(2, 1); } - app.programIcon.Image = icon.Image; + else app.programIcon.Image = icon; // Check if Max button is enabled and set proper X for Min button if (MaxButton == false) @@ -55,5 +58,25 @@ namespace TimeHACK.Engine return app; } + + public Infobox95 startInfobox95(String title, String text, Image erroricon) + { + Infobox95 app = new Infobox95(); + app.Title.Text = title; + app.Text = title; + app.infoText.Text = text; + app.Show(); + return app; + } + + 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); + } } -}
\ No newline at end of file +} |
