|
@@ -392,8 +392,15 @@ namespace PDF_Office.ViewModels.Tools
|
|
//颜色
|
|
//颜色
|
|
customMenu.SetMenuBinding(4, AnnotColorPalette_MenuCommand);
|
|
customMenu.SetMenuBinding(4, AnnotColorPalette_MenuCommand);
|
|
//线段样式
|
|
//线段样式
|
|
- customMenu.SetSubMenuBinding(5, 0, ApplicationCommands.Delete);//
|
|
|
|
- customMenu.SetSubMenuBinding(5, 1, ApplicationCommands.Delete);//
|
|
|
|
|
|
+ var freeHand = sender as FreehandAnnotArgs;
|
|
|
|
+ bool IsSolid = true;
|
|
|
|
+ if (freeHand != null)
|
|
|
|
+ {
|
|
|
|
+ IsSolid = AnnotPropertyPanel.IsSolidStyle(freeHand.LineDash);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ customMenu.SetSubMenuBinding(5, 0, FreeHandLineStyle_MenuCommand,null, IsSolid);
|
|
|
|
+ customMenu.SetSubMenuBinding(5, 1, FreeHandLineStyle_MenuCommand, null, !IsSolid);
|
|
//添加笔记
|
|
//添加笔记
|
|
customMenu.SetMenuBinding(6, AnnotAddNoteText_MenuCommand);
|
|
customMenu.SetMenuBinding(6, AnnotAddNoteText_MenuCommand);
|
|
//设置当前属性为默认值
|
|
//设置当前属性为默认值
|
|
@@ -417,13 +424,16 @@ namespace PDF_Office.ViewModels.Tools
|
|
//文本颜色
|
|
//文本颜色
|
|
customMenu.SetMenuBinding(4, AnnotColorPalette_MenuCommand);
|
|
customMenu.SetMenuBinding(4, AnnotColorPalette_MenuCommand);
|
|
//字体
|
|
//字体
|
|
- customMenu.SetSubMenuBinding(5, 0, ApplicationCommands.Delete);//
|
|
|
|
- customMenu.SetSubMenuBinding(5, 1, ApplicationCommands.Delete);//
|
|
|
|
- customMenu.SetSubMenuBinding(5, 2, ApplicationCommands.Delete);//
|
|
|
|
|
|
+ var annot = sender as FreeTextAnnotArgs;
|
|
|
|
+
|
|
|
|
+ customMenu.SetSubMenuBinding(5, 0, FreeTextFontFamily_MenuCommand, null, (annot != null && annot.FontFamily.ToString() == "Arial") ?true:false);
|
|
|
|
+ customMenu.SetSubMenuBinding(5, 1, FreeTextFontFamily_MenuCommand, null,(annot != null && annot.FontFamily.ToString() == "Courier") ? true : false);
|
|
|
|
+ customMenu.SetSubMenuBinding(5, 2, FreeTextFontFamily_MenuCommand, null, (annot != null && annot.FontFamily.ToString() == "Times New Roman") ? true : false);
|
|
|
|
+
|
|
//文本对齐
|
|
//文本对齐
|
|
- customMenu.SetSubMenuBinding(6, 0, ApplicationCommands.Delete);//
|
|
|
|
- customMenu.SetSubMenuBinding(6, 1, ApplicationCommands.Delete);//
|
|
|
|
- customMenu.SetSubMenuBinding(6, 2, ApplicationCommands.Delete);//
|
|
|
|
|
|
+ customMenu.SetSubMenuBinding(6, 0, FreeTextAglin_MenuCommand, null, (annot != null && annot.Align == TextAlignment.Left) ? true : false);
|
|
|
|
+ customMenu.SetSubMenuBinding(6, 1, FreeTextAglin_MenuCommand, null, (annot != null && annot.Align == TextAlignment.Center) ? true : false);
|
|
|
|
+ customMenu.SetSubMenuBinding(6, 2, FreeTextAglin_MenuCommand, null, (annot != null && annot.Align == TextAlignment.Right) ? true : false);
|
|
//设置当前属性为默认值
|
|
//设置当前属性为默认值
|
|
customMenu.SetMenuBinding(7, AnnotDefaultValue_MenuCommand);
|
|
customMenu.SetMenuBinding(7, AnnotDefaultValue_MenuCommand);
|
|
return popMenu;
|
|
return popMenu;
|
|
@@ -444,6 +454,10 @@ namespace PDF_Office.ViewModels.Tools
|
|
customMenu.SetMenuBinding(3, ApplicationCommands.Delete);
|
|
customMenu.SetMenuBinding(3, ApplicationCommands.Delete);
|
|
//颜色
|
|
//颜色
|
|
customMenu.SetMenuBinding(4, AnnotColorPalette_MenuCommand);
|
|
customMenu.SetMenuBinding(4, AnnotColorPalette_MenuCommand);
|
|
|
|
+ if(sender as StickyAnnotArgs != null)
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ }
|
|
//编辑便签
|
|
//编辑便签
|
|
customMenu.SetMenuBinding(5, ApplicationCommands.Delete);//
|
|
customMenu.SetMenuBinding(5, ApplicationCommands.Delete);//
|
|
//设置当前属性为默认值
|
|
//设置当前属性为默认值
|
|
@@ -467,13 +481,35 @@ namespace PDF_Office.ViewModels.Tools
|
|
//颜色
|
|
//颜色
|
|
customMenu.SetMenuBinding(4, AnnotColorPalette_MenuCommand);
|
|
customMenu.SetMenuBinding(4, AnnotColorPalette_MenuCommand);
|
|
//线段样式
|
|
//线段样式
|
|
- customMenu.SetSubMenuBinding(6, 0, ApplicationCommands.Delete);//
|
|
|
|
- customMenu.SetSubMenuBinding(6, 1, ApplicationCommands.Delete);//
|
|
|
|
|
|
+ bool IsSolid = true;
|
|
|
|
+ if (sender as SquareAnnotArgs != null)
|
|
|
|
+ {
|
|
|
|
+ IsSolid = AnnotPropertyPanel.IsSolidStyle((sender as SquareAnnotArgs).LineDash);
|
|
|
|
+ }
|
|
|
|
+ else if(sender as CircleAnnotArgs != null)
|
|
|
|
+ {
|
|
|
|
+ IsSolid = AnnotPropertyPanel.IsSolidStyle((sender as CircleAnnotArgs).LineDash);
|
|
|
|
+ }
|
|
|
|
+ else if(sender as LineAnnotArgs != null)
|
|
|
|
+ {
|
|
|
|
+ IsSolid = AnnotPropertyPanel.IsSolidStyle((sender as LineAnnotArgs).LineDash);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ customMenu.SetSubMenuBinding(5, 0, ShapeLineStyle_MenuCommand, null, IsSolid);
|
|
|
|
+ customMenu.SetSubMenuBinding(5, 1, ShapeLineStyle_MenuCommand, null, !IsSolid);
|
|
//线段方向
|
|
//线段方向
|
|
- customMenu.SetSubMenuBinding(7, 0, ApplicationCommands.Delete);//
|
|
|
|
- customMenu.SetSubMenuBinding(7, 1, ApplicationCommands.Delete);//
|
|
|
|
|
|
+ if(sender as LineAnnotArgs != null)
|
|
|
|
+ {
|
|
|
|
+ customMenu.SetSubMenuBinding(6, 0, ShapeLineDirect_MenuCommand ,null, true);//暂无,待确认
|
|
|
|
+ customMenu.SetSubMenuBinding(6, 1, ShapeLineDirect_MenuCommand ,null, true);//
|
|
|
|
+ customMenu.SetVisibilityProperty(6, true);
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ customMenu.SetVisibilityProperty(6,false);
|
|
|
|
+ }
|
|
//添加笔记
|
|
//添加笔记
|
|
- customMenu.SetMenuBinding(8, AnnotAddNoteText_MenuCommand);
|
|
|
|
|
|
+ customMenu.SetMenuBinding(7, AnnotAddNoteText_MenuCommand);
|
|
//设置当前属性为默认值
|
|
//设置当前属性为默认值
|
|
customMenu.SetMenuBinding(8, AnnotDefaultValue_MenuCommand);
|
|
customMenu.SetMenuBinding(8, AnnotDefaultValue_MenuCommand);
|
|
return popMenu;
|
|
return popMenu;
|
|
@@ -509,15 +545,15 @@ namespace PDF_Office.ViewModels.Tools
|
|
//删除
|
|
//删除
|
|
customMenu.SetMenuBinding(3, ApplicationCommands.Delete);
|
|
customMenu.SetMenuBinding(3, ApplicationCommands.Delete);
|
|
//导出
|
|
//导出
|
|
- customMenu.SetSubMenuBinding(4, 0, ApplicationCommands.Paste);//
|
|
|
|
- customMenu.SetSubMenuBinding(4, 1, ApplicationCommands.Paste);//
|
|
|
|
- customMenu.SetSubMenuBinding(4, 2, ApplicationCommands.Paste);//
|
|
|
|
|
|
+ customMenu.SetSubMenuBinding(4, 0, StampExportPicture_MenuCommand);//
|
|
|
|
+ customMenu.SetSubMenuBinding(4, 1, StampExportPicture_MenuCommand);//
|
|
|
|
+ customMenu.SetSubMenuBinding(4, 2, StampExportPicture_MenuCommand);//
|
|
//添加笔记
|
|
//添加笔记
|
|
- customMenu.SetMenuBinding(5, ApplicationCommands.Paste);//
|
|
|
|
|
|
+ customMenu.SetMenuBinding(5, AnnotAddNoteText_MenuCommand);
|
|
return popMenu;
|
|
return popMenu;
|
|
}
|
|
}
|
|
|
|
|
|
- //多选
|
|
|
|
|
|
+ //多选注释
|
|
private ContextMenu SelectMultiAnnotMenu(object sender, bool isHightAnnot)
|
|
private ContextMenu SelectMultiAnnotMenu(object sender, bool isHightAnnot)
|
|
{
|
|
{
|
|
var popMenu = App.Current.FindResource("MultiSelectAnnotContextMenu") as ContextMenu;
|
|
var popMenu = App.Current.FindResource("MultiSelectAnnotContextMenu") as ContextMenu;
|