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