private void RefreshCell(int posX, int posY)
        {
            int   drawX    = posX * _cellSize;
            int   drawY    = posY * _cellSize;
            Point position = new Point(posX, posY);

            using (Graphics graphics = Graphics.FromImage(_backGroundImage))
            {
                switch (_puzzleBoard.GetState(new Point(posX, posY)))
                {
                case PuzzleCellStateTypes.NotMarked:
                    graphics.FillRectangle(Brushes.White, drawX, drawY, _cellSize, _cellSize);
                    break;

                case PuzzleCellStateTypes.Filled:
                    graphics.FillRectangle(Brushes.Black, drawX, drawY, _cellSize, _cellSize);
                    break;

                case PuzzleCellStateTypes.Empty:
                    graphics.FillRectangle(Brushes.Gainsboro, drawX, drawY, _cellSize, _cellSize);
                    graphics.DrawLine(new Pen(Color.Gray), drawX, drawY, drawX + _cellSize, drawY + _cellSize);
                    graphics.DrawLine(new Pen(Color.Gray), drawX, drawY + _cellSize, drawX + _cellSize, drawY);
                    break;

                case PuzzleCellStateTypes.Outside:
                    graphics.FillRectangle(Brushes.DarkBlue, drawX, drawY, _cellSize, _cellSize);
                    graphics.DrawLine(new Pen(Color.White), drawX, drawY, drawX + _cellSize, drawY + _cellSize);
                    graphics.DrawLine(new Pen(Color.White), drawX, drawY + _cellSize, drawX + _cellSize, drawY);
                    break;
                }
                if (_cbxHighlightErrors.Checked && _puzzleBoard.IsWrong(position))
                {
                    Pen errorPositionPen = new Pen(Brushes.Red, 3);
                    graphics.DrawRectangle(errorPositionPen, drawX + 2, drawY + 2, _cellSize - 4, _cellSize - 4);
                }
            }
        }