private void _PrintImage(float scale)
{
using (var dialog = new SaveFileDialog())
{
dialog.Filter = "Bitmap (*.bmp) | *.bmp";
if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
// set the print mode for the custom overlay painter so that we skip printing instructions
_mOverlay.PrintMode = true;
// tell chart to print to the document at the specified scale
var bitmap = _mChart.Print(scale);
_mOverlay.PrintMode = false; // restore printing overlays
bitmap.Save(dialog.FileName, System.Drawing.Imaging.ImageFormat.Bmp);
}
}
}