ソースを参照

高保真-图章功能的高保真

zhuyi 2 年 前
コミット
c5cf4dc73b

+ 38 - 0
PDF Office/DataConvert/ListCountToVisible.cs.cs

@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Data;
+
+namespace PDF_Office.DataConvert
+{
+    public class ListCountToVisible : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (value == null)
+            {
+                return Visibility.Collapsed;
+            }
+            else
+            {
+                if ((int)value==0)
+                {
+                    return Visibility.Visible;
+                }
+                else
+                {
+                    return Visibility.Collapsed;
+                }
+            }
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotImplementedException();
+        }
+    }
+}

+ 2 - 0
PDF Office/PDF Office.csproj

@@ -251,6 +251,7 @@
     <Compile Include="DataConvert\IntAndTagToBoolMultiBinding.cs" />
     <Compile Include="DataConvert\IntToColorBrush.cs" />
     <Compile Include="DataConvert\InvertBoolConvert.cs" />
+    <Compile Include="DataConvert\ListCountToVisible.cs.cs" />
     <Compile Include="DataConvert\ObjectConvert.cs" />
     <Compile Include="DataConvert\PropertyPanelVisible.cs" />
     <Compile Include="DataConvert\StringToDateConvert.cs" />
@@ -1689,6 +1690,7 @@
     </Content>
     <Resource Include="Resources\EditTools\watermark_bg.png" />
     <Resource Include="Resources\PropertyPanel\EmptyAnnot.png" />
+    <Resource Include="Resources\PropertyPanel\nostamp.png" />
     <Content Include="source\AnalysisWord\Res\_rels\.rels">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>

BIN
PDF Office/Resources/PropertyPanel/nostamp.png


+ 24 - 2
PDF Office/ViewModels/PropertyPanel/AnnotPanel/StampAnnotPropertyViewModel.cs

@@ -128,6 +128,19 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
             }
         }
 
+        private int cusListboxIndex=-1;
+
+        public int CusListboxIndex
+        {
+            get { return cusListboxIndex; }
+            set
+            {
+                SetProperty(ref cusListboxIndex, value);
+            }
+        }
+
+
+        
         private bool unStandard;
         /// <summary>
         /// 判断当前是否为非标准图章,控制UI展示
@@ -448,8 +461,14 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
                 {
                     Author = DynamicVM.Author;
                     IsSetAuthor = DynamicVM.IsChecked;
-                    //需要加多语判断
-                    dateType = DynamicVM.SelectedIndex == 0 ? "F" : DynamicVM.DateFormatList[DynamicVM.SelectedIndex] + " HH:mm:ss";
+                    if (Settings.Default.AppProperties.culture == "en-US")
+                    {
+                        dateType = DynamicVM.SelectedIndex == 0 ? "F" : DynamicVM.DateFormatList[DynamicVM.SelectedIndex] + " HH:mm:ss";
+                    }
+                    else
+                    {
+                        dateType = DynamicVM.SelectedIndex == 0 ? "r" : DynamicVM.DateFormatList[DynamicVM.SelectedIndex] + " HH:mm:ss";
+                    }
                     UpDataDynamicStampList();
                 }
             });
@@ -598,6 +617,9 @@ namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
             annote.IsCheckedTime = stamp.IsCheckedTime;
             stamps.Add(annote);
             Settings.Default.Save();
+
+            SetStamp(stamp);
+            CusListboxIndex = CustomStampList.Count-1;
         }
     }
 }

ファイルの差分が大きいため隠しています
+ 25 - 15
PDF Office/Views/PropertyPanel/AnnotPanel/StampAnnotProperty.xaml