|
@@ -17,7 +17,9 @@ using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
|
using System.Windows;
|
|
|
using System.Windows.Controls;
|
|
|
+using System.Windows.Documents;
|
|
|
using System.Windows.Media;
|
|
|
+using static Dropbox.Api.UsersCommon.AccountType;
|
|
|
|
|
|
namespace PDF_Master.ViewModels.PropertyPanel.AnnotPanel
|
|
|
{
|
|
@@ -307,6 +309,10 @@ namespace PDF_Master.ViewModels.PropertyPanel.AnnotPanel
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 设置颜色透明度
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="obj"></param>
|
|
|
private void SelectedOpacityValue(object obj)
|
|
|
{
|
|
|
if (obj != null && obj is double)
|
|
@@ -404,6 +410,9 @@ namespace PDF_Master.ViewModels.PropertyPanel.AnnotPanel
|
|
|
|
|
|
public List<PresetFontItem> FontStyleList = new List<PresetFontItem>();
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 重新定义
|
|
|
+ /// </summary>
|
|
|
private void ReDefineFontStyle()
|
|
|
{
|
|
|
var item = FontVm.PresetFontList.FirstOrDefault(temp => temp.mTag == FontVm.CurrentPresetFont.ValueStr);
|
|
@@ -421,6 +430,11 @@ namespace PDF_Master.ViewModels.PropertyPanel.AnnotPanel
|
|
|
item.mFontStyle = FontStyles.Normal;
|
|
|
item.mFontWeight = FontWeights.Normal;
|
|
|
}
|
|
|
+ else if (FontVm.CurrrentFontWeightStyle.ValueStr == "Italic")
|
|
|
+ {
|
|
|
+ item.mFontStyle = FontStyles.Italic;
|
|
|
+ item.mFontWeight = FontWeights.Normal;
|
|
|
+ }
|
|
|
else
|
|
|
{
|
|
|
item.mFontStyle = FontStyles.Italic;
|
|
@@ -428,12 +442,17 @@ namespace PDF_Master.ViewModels.PropertyPanel.AnnotPanel
|
|
|
}
|
|
|
|
|
|
item.mFontSize = (int)FontVm.CurrentFontSize.Value;
|
|
|
+
|
|
|
+ FontVm.CurrentPresetFont = new ComboDataItem(item.mTag, item.mTagContent);
|
|
|
+ SelectedPresetFont();
|
|
|
+ if (BasicVm.IsMultiSelected == false)
|
|
|
+ PropertyPanel.InvokeToMyTools(BasicVm.AnnotType, Annot);
|
|
|
}
|
|
|
|
|
|
private void RestoreDefaultStyle()
|
|
|
{
|
|
|
var defaultlists = TextFont.GetPresetFontStyle();
|
|
|
- if (FontVm.CurrentPresetFont.ValueStr != "custom")
|
|
|
+ if (FontVm.CurrentPresetFont.ValueStr != "Custom")
|
|
|
{
|
|
|
var defaulItem = defaultlists.FirstOrDefault(temp => temp.mTag == FontVm.CurrentPresetFont.ValueStr);
|
|
|
if (defaulItem != null)
|
|
@@ -495,7 +514,9 @@ namespace PDF_Master.ViewModels.PropertyPanel.AnnotPanel
|
|
|
{
|
|
|
AnnotEvent = PropertyPanel.AnnotEvent;
|
|
|
Annot = PropertyPanel.annot as FreeTextAnnotArgs;
|
|
|
+
|
|
|
LoadPropertyHandler?.Invoke(this, Annot);
|
|
|
+ BasicVm.AnnotType = PropertyPanel.annot.EventType;
|
|
|
BasicVm.AnnotTypeTitle = "文字";
|
|
|
BasicVm.IsMultiSelected = PropertyPanel.IsMultiSelected;
|
|
|
IsFillFreeTextAnnot = PropertyPanel.IsTextFill;
|