|
@@ -385,6 +385,9 @@ namespace PDFViewer
|
|
digitalSignatureControl.LoadUndoManagerEvent(viewControl.GetCPDFViewer());
|
|
digitalSignatureControl.LoadUndoManagerEvent(viewControl.GetCPDFViewer());
|
|
signatureStatusBarControl.SetStatus(SignatureHelper.SignatureList);
|
|
signatureStatusBarControl.SetStatus(SignatureHelper.SignatureList);
|
|
viewControl.PDFViewTool.SetViewerModel(MouseModes.Viewer);
|
|
viewControl.PDFViewTool.SetViewerModel(MouseModes.Viewer);
|
|
|
|
+
|
|
|
|
+ viewControl.PDFViewTool.DocumentModifiedChanged -= PDFViewTool_DocumentModifiedChanged;
|
|
|
|
+ viewControl.PDFViewTool.DocumentModifiedChanged += PDFViewTool_DocumentModifiedChanged;
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -611,6 +614,8 @@ namespace PDFViewer
|
|
{
|
|
{
|
|
pageEditControl.PDFViewControl = viewControl;
|
|
pageEditControl.PDFViewControl = viewControl;
|
|
pageEditControl.ExitPageEdit += PageEditControl_ExitPageEdit;
|
|
pageEditControl.ExitPageEdit += PageEditControl_ExitPageEdit;
|
|
|
|
+ pageEditControl.OnCanSaveChanged -= ControlOnCanSaveChanged;
|
|
|
|
+ pageEditControl.OnCanSaveChanged += ControlOnCanSaveChanged;
|
|
PDFGrid.Child = pageEditControl;
|
|
PDFGrid.Child = pageEditControl;
|
|
NotDocsEditorVisible = Visibility.Collapsed;
|
|
NotDocsEditorVisible = Visibility.Collapsed;
|
|
}
|
|
}
|
|
@@ -776,6 +781,11 @@ namespace PDFViewer
|
|
this.CanSave = e;
|
|
this.CanSave = e;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private void PDFViewTool_DocumentModifiedChanged(object sender, EventArgs e)
|
|
|
|
+ {
|
|
|
|
+ CanSave = viewControl.PDFViewTool.IsDocumentModified;
|
|
|
|
+ }
|
|
|
|
+
|
|
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
|
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
|
{
|
|
{
|
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|