|
@@ -2757,6 +2757,8 @@ namespace PDF_Master.ViewModels
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
+ //是否取消了水印保存步骤
|
|
|
+ bool flg = false;
|
|
|
//删掉Settings.Default.UserDate.isInFreeUseTime == false,没有试用期策略了
|
|
|
if ((!App.IsLogin || Settings.Default.UserDate.subscribestatus != 1) && (App.mainWindowViewModel.SelectedItem.DataContext as MainContentViewModel).IsUsedVIP== true)
|
|
|
{
|
|
@@ -2764,11 +2766,16 @@ namespace PDF_Master.ViewModels
|
|
|
value.Add(ParameterNames.ViewContentViewModel, this);
|
|
|
dialogs.ShowDialog(DialogNames.SubscriptionDialog, value, dialogResult =>
|
|
|
{
|
|
|
-
|
|
|
+ if (dialogResult.Result == ButtonResult.OK)
|
|
|
+ {
|
|
|
+ flg = true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ flg= false;
|
|
|
+ }
|
|
|
});
|
|
|
-
|
|
|
-
|
|
|
- return false;
|
|
|
+ return flg;
|
|
|
|
|
|
}
|
|
|
|
|
@@ -3019,6 +3026,7 @@ namespace PDF_Master.ViewModels
|
|
|
/// </summary>
|
|
|
public bool saveAsFile(Action RedactionAction = null, String IsFormSave=null)
|
|
|
{
|
|
|
+ //是否来自savefile方法
|
|
|
if(IsFormSave=="FormSave")
|
|
|
{
|
|
|
var dlg = new Microsoft.Win32.SaveFileDialog();
|
|
@@ -3026,6 +3034,7 @@ namespace PDF_Master.ViewModels
|
|
|
dlg.FileName = PDFViewer.Document.FileName;
|
|
|
if (dlg.ShowDialog() == true && !string.IsNullOrEmpty(dlg.FileName))
|
|
|
{
|
|
|
+
|
|
|
bool result = false;
|
|
|
if (RedactionAction != null)
|
|
|
{
|
|
@@ -3135,17 +3144,21 @@ namespace PDF_Master.ViewModels
|
|
|
value.Add(ParameterNames.Open, "saveAs");
|
|
|
dialogs.ShowDialog(DialogNames.SubscriptionDialog, value, dialogResult =>
|
|
|
{
|
|
|
- if (dialogResult.Result == ButtonResult.Cancel)
|
|
|
+ if (dialogResult.Result == ButtonResult.OK)
|
|
|
{
|
|
|
flg = true;
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ flg = false;
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
if (flg == false)
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
var dlg = new Microsoft.Win32.SaveFileDialog();
|
|
|
dlg.Filter = Properties.Resources.OpenDialogFilter;
|
|
|
dlg.FileName = PDFViewer.Document.FileName;
|
|
@@ -3183,6 +3196,7 @@ namespace PDF_Master.ViewModels
|
|
|
}
|
|
|
|
|
|
PDFViewer.Document.Encrypt(openPassword, permissionsPassword, cPDFPermissionsInfo);
|
|
|
+ //是否需要加水印
|
|
|
if(flg==true)
|
|
|
{
|
|
|
Uri resourceUri = new Uri("pack://application:,,,/PDF Master;component/Resources/Service/Warermark.png");
|