Esempio n. 1
0
 private void RedoButton_Click(object sender, EventArgs e)
 {
     DrawingBoardPictureBox.Refresh();
     shapesListManager.Redo();
     shapesDrawer.DrawShapeList(shapesListManager.GetList());
     shapesListManager.RefreshFormShapesList(CurrentShapesListBox);
 }
Esempio n. 2
0
 private void ShapeParametersGrid_CellEndEdit(object sender, DataGridViewCellEventArgs e)
 {
     DrawingBoardPictureBox.Refresh();
     shapesListManager.ConfirmShapeParametersChange(shapeParametersGrid);
     shapesDrawer.DrawShapeList(shapesListManager.GetList());
     shapesListManager.RefreshFormShapesList(CurrentShapesListBox);
 }
Esempio n. 3
0
 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);
 }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
 private void ClearDrawingBoard()
 {
     DrawingBoardPictureBox.Controls.Clear();
     DrawingBoardPictureBox.Invalidate();
     DrawingBoardPictureBox.Update();
 }
Esempio n. 6
0
 private void ShapeDrawingForm_Load(object sender, EventArgs e)
 {
     shapesDrawer = new Drawer(DrawingBoardPictureBox.CreateGraphics(), new Dictionary <int, Shape>());
 }