liyijie vor 2 Jahren
Ursprung
Commit
6a8c203931

+ 23 - 9
PDF Office/Helper/ConverterHelper.cs

@@ -38,7 +38,12 @@ namespace PDF_Office.Helper
                 ConvertError error = ConvertError.ERR_UNKNOWN;
                 string filename = GetFileNameAddSuffix(outputFolder, outputFileName, ".docx");
                 result = await Task.Run(() => wordConverter.Convert(outputFolder, ref outputFileName, wordOptions, pageArray, ref error, getProgress));
+                if (result)
+                {
+                       CommonHelper.ShowFileBrowser(outputFileName.Replace("/","\\"));
+                }
             }
+            
             catch (Exception ex)
             {
 
@@ -63,8 +68,7 @@ namespace PDF_Office.Helper
                 result = await Task.Run(() => pptConverter.Convert(outputFolder, ref outputFileName, pptOptions,pageArray, ref error, getProgress));
                 if (result)
                 {
-                    if (File.Exists(outputFileName))
-                        Process.Start(outputFileName);
+                    CommonHelper.ShowFileBrowser(outputFileName.Replace("/", "\\"));
                 }
             }
             catch (Exception ex)
@@ -89,7 +93,7 @@ namespace PDF_Office.Helper
                 if (result)
                 {
                     if (File.Exists(outputFileName))
-                        Process.Start(outputFileName);
+                        CommonHelper.ShowFileBrowser(outputFileName.Replace("/", "\\"));
                     else if (outputFileName == "NoTable")
                         MessageBoxEx.Show("No Table");
                 }
@@ -137,7 +141,10 @@ namespace PDF_Office.Helper
                 ConvertError error = ConvertError.ERR_UNKNOWN;
                 string filename = GetFileNameAddSuffix(outputFolder, outputFileName, ".csv");
                 result = await Task.Run(() => csvConverter.Convert(outputFolder, ref outputFileName, csvOptions, pageArray, ref error, getProgress));
-
+                if (result)
+                {
+                    CommonHelper.ShowFileBrowser(outputFileName.Replace("/", "\\"));
+                }
             }
             catch (Exception ex)
             {
@@ -159,7 +166,10 @@ namespace PDF_Office.Helper
                 ConvertError error = ConvertError.ERR_UNKNOWN;
                 string filename = GetFileNameAddSuffix(outputFolder, outputFileName, ".txt");
                 result = await Task.Run(() => txtConverter.Convert(outputFolder, ref outputFileName, txtOptions, pageArray, ref error, getProgress));
-
+                if (result)
+                {
+                    CommonHelper.ShowFileBrowser(outputFileName.Replace("/", "\\"));
+                }
             }
             catch (Exception ex)
             {
@@ -285,11 +295,10 @@ namespace PDF_Office.Helper
                     DirectoryInfo di = new DirectoryInfo(folderPath);
                     di.Delete(true);
                 }
-                
+
                 if (result)
                 {
-                    if (File.Exists(outputFileName))
-                        Process.Start(outputFileName);
+                    Process.Start(outputFolder.Replace("/", "\\"));
                 }
             }
             catch (Exception ex)
@@ -310,6 +319,10 @@ namespace PDF_Office.Helper
                 string outputFileName = Path.GetFileNameWithoutExtension(inputpath);
                 ConvertError error = ConvertError.ERR_UNKNOWN;
                 result = await Task.Run(() => rtfConverter.Convert(outputFolder, ref outputFileName, rtfOptions,pageArray, ref error, getProgress));
+                if (result)
+                {
+                    CommonHelper.ShowFileBrowser(outputFileName.Replace("/", "\\"));
+                }
             }
             catch (Exception ex)
             {
@@ -332,7 +345,7 @@ namespace PDF_Office.Helper
                 result = await Task.Run(() => htmlConverter.Convert(outputFolder, ref outputFileName, HtmlOption, pageArray, ref error, getProgress));
                 if (result)
                 {
-                    
+                    CommonHelper.ShowFileBrowser(outputFileName.Replace("/", "\\"));
                 }
             }
             catch (Exception ex)
@@ -390,5 +403,6 @@ namespace PDF_Office.Helper
             return outname;
         }
 
+
     }
 }

+ 1 - 1
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageExtractDialogViewModel.cs

@@ -137,7 +137,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
                 }
                 extractdoc.Release();
             }
-            CommonHelper.ShowFileBrowser(currentViewer.Document.FilePath);
+            Process.Start(saveSelectedPath);
             RequestClose.Invoke(new DialogResult(ButtonResult.OK));
         }
 

+ 1 - 1
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePageSplitDialogViewModel.cs

@@ -334,7 +334,7 @@ namespace PDF_Office.ViewModels.Dialog.HomePageToolsDialogs
                     currentViewer.Document.WriteToFilePath(createfilepath);
                 }
             }
