From 3beb4e9c56b3a631b62f16c74cb423384bae753f Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Tue, 20 May 2025 21:37:06 +0800 Subject: [PATCH] Use api functions instead --- Flow.Launcher/PublicAPIInstance.cs | 4 ++-- Flow.Launcher/SelectFileManagerWindow.xaml.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index 84448a685..6516388ac 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -356,7 +356,7 @@ namespace Flow.Launcher catch (System.ComponentModel.Win32Exception ex) when (ex.NativeErrorCode == 2) { // File Manager not found - MessageBoxEx.Show( + ShowMsgBox( string.Format(GetTranslation("fileManagerNotFound"), ex.Message), GetTranslation("fileManagerNotFoundTitle"), MessageBoxButton.OK, @@ -366,7 +366,7 @@ namespace Flow.Launcher catch (Exception ex) { // Other exceptions - MessageBoxEx.Show( + ShowMsgBox( string.Format(GetTranslation("folderOpenError"), ex.Message), GetTranslation("errorTitle"), MessageBoxButton.OK, diff --git a/Flow.Launcher/SelectFileManagerWindow.xaml.cs b/Flow.Launcher/SelectFileManagerWindow.xaml.cs index 2ab134c85..e77d6f899 100644 --- a/Flow.Launcher/SelectFileManagerWindow.xaml.cs +++ b/Flow.Launcher/SelectFileManagerWindow.xaml.cs @@ -61,7 +61,7 @@ namespace Flow.Launcher // Check if the selected file manager path is valid if (!IsFileManagerValid(CustomExplorer.Path)) { - MessageBoxResult result = MessageBoxEx.Show( + var result = App.API.ShowMsgBox( string.Format((string)Application.Current.FindResource("fileManagerPathNotFound"), CustomExplorer.Name, CustomExplorer.Path), (string)Application.Current.FindResource("fileManagerPathError"),