|
@@ -27,6 +27,7 @@ using Prism.Events;
|
|
|
using System.Windows.Media.Imaging;
|
|
|
using PDFReader_WPF.Helper;
|
|
|
using PDF_Master.Properties;
|
|
|
+using PDF_Master.Model.AnnotPanel;
|
|
|
|
|
|
namespace PDF_Master.ViewModels.Tools
|
|
|
{
|
|
@@ -128,7 +129,7 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
btnToProperty.Add("Text", "TextEditProperty");
|
|
|
btnToProperty.Add("Image", "ImageEditProperty");
|
|
|
btnToProperty.Add("TextAndImage", "ImageTextEditProperty");
|
|
|
- btnToProperty.Add("PropertyPanelContent", "PropertyPanelContent");
|
|
|
+ btnToProperty.Add("PropertyPanelContentEdit", "PropertyPanelContentEdit");
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
@@ -344,7 +345,7 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
else if (PDFViewer.ToolManager != null)
|
|
|
{
|
|
|
PDFViewer.ClearSelectPDFEdit();
|
|
|
- AddToPropertyPanel("PropertyPanelContent", null);
|
|
|
+ AddToPropertyPanel("PropertyPanelContentEdit", null);
|
|
|
PDFViewer.ReloadDocument();
|
|
|
|
|
|
}
|
|
@@ -428,7 +429,7 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
PDFViewer.SetPDFEditCreateType(ComPDFKit.PDFPage.CPDFEditType.EditImage);
|
|
|
PDFViewer.SetMouseMode(MouseModes.PDFEdit);
|
|
|
PDFViewer.ReloadDocument();
|
|
|
- AddToPropertyPanel("PropertyPanelContent", null);
|
|
|
+ AddToPropertyPanel("PropertyPanelContentEdit", null);
|
|
|
ShowPropertyPanel(true);
|
|
|
|
|
|
}
|
|
@@ -619,7 +620,7 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
PDFViewer.SetMouseMode(MouseModes.PDFEdit);
|
|
|
PDFViewer.ReloadDocument();
|
|
|
PDFViewer.SetPDFEditCreateType(ComPDFKit.PDFPage.CPDFEditType.None);
|
|
|
- AddToPropertyPanel("PropertyPanelContent", null);
|
|
|
+ AddToPropertyPanel("PropertyPanelContentEdit", null);
|
|
|
ShowPropertyPanel(false);
|
|
|
}
|
|
|
else
|
|
@@ -671,6 +672,7 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
//左键激活逻辑
|
|
|
private void PDFViewer_PDFEditActiveHandler(object sender, List<PDFEditEvent> e)
|
|
|
{
|
|
|
+ PDFViewer.ToolManager.IgnoreMoveDistance =5;
|
|
|
//判断是否已退出登录,限制编辑操作
|
|
|
if (!App.IsLogin)
|
|
|
{
|
|
@@ -697,8 +699,14 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
if (item.EditType == ComPDFKit.PDFPage.CPDFEditType.EditText)
|
|
|
{
|
|
|
isText = true;
|
|
|
+ if(!App.IsGetTextFamily)
|
|
|
+ {
|
|
|
+ FontBoard fontBoard = new FontBoard();
|
|
|
+ fontBoard.FontFamily = e[0].SystemFontNameList;
|
|
|
+ fontBoard.InitBase_FontFamilys();
|
|
|
+ App.IsGetTextFamily = true;
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
@@ -730,7 +738,7 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
else
|
|
|
{
|
|
|
|
|
|
- AddToPropertyPanel("PropertyPanelContent", null);
|
|
|
+ AddToPropertyPanel("PropertyPanelContentEdit", null);
|
|
|
}
|
|
|
|
|
|
events.GetEvent<PageEditNotifyEvent>().Publish(new PageEditNotifyEventArgs(unicode));
|
|
@@ -810,8 +818,8 @@ namespace PDF_Master.ViewModels.Tools
|
|
|
{
|
|
|
//图片创建
|
|
|
if (e.NotifyType == CustomNotifyType.PDFEditImageCreate)
|
|
|
- {
|
|
|
- OpenFileDialog openFileDialog = new OpenFileDialog();
|
|
|
+ {
|
|
|
+ OpenFileDialog openFileDialog = new OpenFileDialog();
|
|
|
openFileDialog.Filter = "Image Files(*.jpg;*.jpeg;*.png;*.bmp)|*.jpg;*.jpeg;*.png;*.bmp;";
|
|
|
if (openFileDialog.ShowDialog() == true)
|
|
|
{
|