Forráskód Böngészése

打印 - 弹窗禁用

liuaoran 1 éve
szülő
commit
6044d5f405

+ 12 - 0
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterDialogViewModel.cs

@@ -383,6 +383,16 @@ namespace PDF_Master.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
         }
         public bool IsFirstOpen = true;
         string Unicode = null;
+
+        private bool _isHitVisible = true;
+        public bool IsHitVisible
+        {
+            get => _isHitVisible;
+            set
+            {
+                SetProperty(ref _isHitVisible, value);
+            }
+        }
         #endregion
 
         #region 委托
@@ -1007,6 +1017,7 @@ namespace PDF_Master.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
         /// </summary>
         public void ConfirmPrint()
         {
+            IsHitVisible = false;
             List<int> PageIndexLists = new List<int>();
 
             if (PageRangeSelectIndex == 4)
@@ -1015,6 +1026,7 @@ namespace PDF_Master.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
                 { //TODO
                     AlertsMessage alertsMessage = new AlertsMessage();
                     alertsMessage.ShowDialog("页面范围输入错误", "", "确定");
+                    IsHitVisible = true;
                     return;
                 }
             }

+ 1 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterDialog.xaml

@@ -3,6 +3,7 @@
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:prism="http://prismlibrary.com/" xmlns:cus="clr-namespace:PDF_Master.CustomControl" xmlns:homepageprinter="clr-namespace:PDF_Master.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
              prism:ViewModelLocator.AutoWireViewModel="True" 
+             IsHitTestVisible="{Binding IsHitVisible, Mode =TwoWay}"
              prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}">
 
             <UserControl.Resources>