private void ChangeGraphicsStyle(GraphicsStyle style) { graphicsStyle = style; Bitmap allImages = GraphicsController.GetAllImages(graphicsStyle); for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { gameGraphics[4 * i + j] = allImages.Clone(new Rectangle(j * FIELD_SIZE, i * FIELD_SIZE, FIELD_SIZE, FIELD_SIZE), allImages.PixelFormat); } } this.Text = GraphicsController.GetTitle(graphicsStyle); this.Icon = GraphicsController.GetIcon(graphicsStyle); this.BackgroundImage = GraphicsController.GetBackground(graphicsStyle, FIELD_SIZE); this.BackColor = GraphicsController.GetBackgroundColor(graphicsStyle); this.BackgroundImage = gameGraphics[0]; newGameButton.BackColor = GraphicsController.GetButtonColor(graphicsStyle); newGameButton.FlatAppearance.BorderColor = GraphicsController.GetEdgeColor(graphicsStyle); restartButton.BackColor = GraphicsController.GetButtonColor(graphicsStyle); restartButton.FlatAppearance.BorderColor = GraphicsController.GetEdgeColor(graphicsStyle); }
private void SetGraphics() { button1.BackColor = GraphicsController.GetButtonColor(graphicsStyle); button1.FlatAppearance.BorderColor = GraphicsController.GetEdgeColor(graphicsStyle); this.BackColor = GraphicsController.GetBackgroundColor(graphicsStyle); this.Icon = GraphicsController.GetIcon(graphicsStyle); this.BackgroundImage = GraphicsController.GetBackground(graphicsStyle, FIELD_SIZE); }