|
@@ -76,18 +76,20 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
ReDefineFontStyleCommand = new DelegateCommand(ReDefineFontStyle);
|
|
|
//恢复默认
|
|
|
RestoreDefaultStyleCommand = new DelegateCommand(RestoreDefaultStyle);
|
|
|
-
|
|
|
- SelectedFillOpacityCommand = new DelegateCommand<object>(SelectedFillOpacity);
|
|
|
-
|
|
|
+ //颜色
|
|
|
SelectedColorCommand = new DelegateCommand<object>(SelectedColor_Command);
|
|
|
+ //填充颜色
|
|
|
SelectedFillColorCommand = new DelegateCommand<object>(SelectedFillColorChange);
|
|
|
-
|
|
|
+ //填充颜色不透明度
|
|
|
+ SelectedFillOpacityCommand = new DelegateCommand<object>(SelectedFillOpacity);
|
|
|
+ //大小
|
|
|
FontSizeChangedCommand = new DelegateCommand(FontSizeChanged);
|
|
|
+ //内容对齐
|
|
|
TextAlignCheckedCommand = new DelegateCommand<object>(TextAlignChecked);
|
|
|
+
|
|
|
+ //MVP不上
|
|
|
LineModeCheckedCommand = new DelegateCommand<object>(LineMode_Checked);
|
|
|
SelectedOpacityValueCommand = new DelegateCommand<object>(SelectedOpacityValue);
|
|
|
-
|
|
|
-
|
|
|
InitVariable();
|
|
|
}
|
|
|
|
|
@@ -176,8 +178,8 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
FontVm.UpdateFontWeight_Style();
|
|
|
|
|
|
Dictionary<AnnotAttrib, object> AnnotAttribDir = new Dictionary<AnnotAttrib, object>();
|
|
|
- AnnotAttribDir.Add(AnnotAttrib.FontStyle, FontVm.FontWeightItem);
|
|
|
- AnnotAttribDir.Add(AnnotAttrib.FontWeight, FontVm.FontStyleItem);
|
|
|
+ AnnotAttribDir.Add(AnnotAttrib.FontStyle, FontVm.FontStyleItem);
|
|
|
+ AnnotAttribDir.Add(AnnotAttrib.FontWeight, FontVm.FontWeightItem);
|
|
|
PropertyPanel.UpdateAnnotAllAttribs(AnnotAttribDir);
|
|
|
}
|
|
|
}
|
|
@@ -339,21 +341,60 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
AnnotEvent = PropertyPanel.AnnotEvent;
|
|
|
Annot = PropertyPanel.annot as FreeTextAnnotArgs;
|
|
|
LoadPropertyHandler?.Invoke(this, Annot);
|
|
|
- if (PropertyPanel.annotlists != null && PropertyPanel.annotlists.Count > 1)
|
|
|
- {
|
|
|
- BasicVm.IsMultiSelected = true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- BasicVm.IsMultiSelected = false;
|
|
|
- }
|
|
|
+
|
|
|
+ BasicVm.IsMultiSelected = PropertyPanel.IsMultiSelected;
|
|
|
|
|
|
if(BasicVm.IsMultiSelected)
|
|
|
{
|
|
|
+ bool isDifferentFontFamily = false;
|
|
|
+ bool isDifferentFontSize = false;
|
|
|
+ bool isDifferentFontStyle = false;
|
|
|
+
|
|
|
+ FreeTextAnnotArgs tempAnnot = null;
|
|
|
+ foreach (var item in PropertyPanel.annotlists)
|
|
|
+ {
|
|
|
+ var itemFreeText = item as FreeTextAnnotArgs;
|
|
|
+ if(itemFreeText != null)
|
|
|
+ {
|
|
|
+ if (tempAnnot == null)
|
|
|
+ {
|
|
|
+ tempAnnot = itemFreeText;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+
|
|
|
+ if (itemFreeText.FontFamily != tempAnnot.FontFamily)
|
|
|
+ {
|
|
|
+ isDifferentFontFamily = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (itemFreeText.FontSize != tempAnnot.FontSize)
|
|
|
+ {
|
|
|
+ isDifferentFontSize = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (itemFreeText.FontStyle != tempAnnot.FontStyle || itemFreeText.FontWeight != tempAnnot.FontWeight)
|
|
|
+ {
|
|
|
+ isDifferentFontStyle = true;
|
|
|
+ }
|
|
|
+ tempAnnot = itemFreeText;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if (isDifferentFontFamily || isDifferentFontSize || isDifferentFontStyle)
|
|
|
+ FontVm.CurrentPresetFont = null;
|
|
|
+
|
|
|
+ if(isDifferentFontFamily)
|
|
|
FontVm.CurrentFontFamily = null;
|
|
|
- FontVm.CurrentFontSize = null;
|
|
|
- FontVm.CurrrentFontWeightStyle = null;
|
|
|
- FontVm.CurrentPresetFont = null;
|
|
|
+
|
|
|
+ if (isDifferentFontSize)
|
|
|
+ FontVm.CurrentFontSize = null;
|
|
|
+
|
|
|
+ if (isDifferentFontStyle)
|
|
|
+ FontVm.CurrrentFontWeightStyle = null;
|
|
|
|
|
|
BasicVm.SetStrDashStyle("None");
|
|
|
}
|