7
7
using System . Windows ;
8
8
using System . Windows . Controls ;
9
9
using System . Windows . Documents ;
10
+ using System . Windows . Navigation ;
10
11
using CommunityToolkit . Mvvm . ComponentModel ;
11
12
using Flow . Launcher . Infrastructure . UserSettings ;
12
13
using Flow . Launcher . ViewModel ;
@@ -33,6 +34,7 @@ public int SelectedCustomExplorerIndex
33
34
public ObservableCollection < CustomExplorerViewModel > CustomExplorers { get ; set ; }
34
35
35
36
public CustomExplorerViewModel CustomExplorer => CustomExplorers [ SelectedCustomExplorerIndex ] ;
37
+
36
38
public SelectFileManagerWindow ( Settings settings )
37
39
{
38
40
_settings = settings ;
@@ -46,13 +48,9 @@ private void btnCancel_Click(object sender, RoutedEventArgs e)
46
48
Close ( ) ;
47
49
}
48
50
49
- private void Hyperlink_RequestNavigate ( object sender , System . Windows . Navigation . RequestNavigateEventArgs e )
51
+ private void Hyperlink_RequestNavigate ( object sender , RequestNavigateEventArgs e )
50
52
{
51
- Process . Start ( new ProcessStartInfo
52
- {
53
- FileName = e . Uri . AbsoluteUri ,
54
- UseShellExecute = true
55
- } ) ;
53
+ App . API . OpenUrl ( e . Uri . AbsoluteUri ) ;
56
54
e . Handled = true ;
57
55
}
58
56
@@ -62,9 +60,9 @@ private void btnDone_Click(object sender, RoutedEventArgs e)
62
60
if ( ! IsFileManagerValid ( CustomExplorer . Path ) )
63
61
{
64
62
var result = App . API . ShowMsgBox (
65
- string . Format ( ( string ) Application . Current . FindResource ( "fileManagerPathNotFound" ) ,
63
+ string . Format ( App . API . GetTranslation ( "fileManagerPathNotFound" ) ,
66
64
CustomExplorer . Name , CustomExplorer . Path ) ,
67
- ( string ) Application . Current . FindResource ( "fileManagerPathError" ) ,
65
+ App . API . GetTranslation ( "fileManagerPathError" ) ,
68
66
MessageBoxButton . YesNo ,
69
67
MessageBoxImage . Warning ) ;
70
68
@@ -136,11 +134,7 @@ private async void btnTips_Click(object sender, RoutedEventArgs e)
136
134
hyperlink . Inlines . Add ( url ) ;
137
135
hyperlink . RequestNavigate += ( s , args ) =>
138
136
{
139
- Process . Start ( new ProcessStartInfo
140
- {
141
- FileName = args . Uri . AbsoluteUri ,
142
- UseShellExecute = true
143
- } ) ;
137
+ App . API . OpenUrl ( args . Uri . AbsoluteUri ) ;
144
138
args . Handled = true ;
145
139
} ;
146
140
0 commit comments