Exemplo n.º 1
0
        public FormMain()
        {
            GAME        = GameCreate.GetInstance();
            scoreSystem = ScoreSystem.GetInstance();
            CheckForIllegalCrossThreadCalls = false;
            InitializeComponent();



            this.StyleManager = mainStyleManager;

            GAMEConsol = new ConsolSlidingPanel(ref pnlConsolMain, 0, 400);
        }
Exemplo n.º 2
0
 public static GameCreate GetInstance()
 {
     if (_ == null)
     {
         lock (_lockObject)
         {
             if (_ == null)
             {
                 _ = new GameCreate();
             }
         }
     }
     return(_);
 }
Exemplo n.º 3
0
        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);
        }