aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Engine/WindowManager/ShiftWM.cs
diff options
context:
space:
mode:
authorIBMPCDOS5 <[email protected]>2017-09-24 13:34:14 -0500
committerGitHub <[email protected]>2017-09-24 13:34:14 -0500
commit061ce54709db3157ae3366607420639d34942c7e (patch)
treec6a440b7ed182df8f8d1e5d0fdf55e28cf74055f /ShiftOS.Engine/WindowManager/ShiftWM.cs
parent2992686ec723fa4c854b6de27007a284b484a92e (diff)
parent9107510c4985ceb781640163bbb82ab6de2fa35e (diff)
downloadshiftos-rewind-061ce54709db3157ae3366607420639d34942c7e.tar.gz
shiftos-rewind-061ce54709db3157ae3366607420639d34942c7e.tar.bz2
shiftos-rewind-061ce54709db3157ae3366607420639d34942c7e.zip
Merge pull request #4 from AShifter/master
Add proper WM and Remove old source
Diffstat (limited to 'ShiftOS.Engine/WindowManager/ShiftWM.cs')
-rw-r--r--ShiftOS.Engine/WindowManager/ShiftWM.cs37
1 files changed, 37 insertions, 0 deletions
diff --git a/ShiftOS.Engine/WindowManager/ShiftWM.cs b/ShiftOS.Engine/WindowManager/ShiftWM.cs
new file mode 100644
index 0000000..373a87b
--- /dev/null
+++ b/ShiftOS.Engine/WindowManager/ShiftWM.cs
@@ -0,0 +1,37 @@
+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)
+ {
+ // Setup Window
+ ShiftWindow app = new ShiftWindow();
+ app.Text = title;
+ app.Title.Text = title;
+ 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)
+ /*
+ if (icon == null)
+ {
+ app.programIcon.Hide();
+ app.programIcon.Image = Engine.Properties.Resources.nullIcon;
+ app.Title.Location = new Point(2, 1);
+ }
+ else app.programIcon.Image = icon;
+ */
+ app.Show();
+ return app;
+ }
+ }
+}