Use api functions instead

This commit is contained in:
Jack251970 2025-05-20 21:37:06 +08:00
parent c0eaf1cf5c
commit 3beb4e9c56
2 changed files with 3 additions and 3 deletions

View file

@ -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,

View file

@ -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"),