private static void ApplicationOnIdle(GameForm gameForm)
        {
            NativeMessage message;

            while (!PeekMessage(out message, _handleRef, 0, 0, 0))
            {
                gameForm.Render();
            }
        }
        private static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(true);

            var gameForm = new GameForm();

            Application.Idle += (sender, args) => ApplicationOnIdle(gameForm);
            Application.Run(gameForm);
        }