Browse Source

分享 - 分享前自动保存文档

ZhouJieSheng 1 year ago
parent
commit
efeda243c5
1 changed files with 6 additions and 1 deletions
  1. 6 1
      PDF Office/ViewModels/ViewContentViewModel.cs

+ 6 - 1
PDF Office/ViewModels/ViewContentViewModel.cs

@@ -1700,10 +1700,15 @@ namespace PDF_Master.ViewModels
             dialogs.ShowDialog(DialogNames.PropertyDialog, valuePairs, null);
         }
 
-        private void share()
+        private async void share()
         {
             try
             {
+                //分享前自动保存
+                if (!await SaveBeforeOption())
+                {
+                    return;
+                }
                 var path = PDFViewer.Document.FilePath;
                 string subject = "Share With" + " " + PDFViewer.Document.FileName;
                 System.Diagnostics.Process.Start("outlook", "/a,\"" + path + "\"" + "/m \"" + "&subject=" + subject + "\"");