private void PictureBoxPaint_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { drawingEngine.DrawMainOnBackground(); mouseHandler.NewClick(e.Location); if (settings.Mode == EFigure.SmoothCurve) { _isLineFinished = false; } if (!_isLineFinished && _isFirstPointAdd) { drawingEngine.AddPointToCurve(mouseHandler.GetClick()); } else if (!_isLineFinished && !_isFirstPointAdd) { _isFirstPointAdd = true; } if (settings.Mode == EFigure.Dot) { _isFigureCreated = true; drawingEngine.DrawNewFigure(); } else if (settings.Mode == EFigure.Move) { drawingEngine.SelectFigure(); } PictureBoxPaint.Image = drawingEngine.MainImage; } if (e.Button == MouseButtons.Right) { _isLineFinished = true; _isFigureCreated = false; _isFirstPointAdd = false; } }