diff --git a/src/UI/WPF/ViewModels/PathEditingViewModel.cs b/src/UI/WPF/ViewModels/PathEditingViewModel.cs index 1aff1d8..8cb134f 100644 --- a/src/UI/WPF/ViewModels/PathEditingViewModel.cs +++ b/src/UI/WPF/ViewModels/PathEditingViewModel.cs @@ -5803,26 +5803,24 @@ namespace NavisworksTransport.UI.WPF.ViewModels UpdateMainStatus(statusMsg); var dialogMsg = new StringBuilder(); - dialogMsg.AppendLine($"导入完成"); - dialogMsg.AppendLine(); dialogMsg.AppendLine($"成功导入: {totalImported} 个路径"); if (totalFailed > 0) dialogMsg.AppendLine($"导入失败: {totalFailed} 个路径"); dialogMsg.AppendLine($"来源文件数: {filePaths.Length}"); - System.Windows.MessageBox.Show( + DialogHelper.ShowAutoClosingMessageBox( dialogMsg.ToString(), - "导入结果", - System.Windows.MessageBoxButton.OK, - totalFailed == 0 ? System.Windows.MessageBoxImage.Information : System.Windows.MessageBoxImage.Warning); + "导入完成", + totalFailed == 0 ? System.Windows.MessageBoxImage.Information : System.Windows.MessageBoxImage.Warning, + autoCloseMilliseconds: 5000); } else { UpdateMainStatus($"❌ 导入失败: 所有文件导入失败"); - System.Windows.MessageBox.Show( + DialogHelper.ShowAutoClosingMessageBox( "所有文件导入失败。\n请确认文件格式是否正确。", - "导入结果", - System.Windows.MessageBoxButton.OK, - System.Windows.MessageBoxImage.Error); + "导入失败", + System.Windows.MessageBoxImage.Error, + autoCloseMilliseconds: 5000); } } }