diff options
| author | AShifter <[email protected]> | 2017-09-24 13:56:11 -0600 |
|---|---|---|
| committer | AShifter <[email protected]> | 2017-09-24 13:56:11 -0600 |
| commit | 0a552e395477d2bb4c90e12624d11b28545a4933 (patch) | |
| tree | 035533bf35faa4c1480adc8ef033fd8d9c65c8c5 /ShiftOS.Engine/WindowManager/ShiftWM.cs | |
| parent | 9107510c4985ceb781640163bbb82ab6de2fa35e (diff) | |
| download | shiftos-rewind-0a552e395477d2bb4c90e12624d11b28545a4933.tar.gz shiftos-rewind-0a552e395477d2bb4c90e12624d11b28545a4933.tar.bz2 shiftos-rewind-0a552e395477d2bb4c90e12624d11b28545a4933.zip | |
Update WM
It's pretty much done. Pair with DE, and serve hot.
Diffstat (limited to 'ShiftOS.Engine/WindowManager/ShiftWM.cs')
| -rw-r--r-- | ShiftOS.Engine/WindowManager/ShiftWM.cs | 25 |
1 files changed, 11 insertions, 14 deletions
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; } |
