fix: show concatenated path names as dialog filename for multi-select export

- Single: path name as default filename (unchanged)
- Multi: semicolon-separated names as hint, each file still saved individually
This commit is contained in:
tian 2026-06-03 21:16:52 +08:00
parent 1beaa7b24d
commit 897280bb3f

View File

@ -5965,7 +5965,9 @@ namespace NavisworksTransport.UI.WPF.ViewModels
: $"导出 {selectedRoutes.Count} 个路径",
Filter = "XML文件 (*.xml)|*.xml|JSON文件 (*.json)|*.json|CSV文件 (*.csv)|*.csv|DELMIA Apriso XML (*.aprxml)|*.aprxml|所有文件 (*.*)|*.*",
FilterIndex = 1,
FileName = selectedRoutes.Count == 1 ? firstRoute.Name?.Replace(" ", "_") ?? "路径" : "路径",
FileName = selectedRoutes.Count == 1
? firstRoute.Name?.Replace(" ", "_") ?? "路径"
: string.Join("; ", selectedRoutes.Select(r => r.Name.Replace(" ", "_"))),
DefaultExt = "xml",
AddExtension = true
};