فهرست منبع

bug-合并默认项。搜索未输入内容时不进行

zhuyi 2 سال پیش
والد
کامیت
b8131e3bed

+ 0 - 1
PDF Office/ViewModels/BOTA/OutLineControlViewModel.cs

@@ -641,7 +641,6 @@ namespace PDF_Office.ViewModels.BOTA
                 {
                     node.CanDown = false;
                 }
-
             }
             return node;
         }

+ 7 - 4
PDF Office/ViewModels/Dialog/ToolsDialogs/MergeDialogViewModel.cs

@@ -120,7 +120,7 @@ namespace PDF_Office.ViewModels.Dialog.ToolsDialogs
         {
             for (int i = 0; i < MergeObjectlist.Count; i++)
             {
-                MergeObjectlist[i].ItemIndex = i+1;
+                MergeObjectlist[i].ItemIndex = i + 1;
             }
         }
 
@@ -385,8 +385,11 @@ namespace PDF_Office.ViewModels.Dialog.ToolsDialogs
                 }
                 if (FileType != ".pdf")
                 {
-                   //var x= Properties.Resources.imageex.Split(";");
-                    if (!Properties.Resources.imageex.Contains(FileType))
+                    string imagetype = "*" + FileType;
+                    string[] x = Properties.Resources.imageex.ToLower().Split(';');
+                    List<string> list = x.ToList();
+                    int imageindex = list.IndexOf(imagetype);
+                    if (imageindex < 0)
                     {
                         //图片格式不支持
                         continue;
@@ -401,7 +404,7 @@ namespace PDF_Office.ViewModels.Dialog.ToolsDialogs
                 else
                 {
                     CPDFDocument doc = CPDFDocument.InitWithFilePath(mergeObject.FilePath);
-                    if (doc==null)
+                    if (doc == null)
                     {
                         //图片格式不支持
                         continue;

+ 4 - 0
PDF Office/Views/BOTA/SearchContent.xaml.cs

@@ -41,6 +41,10 @@ namespace PDF_Office.Views.BOTA
                 {
                     return;
                 }
+                if (string.IsNullOrEmpty(text.Text))
+                {
+                    return;
+                }
                 (DataContext as SearchContentViewModel).SearchText(text.Text);
                  HistorySearchText.Remove(text.Text);
                 if (HistorySearchText.Count >= MaxHistoryCount)

+ 1 - 1
PDF Office/Views/Dialog/ToolsDialogs/MergeDialog.xaml

@@ -212,7 +212,7 @@
                 </Grid.ColumnDefinitions>
                 <StackPanel Grid.Row="1" Grid.Column="1">
                     <TextBlock Text=" Page Size" VerticalAlignment="Center" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
-                    <RadioButton Content="Original page size" FontWeight="Regular" FontSize="14" FontFamily="Segoe UI" Tag="0" Margin="0,14,0,0">
+                    <RadioButton IsChecked="True" Content="Original page size" FontWeight="Regular" FontSize="14" FontFamily="Segoe UI" Tag="0" Margin="0,14,0,0">
                         <i:Interaction.Triggers>
                             <i:EventTrigger EventName="Checked">
                                 <i:InvokeCommandAction Command="{Binding SetPageSizeTypeCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=RadioButton}}" PassEventArgsToCommand="True" />