public FormMain() { GAME = GameCreate.GetInstance(); scoreSystem = ScoreSystem.GetInstance(); CheckForIllegalCrossThreadCalls = false; InitializeComponent(); this.StyleManager = mainStyleManager; GAMEConsol = new ConsolSlidingPanel(ref pnlConsolMain, 0, 400); }
public FormMain() { GAME = GameCreate.GetInstance(); scoreSystem = ScoreSystem.GetInstance(); CheckForIllegalCrossThreadCalls = false; InitializeComponent(); #region Font Settings byte[] fontData = Properties.Resources.Let_s_go_Digital_Regular; IntPtr fontPtr = System.Runtime.InteropServices.Marshal.AllocCoTaskMem(fontData.Length); uint dummy = 0; System.Runtime.InteropServices.Marshal.Copy(fontData, 0, fontPtr, fontData.Length); fonts.AddMemoryFont(fontPtr, Properties.Resources.Let_s_go_Digital_Regular.Length); AddFontMemResourceEx(fontPtr, (uint)Properties.Resources.Let_s_go_Digital_Regular.Length, IntPtr.Zero, ref dummy); System.Runtime.InteropServices.Marshal.FreeCoTaskMem(fontPtr); myFont = new Font(fonts.Families[0], 14.25F); #endregion this.StyleManager = mainStyleManager; GAMEConsol = new ConsolSlidingPanel(ref pnlConsolMain, 0, 400); }