private void btnSaveImage_Click(object sender, EventArgs e) { if (saveImageDialog.ShowDialog() == DialogResult.OK) { GraphViewport.CaptureImage(saveImageDialog.FileName); } }