77using System . Windows ;
88using System . Windows . Controls ;
99using System . Windows . Documents ;
10+ using System . Windows . Navigation ;
1011using CommunityToolkit . Mvvm . ComponentModel ;
1112using Flow . Launcher . Infrastructure . UserSettings ;
1213using Flow . Launcher . ViewModel ;
@@ -33,6 +34,7 @@ public int SelectedCustomExplorerIndex
3334 public ObservableCollection < CustomExplorerViewModel > CustomExplorers { get ; set ; }
3435
3536 public CustomExplorerViewModel CustomExplorer => CustomExplorers [ SelectedCustomExplorerIndex ] ;
37+
3638 public SelectFileManagerWindow ( Settings settings )
3739 {
3840 _settings = settings ;
@@ -46,13 +48,9 @@ private void btnCancel_Click(object sender, RoutedEventArgs e)
4648 Close ( ) ;
4749 }
4850
49- private void Hyperlink_RequestNavigate ( object sender , System . Windows . Navigation . RequestNavigateEventArgs e )
51+ private void Hyperlink_RequestNavigate ( object sender , RequestNavigateEventArgs e )
5052 {
51- Process . Start ( new ProcessStartInfo
52- {
53- FileName = e . Uri . AbsoluteUri ,
54- UseShellExecute = true
55- } ) ;
53+ App . API . OpenUrl ( e . Uri . AbsoluteUri ) ;
5654 e . Handled = true ;
5755 }
5856
@@ -62,9 +60,9 @@ private void btnDone_Click(object sender, RoutedEventArgs e)
6260 if ( ! IsFileManagerValid ( CustomExplorer . Path ) )
6361 {
6462 var result = App . API . ShowMsgBox (
65- string . Format ( ( string ) Application . Current . FindResource ( "fileManagerPathNotFound" ) ,
63+ string . Format ( App . API . GetTranslation ( "fileManagerPathNotFound" ) ,
6664 CustomExplorer . Name , CustomExplorer . Path ) ,
67- ( string ) Application . Current . FindResource ( "fileManagerPathError" ) ,
65+ App . API . GetTranslation ( "fileManagerPathError" ) ,
6866 MessageBoxButton . YesNo ,
6967 MessageBoxImage . Warning ) ;
7068
@@ -136,11 +134,7 @@ private async void btnTips_Click(object sender, RoutedEventArgs e)
136134 hyperlink . Inlines . Add ( url ) ;
137135 hyperlink . RequestNavigate += ( s , args ) =>
138136 {
139- Process . Start ( new ProcessStartInfo
140- {
141- FileName = args . Uri . AbsoluteUri ,
142- UseShellExecute = true
143- } ) ;
137+ App . API . OpenUrl ( args . Uri . AbsoluteUri ) ;
144138 args . Handled = true ;
145139 } ;
146140
0 commit comments