Example #1
0
 private void tsbSaveImage_Click(object sender, EventArgs e)
 {
     PrintOption option = new PrintOption(wbMap);
     SaveFileDialog dialog = new SaveFileDialog
     {
         Filter = "图片(*.bmp;*.png;*.gif;*.jpg)|*.bmp;*.png;*.gif;*.jpg"
     };
     if (dialog.ShowDialog() == DialogResult.OK)
     {
         option.PrintImage.Save(dialog.FileName);
     }
 }
Example #2
0
 private void tsbPrint_Click(object sender, EventArgs e)
 {
     if (this._mapPrint == null)
     {
         this._mapPrint = new PrintOption(myMap);
     }
     else
     {
         this._mapPrint.RefleshPrintImage(myMap, 0, 0);
     }
     this._mapPrint.PageSetup();
     this._mapPrint.PrintPreview();
 }