11// Copyright (c) Files Community
22// Licensed under the MIT License.
33
4- using Microsoft . UI . Xaml . Controls ;
5-
64namespace Files . App . Actions
75{
86 internal sealed partial class OpenRepoInIDEAction : ObservableObject , IAction
@@ -12,10 +10,10 @@ internal sealed partial class OpenRepoInIDEAction : ObservableObject, IAction
1210 private readonly IContentPageContext _context ;
1311
1412 public string Label
15- => string . Format ( "OpenRepoInIDE" . GetLocalizedResource ( ) , _devToolsSettingsService . FriendlyIDEName ) ;
13+ => string . Format ( "OpenRepoInIDE" . GetLocalizedResource ( ) , _devToolsSettingsService . IDEFriendlyName ) ;
1614
1715 public string Description
18- => string . Format ( "OpenRepoInIDEDescription" . GetLocalizedResource ( ) , _devToolsSettingsService . FriendlyIDEName ) ;
16+ => string . Format ( "OpenRepoInIDEDescription" . GetLocalizedResource ( ) , _devToolsSettingsService . IDEFriendlyName ) ;
1917
2018 public bool IsExecutable =>
2119 _context . Folder is not null &&
@@ -38,7 +36,7 @@ public async Task ExecuteAsync(object? parameter = null)
3836 ) ;
3937
4038 if ( ! res )
41- await ShowErrorDialog ( ) ;
39+ await DynamicDialogFactory . ShowFor_IDEErrorDialog ( ) ;
4240 }
4341
4442 private void Context_PropertyChanged ( object ? sender , PropertyChangedEventArgs e )
@@ -53,30 +51,11 @@ private void DevSettings_PropertyChanged(object? sender, PropertyChangedEventArg
5351 {
5452 OnPropertyChanged ( nameof ( IsExecutable ) ) ;
5553 }
56- else if ( e . PropertyName == nameof ( IDevToolsSettingsService . FriendlyIDEName ) )
54+ else if ( e . PropertyName == nameof ( IDevToolsSettingsService . IDEFriendlyName ) )
5755 {
5856 OnPropertyChanged ( nameof ( Label ) ) ;
5957 OnPropertyChanged ( nameof ( Description ) ) ;
6058 }
6159 }
62-
63- private async Task ShowErrorDialog ( )
64- {
65- var commands = Ioc . Default . GetRequiredService < ICommandManager > ( ) ;
66- var errorDialog = new ContentDialog ( )
67- {
68- Title = Strings . IDEError . GetLocalizedResource ( ) ,
69- Content = Strings . SelectedIDENotValid . GetLocalizedResource ( ) ,
70- PrimaryButtonText = Strings . OK . GetLocalizedResource ( ) ,
71- SecondaryButtonText = Strings . EditInSettings . GetLocalizedResource ( ) ,
72- } ;
73-
74- if ( await errorDialog . TryShowAsync ( ) == ContentDialogResult . Secondary )
75- {
76- await commands . OpenSettings . ExecuteAsync (
77- new SettingsNavigationParams ( ) { PageKind = SettingsPageKind . DevToolsPage }
78- ) ;
79- }
80- }
8160 }
8261}
0 commit comments