diff options
| author | Alex-TIMEHACK <[email protected]> | 2017-11-04 09:50:43 +0000 |
|---|---|---|
| committer | Alex-TIMEHACK <[email protected]> | 2017-11-04 09:50:43 +0000 |
| commit | f933ce9b841a5f302066336877f86119de034eb4 (patch) | |
| tree | 50e23551bae5ade3a263d9c1c054fb326a7ab5a6 /Histacom2.Engine/WindowManager.cs | |
| parent | 6ab1468786f1e865e9ff408d32149f9c9620d844 (diff) | |
| parent | 382f0167714bbcad00ab710fe7dcfa05eaeb88ac (diff) | |
| download | histacom2-f933ce9b841a5f302066336877f86119de034eb4.tar.gz histacom2-f933ce9b841a5f302066336877f86119de034eb4.tar.bz2 histacom2-f933ce9b841a5f302066336877f86119de034eb4.zip | |
Updated my fork!
Conflicts:
Histacom2/TitleScreen.Designer.cs
Histacom2/TitleScreen.cs
Diffstat (limited to 'Histacom2.Engine/WindowManager.cs')
| -rw-r--r-- | Histacom2.Engine/WindowManager.cs | 47 |
1 files changed, 15 insertions, 32 deletions
diff --git a/Histacom2.Engine/WindowManager.cs b/Histacom2.Engine/WindowManager.cs index 04de392..03fe91b 100644 --- a/Histacom2.Engine/WindowManager.cs +++ b/Histacom2.Engine/WindowManager.cs @@ -10,38 +10,21 @@ namespace Histacom2.Engine { public static System.Drawing.Text.PrivateFontCollection pfc = new System.Drawing.Text.PrivateFontCollection(); + /// <summary> + /// Creates and returns a WinClassic window. + /// </summary> + /// <param name="content">The UserControl to put inside the window.</param> + /// <param name="title">The name of the window.</param> + /// <param name="icon">The window's icon. If set to null, then the title moves over to compensate.</param> + /// <param name="MaxButton">Whether or not the maximize button is shown.</param> + /// <param name="MinButton">Whether or not the minimize button is shown.</param> + /// <param name="ShowApplicationAsDialog">Whether or not to interrupt all other processes while this window is open.</param> + /// <param name="resize">Whether or not this window is resizable.</param> + /// <returns></returns> public WinClassic Init(UserControl content, string title, Image icon, bool MaxButton, bool MinButton, bool ShowApplicationAsDialog = false, bool resize = true) { - WinClassic app = null; - // Setup Window - 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; - } - default: - { - app = new WinClassic(); - break; - } - } + WinClassic app = new WinClassic(); + app.Text = title; app.Title.Text = title; app.Width = content.Width + 8; @@ -128,8 +111,8 @@ namespace Histacom2.Engine if (icon == null) { app.programIcon.Hide(); - app.programIcon.Image = Engine.Properties.Resources.nullIcon; - app.programname.Location = new Point(2, 1); + app.programIcon.Image = Properties.Resources.nullIcon; + app.programname.Location = new Point(3, 6); } else app.programIcon.Image = icon; |