-            CommonHelper.ShowFileBrowser(currentViewer.Document.FilePath);
+            Process.Start(saveSelectedPath);
             RequestClose.Invoke(new DialogResult(ButtonResult.OK));
         }
 

+ 2 - 2
PDF Office/Views/Dialog/ConverterDialogs/ConverterCSVDialog.xaml

@@ -86,14 +86,14 @@
                 <Button
                     Width="98"
                     Height="32"
-                    Margin="0,0,124,0"
+                    Margin="0,0,16,0"
                     HorizontalAlignment="Right"
                     Command="{Binding CancelCommand}"
                     Content="取消" />
                 <Button
                     Width="98"
                     Height="32"
-                    Margin="16,0"
+                    Margin="124,0"
                     HorizontalAlignment="Right"
                     Command="{Binding ConverterCommnad}"
                     Content="转换" />

+ 2 - 2
PDF Office/Views/Dialog/ConverterDialogs/ConverterExcelDialog.xaml

@@ -93,14 +93,14 @@
                 <Button
                     Width="98"
                     Height="32"
-                    Margin="0,0,124,0"
+                    Margin="0,0,16,0"
                     HorizontalAlignment="Right"
                     Content="取消" 
                     Command="{Binding CancelCommand}"/>
                 <Button
                     Width="98"
                     Height="32"
-                    Margin="16,0"
+                    Margin="124,0"
                     HorizontalAlignment="Right"
                     Content="转换" 
                     Command = "{Binding ConverterCommnad}"/>

+ 2 - 2
PDF Office/Views/Dialog/ConverterDialogs/ConverterHTMLDialog.xaml

@@ -68,14 +68,14 @@
                 <Button
                     Width="98"
                     Height="32"
-                    Margin="0,0,124,0"
+                    Margin="0,0,16,0"
                     HorizontalAlignment="Right"
                     Content="取消" 
                     Command="{Binding CancelCommand}"/>
                 <Button
                     Width="98"
                     Height="32"
-                    Margin="16,0"
+                    Margin="124,0"
                     HorizontalAlignment="Right"
                     Content="转换" 
                     Command = "{Binding ConverterCommnad}"/>

+ 2 - 2
PDF Office/Views/Dialog/ConverterDialogs/ConverterImgDialog.xaml

@@ -96,14 +96,14 @@
                 <Button
                     Width="98"
                     Height="32"
-                    Margin="0,0,124,0"
+                    Margin="0,0,16,0"
                     HorizontalAlignment="Right"
                     Command="{Binding CancelCommand}"
                     Content="取消" />
                 <Button
                     Width="98"
                     Height="32"
-                    Margin="16,0"
+                    Margin="124,0"
                     HorizontalAlignment="Right"
                     Command="{Binding ConverterCommnad}"
                     Content="转换" />

+ 2 - 2
PDF Office/Views/Dialog/ConverterDialogs/ConverterPPTDialog.xaml

@@ -68,14 +68,14 @@
                 <Button
                     Width="98"
                     Height="32"
-                    Margin="0,0,124,0"
+                    Margin="0,0,16,0"
                     HorizontalAlignment="Right"
                     Content="取消" 
                     Command="{Binding CancelCommand}"/>
                 <Button
                     Width="98"
                     Height="32"
-                    Margin="16,0"
+                    Margin="124,0"
                     HorizontalAlignment="Right"
                     Content="转换" 
                     Command = "{Binding ConverterCommnad}"/>

+ 2 - 2
PDF Office/Views/Dialog/ConverterDialogs/ConverterRTFDialog.xaml

@@ -68,14 +68,14 @@
                 <Button
                     Width="98"
                     Height="32"
-                    Margin="0,0,124,0"
+                    Margin="0,0,16,0"
                     HorizontalAlignment="Right"
                     Content="取消" 
                     Command="{Binding CancelCommand}"/>
                 <Button
                     Width="98"
                     Height="32"
-                    Margin="16,0"
+                    Margin="124,0"
                     HorizontalAlignment="Right"
                     Content="转换" 
                     Command = "{Binding ConverterCommnad}"/>

+ 2 - 2
PDF Office/Views/Dialog/ConverterDialogs/ConverterWordDialog.xaml

@@ -81,14 +81,14 @@
                 <Button
                     Width="98"
                     Height="32"
-                    Margin="0,0,124,0"
+                    Margin="0,0,16,0"
                     HorizontalAlignment="Right"
                     Content="取消" 
                     Command="{Binding CancelCommand}"/>
                 <Button
                     Width="98"
                     Height="32"
-                    Margin="16,0"
+                    Margin="124,0"
                     HorizontalAlignment="Right"
                     Content="转换" 
                     Command = "{Binding ConverterCommnad}"/>