Ejemplo n.º 1
0
 public SaveImageModel(BitmapSource imageToSave)
 {
     this.imageToSave = imageToSave.ThrowIfNull();
     var saveDialog = new SaveFileDialog();
     saveDialog.FileName = "SharpGraph " + System.DateTime.Now.ToString().Replace(new char[] { '/', ':' }, '-');
     saveDialog.DefaultExt = ".png";
     saveDialog.Filter = "PNG Image Files (.png)|*.png";
     var result = saveDialog.ShowDialog();
     if (result == true)
     {
         Console.WriteLine(saveDialog.FileName);
         this.fileName = saveDialog.FileName;
         this.Save();
     }
 }