private void pictureBox1_MouseUp(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { fig.MousePanEnd(); } else if (e.Button == MouseButtons.Right) { fig.MouseZoomEnd(); } }