|
@@ -1,6 +1,7 @@
|
|
|
using ComPDFKit.PDFAnnotation;
|
|
|
using ComPDFKitViewer;
|
|
|
using ComPDFKitViewer.AnnotEvent;
|
|
|
+using PDF_Office.CustomControl.CompositeControl;
|
|
|
using PDF_Office.Helper;
|
|
|
using PDF_Office.Model;
|
|
|
using PDF_Office.Model.AnnotPanel;
|
|
@@ -52,6 +53,8 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
public class SharpsAnnotPropertyViewModel : BindableBase, INavigationAware
|
|
|
{
|
|
|
#region 属性
|
|
|
+ public List<ComboDataItem> ThicknessItems { get; protected set; }
|
|
|
+
|
|
|
private AnnotCommon _basicVm = new AnnotCommon();
|
|
|
public AnnotCommon BasicVm
|
|
|
{
|
|
@@ -89,29 +92,6 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void UpdateDash(AnnotAttribEvent attribEvent)
|
|
|
- {
|
|
|
- if (Dash.Dashes != null && Dash.Dashes.Count > 0)
|
|
|
- {
|
|
|
-
|
|
|
- if (Dash.Dashes[0] == 0)
|
|
|
- {
|
|
|
- attribEvent?.UpdateAttrib(AnnotAttrib.LineStyle, DashStyles.Solid);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- attribEvent?.UpdateAttrib(AnnotAttrib.LineStyle, dash);
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- attribEvent?.UpdateAttrib(AnnotAttrib.LineStyle, DashStyles.Solid);
|
|
|
- }
|
|
|
-
|
|
|
- attribEvent?.UpdateAnnot();
|
|
|
- }
|
|
|
-
|
|
|
#endregion
|
|
|
|
|
|
public DelegateCommand<object> SelectedThickCommand { get; set; }
|
|
@@ -132,6 +112,7 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
{
|
|
|
InitColorItems();
|
|
|
InitFillColorItems();
|
|
|
+ InitThicknessItems();
|
|
|
|
|
|
SharpsTypeCommand = new DelegateCommand<object>(SharpsType_Command);
|
|
|
SelectedFillOpacityCommand = new DelegateCommand<object>(SelectedFillOpacity_Command);
|
|
@@ -145,6 +126,21 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
LineStyleCommand = new DelegateCommand<object>(LineStyle_Command);
|
|
|
}
|
|
|
|
|
|
+ private void InitThicknessItems()
|
|
|
+ {
|
|
|
+ ThicknessItems = new List<ComboDataItem>();
|
|
|
+ ComboDataItem item = new ComboDataItem(1, "pt");
|
|
|
+ ThicknessItems.Add(item);
|
|
|
+ item = new ComboDataItem(2, "pt");
|
|
|
+ ThicknessItems.Add(item);
|
|
|
+ item = new ComboDataItem(4, "pt");
|
|
|
+ ThicknessItems.Add(item);
|
|
|
+ item = new ComboDataItem(6, "pt");
|
|
|
+ ThicknessItems.Add(item);
|
|
|
+ item = new ComboDataItem(8, "pt");
|
|
|
+ ThicknessItems.Add(item);
|
|
|
+ }
|
|
|
+
|
|
|
private void InitColorItems()
|
|
|
{
|
|
|
BasicVm.ColorItems = AnnotColorList.GetColorList(ColorSelectorType.Border);
|