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

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

                _DrawingBuffer?.Dispose();
                _DrawingBuffer = CreateDrawing1(rcClient);
            }
        }