public void EmptyField_EmptyFieldCreated(EmptyField sender) { Brush EmptyFieldBrush = new SolidBrush(Properties.GraphicColorSettings.Default.CurrentEmptyFieldColor); int emptyFieldX = graphicLocationX + sender.Col * this.fieldSize; int emptyFiledY = graphicLocationY + sender.Row * this.fieldSize; lock (this.matrixGraphic) { this.matrixGraphic.FillRectangle (EmptyFieldBrush, emptyFieldX, emptyFiledY, this.fieldSize, this.fieldSize); } EmptyFieldBrush.Dispose(); }
public void EmptyField_EmptyFieldSmoothCreation(EmptyField sender) { Brush EmptyFieldBrush = new SolidBrush(Properties.GraphicColorSettings.Default.CurrentEmptyFieldColor); int emptyFieldX = graphicLocationX + sender.Col * this.fieldSize; int emptyFiledY = graphicLocationY + sender.Row * this.fieldSize; this.matrixGraphic.SmoothFillRectangleMultithreading (EmptyFieldBrush,new Point( emptyFieldX, emptyFiledY),new Size( this.fieldSize, this.fieldSize),directionsDict[sender.DrawDirection], timeInterval); EmptyFieldBrush.Dispose(); }
private void FillWithEmptyFields() { for (int row = 0; row < matrix.GetLength(0); row++) { for (int col = 0; col < matrix.GetLength(1); col++) { matrix[row, col] = new EmptyField(row, col); } } }