internal void RecreateGame(Rectangle rcClient)
        {
            var game        = new StarsControl(rcClient.Width, rcClient.Height, _starsSettings);
            var gamePainter = new GamePainter(game, rcClient);

            AssignComponents(game, gamePainter, rcClient);
        }
        private void AssignComponents(StarsControl game, GamePainter gamePainter, Rectangle rcClient)
        {
            lock (_lock)
            {
                _game?.Dispose();
                _game        = game;
                _gamePainter = gamePainter;

                _DrawingBuffer?.Dispose();
                _DrawingBuffer = CreateDrawing1(rcClient);
            }
        }
Beispiel #3
0
 public GamePainter(StarsControl game, Rectangle rcClient)
 {
     _game     = game;
     _rcClient = rcClient;
 }