|
@@ -50,21 +50,16 @@ namespace PDF_Office.ViewModels.FillAndSign
|
|
|
private bool isRightMenuAddAnnot = false;
|
|
|
private IEventAggregator events;
|
|
|
public List<List<Point>> ShapePoints = new List<List<Point>>();
|
|
|
- private string Shape = "HookShape";
|
|
|
- private PopMenu HightAnnotPopMenu;
|
|
|
+ private string Shape = "HookShape";
|
|
|
private PopMenu FreeHandAnnotPopMenu;
|
|
|
- private PopMenu FreeTextAnnotPopMenu;
|
|
|
- private PopMenu StrickNoteAnnotPopMenu;
|
|
|
- private PopMenu ShapeAnnotPopMenu;
|
|
|
- private PopMenu LinkAnnotPopMenu;
|
|
|
- private PopMenu StampAnnotPopMenu;
|
|
|
private PopMenu MultiAnnotPopMenu;
|
|
|
private IRegionManager regions { get; set; }
|
|
|
private Dictionary<string, AnnotArgsType> ToolExpandDict = new Dictionary<string, AnnotArgsType>();
|
|
|
public static bool IsEdit = false;
|
|
|
public Brush SelectColor = new SolidColorBrush(Colors.GreenYellow);
|
|
|
public double FillOpacity = 1;
|
|
|
- public double LineWidth = 1;
|
|
|
+ public double LineWidth = 1;
|
|
|
+ public double LineWidthMultiple = 1;
|
|
|
#endregion
|
|
|
|
|
|
#region Command
|
|
@@ -143,7 +138,8 @@ namespace PDF_Office.ViewModels.FillAndSign
|
|
|
}
|
|
|
//注释工具
|
|
|
private void FindAnnotTypeKey(string tag, ref AnnotHandlerEventArgs annotArgs, bool isRightMenuAdd = false)
|
|
|
- {
|
|
|
+ {
|
|
|
+ LineWidthMultiple = 1;
|
|
|
switch (tag)
|
|
|
{
|
|
|
|
|
@@ -165,6 +161,7 @@ namespace PDF_Office.ViewModels.FillAndSign
|
|
|
break;
|
|
|
case "RbtnFork"://叉
|
|
|
Shape = "ForkShape";
|
|
|
+
|
|
|
ShapePoints = new List<List<Point>> { new List<Point> { new Point(3.19995, 3.20001), new Point(12.8, 12.8) }, new List<Point> { new Point(12.8, 3.20001), new Point(3.20005, 12.8) } };
|
|
|
annotArgs = GetStamp();
|
|
|
break;
|
|
@@ -180,7 +177,8 @@ namespace PDF_Office.ViewModels.FillAndSign
|
|
|
break;
|
|
|
case "RbtnPoint":
|
|
|
Shape = "DotShape";
|
|
|
- ShapePoints = new List<List<Point>> { new List<Point> { new Point(1, 1) ,new Point(1, 1) } };
|
|
|
+ ShapePoints = new List<List<Point>> { new List<Point> { new Point(12.19995, 10), new Point(12.19995, 10) } };
|
|
|
+ LineWidthMultiple = 4;
|
|
|
annotArgs = GetStamp();
|
|
|
break;
|
|
|
default://图章
|
|
@@ -205,7 +203,8 @@ namespace PDF_Office.ViewModels.FillAndSign
|
|
|
private AnnotHandlerEventArgs GetStamp(List<AnnotHandlerEventArgs> selectedArgs = null)
|
|
|
{
|
|
|
StampAnnotArgs stampAnnotArgs = new StampAnnotArgs();
|
|
|
- stampAnnotArgs.SetInkData(ShapePoints, LineWidth, (SelectColor as SolidColorBrush).Color);
|
|
|
+
|
|
|
+ stampAnnotArgs.SetInkData(ShapePoints, LineWidth* LineWidthMultiple, (SelectColor as SolidColorBrush).Color);
|
|
|
//PDFViewer.SetMouseMode(MouseModes.AnnotCreate);
|
|
|
//PDFViewer.SetToolParam(stampArgs);
|
|
|
//StampAnnotArgs stampAnnotArgs = new StampAnnotArgs();
|
|
@@ -242,7 +241,7 @@ namespace PDF_Office.ViewModels.FillAndSign
|
|
|
public void SetStamp()
|
|
|
{
|
|
|
StampAnnotArgs stampAnnotArgs = new StampAnnotArgs();
|
|
|
- stampAnnotArgs.SetInkData(ShapePoints, LineWidth, (SelectColor as SolidColorBrush).Color);
|
|
|
+ stampAnnotArgs.SetInkData(ShapePoints, LineWidth* LineWidthMultiple, (SelectColor as SolidColorBrush).Color);
|
|
|
//PDFViewer.SetMouseMode(MouseModes.AnnotCreate);
|
|
|
//PDFViewer.SetToolParam(stampArgs);
|
|
|
//StampAnnotArgs stampAnnotArgs = new StampAnnotArgs();
|
|
@@ -344,7 +343,11 @@ namespace PDF_Office.ViewModels.FillAndSign
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- }
|
|
|
+ }
|
|
|
+ freehandArgs.RawPointList = ShapePoints;
|
|
|
+ freehandArgs.InkColor = (SelectColor as SolidColorBrush).Color;
|
|
|
+ freehandArgs.Transparency = 1;
|
|
|
+ freehandArgs.LineWidth = LineWidth;
|
|
|
annotAttribsList[AnnotAttrib.Color] = freehandArgs.InkColor;
|
|
|
annotAttribsList[AnnotAttrib.Transparency] = freehandArgs.Transparency;
|
|
|
annotAttribsList[AnnotAttrib.Thickness] = freehandArgs.LineWidth;
|
|
@@ -795,15 +798,15 @@ namespace PDF_Office.ViewModels.FillAndSign
|
|
|
bOTAContent.TabItemSearch.IsSelected = true;
|
|
|
}
|
|
|
}
|
|
|
- public IRegionManager region;
|
|
|
+
|
|
|
private bool IsBOTATabItemShow(out BOTAContentViewModel bOTAContentViewModel, out BOTAContent bOTAContent, string tabItemText)
|
|
|
{
|
|
|
bool isTabItem = false;
|
|
|
bOTAContentViewModel = null;
|
|
|
bOTAContent = null;
|
|
|
- if (region.Regions.ContainsRegionWithName(viewContentViewModel.BOTARegionName))
|
|
|
+ if (regions.Regions.ContainsRegionWithName(viewContentViewModel.BOTARegionName))
|
|
|
{
|
|
|
- var views = region.Regions[viewContentViewModel.BOTARegionName].Views;
|
|
|
+ var views = regions.Regions[viewContentViewModel.BOTARegionName].Views;
|
|
|
var model = views.FirstOrDefault(q => q is BOTAContent);
|
|
|
if (model is BOTAContent bOTAContent1)
|
|
|
{
|