Ver código fonte

页面编辑 文案补充;虚影显示优化

OYXH\oyxh 1 ano atrás
pai
commit
f3206d769c

+ 1 - 1
PDF Office/Model/Dialog/HomePageToolsDialogs/HomePageSplitDialogModel.cs

@@ -203,7 +203,7 @@ namespace PDF_Master.Model.HomePageToolsDialogs
                         // 进行报错处理的代码逻辑
                         AlertsMessage alertsMessage = new AlertsMessage();
                         string illegalChars = @"\ /<>:|""?*";
-                        alertsMessage.ShowDialog($"文件名包含不允许的字符", $"文件名包含不允许的字符{illegalChars}", App.ServiceLoader.GetString("Text_ok"), IconType.Tip);
+                        alertsMessage.ShowDialog($"{App.MainPageLoader.GetString("PageEdite_SplitErroTitle")}", $"{App.MainPageLoader.GetString("PageEdite_SplitErroContent")}{illegalChars}", App.ServiceLoader.GetString("Text_ok"), IconType.Tip);
                     }
                 }
 

+ 36 - 0
PDF Office/Strings/MainPage/MainPage.Designer.cs

@@ -2083,6 +2083,42 @@ namespace PDF_Master.Strings.MainPage {
             }
         }
         
+        /// <summary>
+        ///   查找类似 Display Page Size 的本地化字符串。
+        /// </summary>
+        public static string PageEdite_DisplayPageSize {
+            get {
+                return ResourceManager.GetString("PageEdite_DisplayPageSize", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Hide Page Size 的本地化字符串。
+        /// </summary>
+        public static string PageEdite_HidePageSize {
+            get {
+                return ResourceManager.GetString("PageEdite_HidePageSize", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 File name contains invalid characters... 的本地化字符串。
+        /// </summary>
+        public static string PageEdite_SplitErroContent {
+            get {
+                return ResourceManager.GetString("PageEdite_SplitErroContent", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Invalid Characters 的本地化字符串。
+        /// </summary>
+        public static string PageEdite_SplitErroTitle {
+            get {
+                return ResourceManager.GetString("PageEdite_SplitErroTitle", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 Invalid page range or the page number is out of range. Please try again. 的本地化字符串。
         /// </summary>

+ 14 - 0
PDF Office/Strings/MainPage/MainPage.resx

@@ -675,6 +675,20 @@ You can also add files or folders via the lower left button.</value>
   <data name="Outline_Up" xml:space="preserve">
     <value>Promote</value>
   </data>
+  <data name="PageEdite_DisplayPageSize" xml:space="preserve">
+    <value>Display Page Size</value>
+  </data>
+  <data name="PageEdite_HidePageSize" xml:space="preserve">
+    <value>Hide Page Size</value>
+  </data>
+  <data name="PageEdite_SplitErroContent" xml:space="preserve">
+    <value>File name contains invalid characters...</value>
+    <comment>拆分弹窗-分隔符-特殊字符输入提示 内容</comment>
+  </data>
+  <data name="PageEdite_SplitErroTitle" xml:space="preserve">
+    <value>Invalid Characters</value>
+    <comment>拆分弹窗-分隔符-特殊字符输入提示 标题</comment>
+  </data>
   <data name="PageEdit_10Envelope" xml:space="preserve">
     <value>#10 Envelope </value>
     <comment>10号信封(105*241mm)</comment>

+ 2 - 2
PDF Office/Views/PageEdit/PageEditContent.xaml

@@ -155,12 +155,12 @@
                 <Separator Style="{StaticResource HorizontalSeparatorStyle}" />
                 <MenuItem
                     Command="{Binding ShowPageSizeCommand}"
-                    Header="{x:Static mainpage:MainPage.PageEdit_MenuShowPageSize}"
+                    Header="{x:Static mainpage:MainPage.PageEdite_DisplayPageSize}"
                     Visibility="{Binding ShowedPageSize}" />
                 <MenuItem
                     Name="MenuHidePageSize"
                     Command="{Binding ShowPageSizeCommand}"
-                    Header="Hide Page Size"
+                    Header="{x:Static mainpage:MainPage.PageEdite_HidePageSize}"
                     Visibility="{Binding HidePageSize}" />
                 <Separator Style="{StaticResource HorizontalSeparatorStyle}" Visibility="{Binding IsBOTAThumb, Converter={StaticResource UnVisibleConvert}}" />
                 <MenuItem Click="MenuItem_Click" Header="{x:Static mainpage:MainPage.PageEdit_MenuPrint}" />

+ 14 - 8
PDF Office/Views/PageEdit/PageEditContent.xaml.cs

@@ -1012,10 +1012,14 @@ namespace PDF_Master.Views.PageEdit
                         ImgPicture.Source = tempItem.Image;
                         xPos = e.GetPosition(ListPageEdit).X - item_x;
                         yPos = e.GetPosition(ListPageEdit).Y - item_y;
+
+                        ImgPicture.Visibility = Visibility.Visible;
                     }
                 }
                 else
                 {
+                    ImgPicture.Visibility = Visibility.Collapsed;
+
                     DragDropHelper.DragOver(this, e);
                     //从外部拖入的逻辑
                     //var pic = ToBitmapSource(dragingEnterPath);
@@ -1038,14 +1042,16 @@ namespace PDF_Master.Views.PageEdit
                     //虚拟化影响到该值计算
                     var p = VisualTreeHelper.GetOffset(listBoxItem);//计算控件在容器中的偏移(位置)
                     LineInset.Visibility = Visibility.Visible;
-                    if (!isDragingEnter)
-                    {
-                        ImgPicture.Visibility = Visibility.Visible;
-                    }
-                    else
-                    {
-                        ImgPicture.Visibility = Visibility.Collapsed;
-                    }
+
+                    //优化 虚影显示时机,暂时注释这一部分
+                    //if (!isDragingEnter)
+                    //{
+                    //    ImgPicture.Visibility = Visibility.Visible;
+                    //}
+                    //else
+                    //{
+                    //    ImgPicture.Visibility = Visibility.Collapsed;
+                    //}
 
                     var panel = GetWrapPanel(ListPageEdit);