From 57817b7534a620841c9a825884a6f5e7ffc2f219 Mon Sep 17 00:00:00 2001 From: lempamo Date: Tue, 24 Oct 2017 19:21:45 -0400 Subject: some hack4 stuff --- Histacom2.Engine/WindowManager.cs | 47 +++++++++++++-------------------------- 1 file changed, 15 insertions(+), 32 deletions(-) (limited to 'Histacom2.Engine/WindowManager.cs') 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(); + /// + /// Creates and returns a WinClassic window. + /// + /// The UserControl to put inside the window. + /// The name of the window. + /// The window's icon. If set to null, then the title moves over to compensate. + /// Whether or not the maximize button is shown. + /// Whether or not the minimize button is shown. + /// Whether or not to interrupt all other processes while this window is open. + /// Whether or not this window is resizable. + /// 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; -- cgit v1.2.3