aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Engine/WindowManager/ShiftWM.cs
diff options
context:
space:
mode:
authorIBMPCDOS5 <[email protected]>2017-09-24 15:10:21 -0500
committerGitHub <[email protected]>2017-09-24 15:10:21 -0500
commit554a97739a89345613e5ca6fcdb9022ef80e665e (patch)
tree035533bf35faa4c1480adc8ef033fd8d9c65c8c5 /ShiftOS.Engine/WindowManager/ShiftWM.cs
parent061ce54709db3157ae3366607420639d34942c7e (diff)
parent0a552e395477d2bb4c90e12624d11b28545a4933 (diff)
downloadshiftos-rewind-554a97739a89345613e5ca6fcdb9022ef80e665e.tar.gz
shiftos-rewind-554a97739a89345613e5ca6fcdb9022ef80e665e.tar.bz2
shiftos-rewind-554a97739a89345613e5ca6fcdb9022ef80e665e.zip
Merge pull request #5 from AShifter/master
Update WM
Diffstat (limited to 'ShiftOS.Engine/WindowManager/ShiftWM.cs')
-rw-r--r--ShiftOS.Engine/WindowManager/ShiftWM.cs25
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;
}