aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Engine/WindowManager/ShiftWM.cs
diff options
context:
space:
mode:
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;
}