public void WallField_WallFieldCreated(WallField sender)
 {
     Brush wallFieldBrush = new SolidBrush(Properties.GraphicColorSettings.Default.CurrentWallFieldColor);
     int wallFieldX = graphicLocationX + sender.Col * this.fieldSize;
     int wallFieldY = graphicLocationY + sender.Row * this.fieldSize;
     lock (this.matrixGraphic)
     {
         this.matrixGraphic.FillRectangle
             (wallFieldBrush, wallFieldX, wallFieldY, this.fieldSize, this.fieldSize);
     }
     wallFieldBrush.Dispose();
 }
 private void CreateBorderWalls()
 {
     for (int row = 0; row < matrix.GetLength(0); row++)
     {
         matrix[row, 0] = new WallField(row, 0,Directions.Left);
         matrix[row, matrix.GetLength(1)-1] = new WallField(row, matrix.GetLength(1)-1,Directions.Left);
     }
     for (int col = 0; col < matrix.GetLength(1); col++)
     {
         matrix[0, col] = new WallField(0, col,Directions.Left);
         matrix[matrix.GetLength(0)-1, col] = new WallField(matrix.GetLength(0)-1, col,Directions.Left);
     }
 }