diff options
| author | lempamo <[email protected]> | 2017-10-24 19:21:45 -0400 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-10-24 19:21:45 -0400 |
| commit | 57817b7534a620841c9a825884a6f5e7ffc2f219 (patch) | |
| tree | 92645540179f49f795fe1f97f0acdb9a80b339df /Histacom2.Engine/WindowManager.cs | |
| parent | aff052b475abc5d4035369a85fa471f62cad021b (diff) | |
| download | histacom2-57817b7534a620841c9a825884a6f5e7ffc2f219.tar.gz histacom2-57817b7534a620841c9a825884a6f5e7ffc2f219.tar.bz2 histacom2-57817b7534a620841c9a825884a6f5e7ffc2f219.zip | |
some hack4 stuff
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 12f7954..dec647f 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(6, 7); } else app.programIcon.Image = icon; |
