|
@@ -29,7 +29,7 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
var dash = value as DashStyle;
|
|
|
if (dash.Dashes == null || dash.Dashes.Count == 0 || dash.Dashes[0] == 0)
|
|
|
{
|
|
|
- return DashStyles.Solid.Dashes;
|
|
|
+ return DashStyles.Solid.Dashes;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -123,7 +123,7 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
public DelegateCommand<object> SharpsTypeCommand { get; set; }
|
|
|
public DelegateCommand<object> ThicknessChangedCommand { get; set; }
|
|
|
public DelegateCommand<object> SelectedOpacityValueCommand { get; set; }
|
|
|
-
|
|
|
+
|
|
|
|
|
|
public event EventHandler<object> LoadPropertyHandler;
|
|
|
public SharpsAnnotPropertyViewModel()
|
|
@@ -149,21 +149,21 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
if (content != null)
|
|
|
{
|
|
|
var intData = int.Parse(content);
|
|
|
- BasicVm.AnnotThickness = intData;
|
|
|
+ BasicVm.AnnotThickness = intData;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
private void SharpsType_Command(object obj)
|
|
|
{
|
|
|
- if(obj != null)
|
|
|
+ if (obj != null)
|
|
|
{
|
|
|
var tag = (string)obj;
|
|
|
SharpsType(tag);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void SharpsType(string tag,bool isFromToolsBtn = false)
|
|
|
+ private void SharpsType(string tag, bool isFromToolsBtn = false)
|
|
|
{
|
|
|
Dictionary<AnnotArgsType, object> changeData = new Dictionary<AnnotArgsType, object>();
|
|
|
switch (tag)
|
|
@@ -188,7 +188,7 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
|
|
|
case "Arrow":
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
ArrowHelper arrowLine = new ArrowHelper();
|
|
|
arrowLine.ArrowLength = 8;
|
|
|
arrowLine.LineStart = new Point(8, 24);
|
|
@@ -212,22 +212,22 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
changeData[AnnotArgsType.AnnotLine] = tag;
|
|
|
IsLineAnnot = true;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
- if (isFromToolsBtn == false)
|
|
|
- PropertyPanel.AnnotTypeChangedInvoke(this, changeData);
|
|
|
+ //if (isFromToolsBtn == false)
|
|
|
+ // PropertyPanel.AnnotTypeChangedInvoke(this, changeData);
|
|
|
|
|
|
BasicVm.SetOtherTag(tag);
|
|
|
}
|
|
|
|
|
|
private void LineStyle_Command(object obj)
|
|
|
{
|
|
|
- if(obj!= null)
|
|
|
+ if (obj != null)
|
|
|
{
|
|
|
var tag = obj as string;
|
|
|
- if(tag == "Solid")
|
|
|
+ if (tag == "Solid")
|
|
|
{
|
|
|
DashStyle dashAnnot = new DashStyle();
|
|
|
dashAnnot.Dashes.Add(0);
|
|
@@ -261,7 +261,7 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
private void SelectedFillOpacity_Command(object obj)
|
|
@@ -273,7 +273,7 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
|
|
|
PropertyPanel.UpdateAnnotAAttrib(AnnotAttrib.Transparency, BasicVm.FillOpacity);
|
|
|
PropertyPanel.InvokeToMyTools(AnnotArgsType.AnnotFreehand, BasicVm.FillOpacity);
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -291,7 +291,7 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
private void SelectedBorderColor(object obj)
|
|
|
{
|
|
@@ -340,8 +340,8 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
BasicVm.AnnotTypeTitle = "矩形";
|
|
|
break;
|
|
|
case AnnotArgsType.AnnotLine:
|
|
|
-
|
|
|
- var annotLine = Annot as LineAnnotArgs;
|
|
|
+
|
|
|
+ var annotLine = Annot as LineAnnotArgs;
|
|
|
if (annotLine != null)
|
|
|
{
|
|
|
if (annotLine.TailLineType == C_LINE_TYPE.LINETYPE_ARROW && annotLine.HeadLineType == C_LINE_TYPE.LINETYPE_NONE)
|
|
@@ -366,7 +366,7 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
BasicVm.AnnotType = PropertyPanel.annot.EventType;
|
|
|
Annot = PropertyPanel.annot;
|
|
|
BasicVm.IsMultiSelected = PropertyPanel.IsMultiSelected;
|
|
|
- if(BasicVm.IsMultiSelected)
|
|
|
+ if (BasicVm.IsMultiSelected)
|
|
|
{
|
|
|
IsAttributeEquals();
|
|
|
}
|
|
@@ -374,7 +374,7 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
{
|
|
|
GetAnnotProperty();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
LoadPropertyHandler?.Invoke(null, Annot);
|
|
|
}
|
|
|
|
|
@@ -496,12 +496,12 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
var Square = Annot as SquareAnnotArgs;
|
|
|
isSolid = AnnotPropertyPanel.IsSolidStyle(Square.LineDash);
|
|
|
}
|
|
|
- else if(annot is CircleAnnotArgs)
|
|
|
+ else if (annot is CircleAnnotArgs)
|
|
|
{
|
|
|
var Circle = Annot as CircleAnnotArgs;
|
|
|
isSolid = AnnotPropertyPanel.IsSolidStyle(Circle.LineDash);
|
|
|
}
|
|
|
- else if(annot is LineAnnotArgs)
|
|
|
+ else if (annot is LineAnnotArgs)
|
|
|
{
|
|
|
var line = Annot as LineAnnotArgs;
|
|
|
isSolid = AnnotPropertyPanel.IsSolidStyle(line.LineDash);
|
|
@@ -527,7 +527,7 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
|
|
|
BasicVm.FillOpacity = Square.Transparency;
|
|
|
BasicVm.AnnotThickness = Square.LineWidth;
|
|
|
Dash = Square.LineDash;
|
|
|
- SharpsType("Rect",true);
|
|
|
+ SharpsType("Rect", true);
|
|
|
BasicVm.AnnotTypeTitle = "矩形";
|
|
|
IsLineAnnot = false;
|
|
|
}
|