private void DrawPanel_MouseClick(object sender, MouseEventArgs e) { var figure = new FigureClass { x = e.X, y = e.Y, borderColor = _borderColor, fillColor = _fillColor, size = _size }; switch (_figure) { case Figure.Circle: _circleCoords.Add(figure); break; case Figure.Square: _squaresCoords.Add(figure); break; case Figure.Triangle: _triangesCoords.Add(figure); break; default: break; } DrawPanel.Update(); DrawPanel.Refresh(); }
private void ClearBtn_Click(object sender, EventArgs e) { _circleCoords.Clear(); _squaresCoords.Clear(); _triangesCoords.Clear(); DrawPanel.Update(); DrawPanel.Refresh(); }
private void RefreshPanel(object sender, EventArgs e) { DrawPanel.Invalidate(); DrawPanel.Update(); }