From 0a552e395477d2bb4c90e12624d11b28545a4933 Mon Sep 17 00:00:00 2001 From: AShifter Date: Sun, 24 Sep 2017 13:56:11 -0600 Subject: Update WM It's pretty much done. Pair with DE, and serve hot. --- ShiftOS.Engine/WindowManager/ShiftWM.cs | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'ShiftOS.Engine/WindowManager/ShiftWM.cs') diff --git a/ShiftOS.Engine/WindowManager/ShiftWM.cs b/ShiftOS.Engine/WindowManager/ShiftWM.cs index 373a87b..d30224c 100644 --- a/ShiftOS.Engine/WindowManager/ShiftWM.cs +++ b/ShiftOS.Engine/WindowManager/ShiftWM.cs @@ -1,12 +1,11 @@ -using System.Windows.Forms; +using System.Drawing; +using System.Windows.Forms; namespace ShiftOS.Engine.WindowManager { public class ShiftWM { - public static System.Drawing.Text.PrivateFontCollection pfc = new System.Drawing.Text.PrivateFontCollection(); - - public ShiftWindow Init(UserControl content, string title, bool ShowAsInfobox = false, bool resize = true) + public ShiftWindow Init(UserControl content, string title, Image icon, bool ShowAsInfobox = false, bool resize = true) { // Setup Window ShiftWindow app = new ShiftWindow(); @@ -15,21 +14,19 @@ namespace ShiftOS.Engine.WindowManager app.Width = content.Width + app.left.Width + app.right.Width; app.Height = content.Height + app.bottom.Height + app.top.Height; - // Setup UC - content.Parent = app.programContent; - content.BringToFront(); - content.Dock = DockStyle.Fill; - - // Check if icon is null (NYI) - /* + // Icon Setup if (icon == null) { app.programIcon.Hide(); - app.programIcon.Image = Engine.Properties.Resources.nullIcon; - app.Title.Location = new Point(2, 1); + app.programIcon.Image = Properties.Resources.nullIcon; + app.Title.Location = new Point(2, 7); } else app.programIcon.Image = icon; - */ + + // Setup UC + content.Parent = app.programContent; + content.BringToFront(); + content.Dock = DockStyle.Fill; app.Show(); return app; } -- cgit v1.2.3