liyijie 2 yıl önce
ebeveyn
işleme
79d50f3212

+ 1 - 0
PDF Office/Helper/SecurityHelper.cs

@@ -122,6 +122,7 @@ namespace PDF_Office.Helper
             {
                 verifyPasswordResult.IsDiscryptied = e.Parameters.GetValue<bool>(ParameterNames.PasswordResult);
                 verifyPasswordResult.Password = e.Parameters.GetValue<string>(ParameterNames.Password);
+                
             });
             return verifyPasswordResult;
         }

+ 6 - 6
PDF Office/Model/Dialog/ToolsDialogs/CompressDialogModel/CompressDialogModel.cs

@@ -59,17 +59,17 @@ namespace PDF_Office.Model.Dialog.ToolsDialogs
                 App.mainWindowViewModel.ProgressTitle = "Compressing";
                 App.mainWindowViewModel.IsProcessVisible = System.Windows.Visibility.Visible;
                 App.mainWindowViewModel.MaxValue = doc.PageCount;
-                CPDFDocument document = CPDFDocument.InitWithFilePath(doc.FilePath);
-                document.UnlockWithPassword(password);
+                //CPDFDocument document = CPDFDocument.InitWithFilePath(doc.FilePath);
+                doc.UnlockWithPassword(password);
                 indexDelegate += GetIndex;
-                compressingIntpr = document.CompressFile_Init(compressquality, indexDelegate);
+                compressingIntpr = doc.CompressFile_Init(compressquality, indexDelegate);
                 //GC.KeepAlive(indexDelegate);
-                tempDocument = document;
+                tempDocument = doc;
                 Trace.WriteLine("compressDialogModel.CompressQuality" + compressquality);
                 App.mainWindowViewModel.ProcessCloseAction = CompressClear;
-                await Task.Run<bool>(() => { return document.CompressFile_Start(compressingIntpr, filepath); });
+                await Task.Run<bool>(() => { return doc.CompressFile_Start(compressingIntpr, filepath); });
                 CommonHelper.ShowFileBrowser(filepath);
-                document.Release();
+                doc.Release();
             }
         }
     }

+ 2 - 2
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePictureToPDFDialogViewModel.cs

@@ -227,7 +227,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
                     fileNamesIndex++;
                 }
                 System.Diagnostics.Process.Start("Explorer", "/select," + NewFileName);
-                topdfdoc.WriteToFilePath(CommonHelper.CreateFilePath(NewFileName));
+                topdfdoc.WriteToFilePath(NewFileName);
                 topdfdoc.Release();
             }
             if (pictureToPDFModel.Mode == HomePagePictureToPDFDialogModel.ToPDFFileMode.SelectFileName)
@@ -339,7 +339,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
             FileNameNumber = fileNames.Count;
             System.Windows.Forms.OpenFileDialog dlg = new System.Windows.Forms.OpenFileDialog();
             dlg.Multiselect = true;
-            dlg.Filter = "Picture|*.png;*.PNG;*.jpg;*.JPG;*.bmp;*.gif;*tiff;";
+            dlg.Filter = "Picture|*.png;*.PNG;*.jpg;*.JPG;*.bmp;*.gif;*tiff;*jpeg;";
             if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
             {
                 fileNames.AddRange(dlg.FileNames.ToList());

+ 2 - 2
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePictureToPDFDialog.xaml

@@ -126,12 +126,12 @@
                             <GridViewColumn  Header="文档名"  Width="400" DisplayMemberBinding="{Binding FileName}">
                             </GridViewColumn>
                             <GridViewColumn Header="大小" Width="100" DisplayMemberBinding="{Binding FileSize}"/>
-                            <GridViewColumn Header="状态" Width="82" >
+                            <GridViewColumn Header="状态" Width="86" >
                                 <GridViewColumn.CellTemplate>
                                     <DataTemplate>
                                         <StackPanel Orientation="Horizontal">
                                             <cus:BatchStatus StatusValue="{Binding FileState,Mode=TwoWay}" Width="16" Height="16" MaxStatusValue="{Binding MaxPageRange,Mode=TwoWay}"/>
-                                            <Button Name="DeleteTemplateBtn" Width="17" Height="17"  Margin="39,0,0,0" Click="DeleteTemplateBtn_Click" Style="{StaticResource btn.sec}">
+                                            <Button Name="DeleteTemplateBtn" Width="18" Height="18" Background="Transparent"  BorderBrush="Transparent" Margin="39,0,0,0" Click="DeleteTemplateBtn_Click" Style="{StaticResource btn.sec}">
                                                 <Grid Width="14" Height="14">
                                                     <Path Data ="M7 14C10.866 14 14 10.866 14 7C14 3.13401 10.866 0 7 0C3.13401 0 0 3.13401 0 7C0 10.866 3.13401 14 7 14ZM10.5303 4.53038L8.06069 7L10.5303 9.46962L9.46967 10.5303L7.00002 8.06066L4.53033 10.5303L3.46967 9.46967L5.93936 7L3.46967 4.53033L4.53033 3.46967L7.00002 5.93934L9.46967 3.46971L10.5303 4.53038Z" Fill="#CED0D4" Stretch="Fill"/>
                                                 </Grid>

+ 2 - 1
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePictureToPDFDialog.xaml.cs

@@ -16,6 +16,7 @@ using System.Windows.Controls;
 using System.Windows.Input;
 using System.Windows.Interop;
 using System.Xml.Linq;
+using static Dropbox.Api.Files.ThumbnailFormat;
 
 namespace PDF_Office.Views.Dialog.HomePageToolsDialogs
 {
@@ -112,7 +113,7 @@ namespace PDF_Office.Views.Dialog.HomePageToolsDialogs
                 {
                     dropFile = ((System.Array)e.Data.GetData(System.Windows.DataFormats.FileDrop)).GetValue(i).ToString(); ;
                     //MessageBox.Show(dropFile);
-                    if (dropFile.ToLower().EndsWith("png")|| dropFile.ToLower().EndsWith("jpg")|| dropFile.ToLower().EndsWith("bmp")|| dropFile.ToLower().EndsWith("gif")|| dropFile.ToLower().EndsWith("tiff"))
+                    if (dropFile.ToLower().EndsWith("png")|| dropFile.ToLower().EndsWith("jpg")|| dropFile.ToLower().EndsWith("bmp")|| dropFile.ToLower().EndsWith("gif")|| dropFile.ToLower().EndsWith("tiff")|| dropFile.ToLower().EndsWith("jpeg"))
                     { viewModel.addPicture(dropFile); }
                 }
             }