diff options
| author | Alex-TIMEHACK <[email protected]> | 2017-09-23 17:25:22 +0100 |
|---|---|---|
| committer | Alex-TIMEHACK <[email protected]> | 2017-09-23 17:25:22 +0100 |
| commit | 350e749bb9eab16efe753f9b8fd703b52a97f808 (patch) | |
| tree | 9c90ec1a8148d66d9ff8605710a992e5e14a6b7e /Histacom2.Engine/WindowManager.cs | |
| parent | 84ef033af262343febc3f84471233e18bc6b502e (diff) | |
| parent | 1ee3e00f8f0ee879fce4edf7d1ba9889335bc826 (diff) | |
| download | histacom2-350e749bb9eab16efe753f9b8fd703b52a97f808.tar.gz histacom2-350e749bb9eab16efe753f9b8fd703b52a97f808.tar.bz2 histacom2-350e749bb9eab16efe753f9b8fd703b52a97f808.zip | |
Merge branch 'master' of https://github.com/Histacom2-Devs/Histacom2
Diffstat (limited to 'Histacom2.Engine/WindowManager.cs')
| -rw-r--r-- | Histacom2.Engine/WindowManager.cs | 46 |
1 files changed, 42 insertions, 4 deletions
diff --git a/Histacom2.Engine/WindowManager.cs b/Histacom2.Engine/WindowManager.cs index 2306d5d..4f4951c 100644 --- a/Histacom2.Engine/WindowManager.cs +++ b/Histacom2.Engine/WindowManager.cs @@ -10,10 +10,43 @@ namespace Histacom2.Engine { public static System.Drawing.Text.PrivateFontCollection pfc = new System.Drawing.Text.PrivateFontCollection(); - public WinClassic StartWin95(UserControl content, string title, Image icon, bool MaxButton, bool MinButton, bool ShowApplicationAsDialog = false, bool resize = true) + public WinClassic Init(UserControl content, string title, Image icon, bool MaxButton, bool MinButton, bool ShowApplicationAsDialog = false, bool resize = true) { + WinClassic app = null; // Setup Window - WinClassic app = new WinClassic(); + switch (SaveSystem.CurrentSave.CurrentOS) + { + case "95": + { + app = new WinClassic(); + break; + } + case "98": + { + app = new WinClassic(); + break; + } + case "ME": + { + app = new WinClassic(); + break; + } + case "2000": + { + app = new WinClassic(); + break; + } + case "XP": + { + // app = new WinXP(); + break; + } + default: + { + app = new WinClassic(); + break; + } + } app.Text = title; app.Title.Text = title; app.Width = content.Width + 8; @@ -27,6 +60,7 @@ namespace Histacom2.Engine content.Parent = app.programContent; content.BringToFront(); content.Dock = DockStyle.Fill; + app.progContent = content; // Check if icon is null if (icon == null) @@ -76,6 +110,10 @@ namespace Histacom2.Engine if (ShowApplicationAsDialog == false) { app.Show(); } else { app.ShowDialog(); } return app; } + + // A THING TM + + // A THING TM public WinClassic StartInfobox95(string title, string text, InfoboxType type, InfoboxButtons btns) { @@ -84,7 +122,7 @@ namespace Histacom2.Engine app.infoText.Text = text; app.infoText.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((0))); - return StartWin95(app, title, null, false, false, resize: false); + return Init(app, title, null, false, false, resize: false); } public WinClassic StartAboutBox95(string shortname, string longname, Image appicon) @@ -94,7 +132,7 @@ namespace Histacom2.Engine 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, resize: false); + return Init(uc, "About " + shortname, null, false, false, resize: false); } } } |
