private void RedoButton_Click(object sender, EventArgs e) { DrawingBoardPictureBox.Refresh(); shapesListManager.Redo(); shapesDrawer.DrawShapeList(shapesListManager.GetList()); shapesListManager.RefreshFormShapesList(CurrentShapesListBox); }
private void ShapeParametersGrid_CellEndEdit(object sender, DataGridViewCellEventArgs e) { DrawingBoardPictureBox.Refresh(); shapesListManager.ConfirmShapeParametersChange(shapeParametersGrid); shapesDrawer.DrawShapeList(shapesListManager.GetList()); shapesListManager.RefreshFormShapesList(CurrentShapesListBox); }
private void DeserializeButton_Click(object sender, EventArgs e) { DrawingBoardPictureBox.Refresh(); if (CheckFunctionalPluginsListBox()) { var selectedIndex = CheckedFunctionalPluginsListBox.CheckedIndices[0]; shapesListManager.LoadList(selectedIndex); } else { shapesListManager.LoadList(); } shapesDrawer.DrawShapeList(shapesListManager.GetList()); shapesListManager.RefreshFormShapesList(CurrentShapesListBox); }
private void ShapeParametersGrid_CellMouseUp(object sender, DataGridViewCellMouseEventArgs e) { const int colorColumnIndex = 1; const int colorRowIndex = 5; if ((e.ColumnIndex == colorColumnIndex) && (e.RowIndex == colorRowIndex)) { var dialogResult = ColorDialog.ShowDialog(); if (dialogResult == DialogResult.OK) { shapeParametersGrid[colorColumnIndex, colorRowIndex].Style.BackColor = ColorDialog.Color; } } DrawingBoardPictureBox.Refresh(); shapesListManager.ConfirmShapeParametersChange(shapeParametersGrid); shapesDrawer.DrawShapeList(shapesListManager.GetList()); shapesListManager.RefreshFormShapesList(CurrentShapesListBox); }
private void ClearDrawingBoard() { DrawingBoardPictureBox.Controls.Clear(); DrawingBoardPictureBox.Invalidate(); DrawingBoardPictureBox.Update(); }
private void ShapeDrawingForm_Load(object sender, EventArgs e) { shapesDrawer = new Drawer(DrawingBoardPictureBox.CreateGraphics(), new Dictionary <int, Shape>()); }