diff options
| author | JayXKanz666 <[email protected]> | 2017-03-29 03:53:18 +0200 |
|---|---|---|
| committer | JayXKanz666 <[email protected]> | 2017-03-29 03:53:18 +0200 |
| commit | d009e515e32048ec44116fcc7acc18b53de18e80 (patch) | |
| tree | aa49b0c22e47f8e53e1cdc80a5883e50feb28fca /TimeHACK.Engine/WindowManager.cs | |
| parent | e5e18132058dc2add78b6d3f06bf1de84ca08d50 (diff) | |
| download | histacom2-d009e515e32048ec44116fcc7acc18b53de18e80.tar.gz histacom2-d009e515e32048ec44116fcc7acc18b53de18e80.tar.bz2 histacom2-d009e515e32048ec44116fcc7acc18b53de18e80.zip | |
added font to WM
Diffstat (limited to 'TimeHACK.Engine/WindowManager.cs')
| -rw-r--r-- | TimeHACK.Engine/WindowManager.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/TimeHACK.Engine/WindowManager.cs b/TimeHACK.Engine/WindowManager.cs index 78443ed..193985a 100644 --- a/TimeHACK.Engine/WindowManager.cs +++ b/TimeHACK.Engine/WindowManager.cs @@ -7,7 +7,9 @@ namespace TimeHACK.Engine { public class WindowManager { - public WinClassic startWinClassic(UserControl content, String title, PictureBox icon, Boolean MaxButton, Boolean MinButton, Font fnt) + public static System.Drawing.Text.PrivateFontCollection pfc = new System.Drawing.Text.PrivateFontCollection(); + + public WinClassic startWinClassic(UserControl content, String title, PictureBox icon, Boolean MaxButton, Boolean MinButton) { // Setup Window WinClassic app = new WinClassic(); @@ -15,10 +17,16 @@ namespace TimeHACK.Engine app.Title.Text = title; app.Width = content.Width + 8; 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))); app.fnt = fnt; + // Setup UC content.Parent = app.programContent; content.BringToFront(); content.Dock = DockStyle.Fill; + + // Check if icon is null if (icon == null) { icon = app.programIcon; |
