diff options
| author | AShifter <[email protected]> | 2017-03-26 11:28:05 -0600 |
|---|---|---|
| committer | AShifter <[email protected]> | 2017-03-26 11:28:24 -0600 |
| commit | f16f3a8a3df33f46c4ec6c864447cced97c0f034 (patch) | |
| tree | 6c06d045bd7afa16c89b63c01c41b2ace019ff8b /TimeHACK.Engine/WindowManager.cs | |
| parent | a7128e18c33b39b6253f9af3022fb1a47b1ac5f1 (diff) | |
| download | histacom2-f16f3a8a3df33f46c4ec6c864447cced97c0f034.tar.gz histacom2-f16f3a8a3df33f46c4ec6c864447cced97c0f034.tar.bz2 histacom2-f16f3a8a3df33f46c4ec6c864447cced97c0f034.zip | |
Finished WindowManager.cs
I HOPE YOU LIKE IT HONEYFRY
Diffstat (limited to 'TimeHACK.Engine/WindowManager.cs')
| -rw-r--r-- | TimeHACK.Engine/WindowManager.cs | 42 |
1 files changed, 33 insertions, 9 deletions
diff --git a/TimeHACK.Engine/WindowManager.cs b/TimeHACK.Engine/WindowManager.cs index 540dddd..fc9bd94 100644 --- a/TimeHACK.Engine/WindowManager.cs +++ b/TimeHACK.Engine/WindowManager.cs @@ -1,20 +1,44 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using TimeHACK.Engine.Template; +using System.Windows.Forms; namespace TimeHACK.Engine { - class WindowManager + public class WindowManager { - private void startWinClassic(String title, int width, int height) + public void startWinClassic(UserControl content, String title, PictureBox icon, Boolean MaxButton, Boolean MinButton) { + // Setup Window WinClassic app = new WinClassic(); app.Title.Text = title; - app.Width = width + 8; - app.Height = height + 26; + app.Width = content.Width + 8; + app.Height = content.Height + 26; + content.Parent = app.programContent; + content.BringToFront(); + content.Dock = DockStyle.Fill; + if (icon == null) + { + icon = app.programIcon; + icon.Image = Properties.Resources.nullIcon; + } + app.programIcon.Image = icon.Image; + + // Check if Max button is enabled + if (MaxButton == false) + { + app.maximizebutton.Visible = false; + } + + // Check if Min button is enabled + if (MinButton == false) + { + app.minimizebutton.Visible = false; + } + + // Show the app + app.Show(); + + } } -} +}
\ No newline at end of file |
