예제 #1
0
 public virtual void SaveFile(FileConfig config, Action<Stream> callback)
 {
     SaveFileDialog dialog = new SaveFileDialog();
     if (config == null) config = this.CreateDefaultConfig();
     dialog.FileName = config.FileName;
     dialog.Filter = config.Filter;
     dialog.Title = config.Title;
     if (dialog.ShowDialog(Application.Current.MainWindow) == true)
     {
         config.FileName = dialog.FileName;
         if (callback != null)
         {
             var stream = dialog.OpenFile();
             callback.Invoke(stream);
         }
     }
 }
예제 #2
0
 public void SaveFile(FileConfig config, Action<Stream> callback)
 {
     
 }
예제 #3
0
 FileConfig CreateDefaultConfig()
 {
     var config = new FileConfig();
     config.Title = "请选择保存的路径";
     return config;
 }