diff options
| author | lempamo <[email protected]> | 2017-04-09 14:35:36 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-04-09 14:35:36 -0400 |
| commit | dd17c932df21f5344cf3683b0bab8e943e5975cc (patch) | |
| tree | 45c1bf482e45ddd7a2f7a2b61476e7a3c7da782c /TimeHACK.Engine/WindowManager.cs | |
| parent | f8f9eaefb1dcfbc28e052637a535c6f124af3e95 (diff) | |
| parent | fbdca852b1fc901db6a09fc22fd523160489f7ed (diff) | |
| download | histacom2-dd17c932df21f5344cf3683b0bab8e943e5975cc.tar.gz histacom2-dd17c932df21f5344cf3683b0bab8e943e5975cc.tar.bz2 histacom2-dd17c932df21f5344cf3683b0bab8e943e5975cc.zip | |
Merge pull request #37 from lempamo/master
Master
Diffstat (limited to 'TimeHACK.Engine/WindowManager.cs')
| -rw-r--r-- | TimeHACK.Engine/WindowManager.cs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/TimeHACK.Engine/WindowManager.cs b/TimeHACK.Engine/WindowManager.cs index 65a0ec5..4c1eefe 100644 --- a/TimeHACK.Engine/WindowManager.cs +++ b/TimeHACK.Engine/WindowManager.cs @@ -10,7 +10,7 @@ namespace TimeHACK.Engine public static System.Drawing.Text.PrivateFontCollection pfc = new System.Drawing.Text.PrivateFontCollection(); - public WinClassic startWin95(UserControl content, String title, PictureBox icon, Boolean MaxButton, Boolean MinButton) + public WinClassic startWin95(UserControl content, String title, Image icon, Boolean MaxButton, Boolean MinButton) { // Setup Window WinClassic app = new WinClassic(); @@ -20,7 +20,7 @@ namespace TimeHACK.Engine app.Height = content.Height + 26; // Initialize Font pfc.AddFontFile(AppDomain.CurrentDomain.BaseDirectory + "\\LeviWindows.ttf"); - Font fnt = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); + Font fnt = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((0))); app.fnt = fnt; app.Title.Font = new Font(pfc.Families[0], 16F, FontStyle.Bold, GraphicsUnit.Point, ((0))); // Setup UC @@ -29,12 +29,8 @@ namespace TimeHACK.Engine content.Dock = DockStyle.Fill; // Check if icon is null - if (icon == null) - { - icon = app.programIcon; - icon.Image = Engine.Properties.Resources.nullIcon; - } - app.programIcon.Image = icon.Image; + if (icon == null) app.programIcon.Image = Engine.Properties.Resources.nullIcon; + else app.programIcon.Image = icon; // Check if Max button is enabled and set proper X for Min button if (MaxButton == false) |
