private void mainPictureBox_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { buffer.AddLast((Bitmap)mainBitmap.Clone()); if (buffer.Count > 100) { buffer.First().Dispose(); buffer.RemoveFirst(); } CallForBitmap(bmp => Selected.MouseDown(e.X / Scale, e.Y / Scale, bmp)); } else if (e.Button == MouseButtons.Right) { CallForBitmap(bmp => { Selected.Start(bmp); }); } }
private void _canvas_MouseDown(object sender, MouseButtonEventArgs e) { _tool.MouseDown(sender, e); }