diff --git a/GamesDat.Demo.Wpf/ViewModels/FileWatcherTabViewModel.cs b/GamesDat.Demo.Wpf/ViewModels/FileWatcherTabViewModel.cs
index c2a7a58..1b0d028 100644
--- a/GamesDat.Demo.Wpf/ViewModels/FileWatcherTabViewModel.cs
+++ b/GamesDat.Demo.Wpf/ViewModels/FileWatcherTabViewModel.cs
@@ -15,6 +15,7 @@
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.IO;
+using GamesDat.Core.Telemetry.Sources.AgeOfEmpires4;
namespace GamesDat.Demo.Wpf.ViewModels;
@@ -323,6 +324,33 @@ private void InitializeBuiltInSources()
null);
Sources.Add(brawlhallaSource);
}
+
+ // Add AoE IV source
+ try
+ {
+ var aoe4Path = AgeOfEmpires4ReplayFileSource.GetDefaultReplayPath();
+ System.Diagnostics.Debug.WriteLine($"AoE IV replay path: {aoe4Path}");
+ var aoe4Source = new FileWatcherSourceViewModel(
+ "Age of Empires IV",
+ aoe4Path,
+ "*.*",
+ () => new AgeOfEmpires4ReplayFileSource());
+ aoe4Source.DetectedFiles.CollectionChanged += OnSourceFilesChanged;
+ Sources.Add(aoe4Source);
+ }
+ catch (DirectoryNotFoundException)
+ {
+ // Game not installed - add disabled source
+ var defaultPath = Path.Combine(
+ Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments),
+ "Age of Empires IV", "playback");
+ var aoe4Source = new FileWatcherSourceViewModel(
+ "Age of Empires IV (Not Installed)",
+ defaultPath,
+ "*.*",
+ null);
+ Sources.Add(aoe4Source);
+ }
}
private void OnSourceFilesChanged(object? sender, NotifyCollectionChangedEventArgs e)
diff --git a/GamesDat.Tests/Helpers/FileWatcherTestData.cs b/GamesDat.Tests/Helpers/FileWatcherTestData.cs
index 525cfdc..689bc54 100644
--- a/GamesDat.Tests/Helpers/FileWatcherTestData.cs
+++ b/GamesDat.Tests/Helpers/FileWatcherTestData.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using GamesDat.Core.Telemetry.Sources;
+using GamesDat.Core.Telemetry.Sources.AgeOfEmpires4;
using GamesDat.Core.Telemetry.Sources.Tekken8;
namespace GamesDat.Tests.Helpers;
@@ -12,6 +13,16 @@ namespace GamesDat.Tests.Helpers;
///
public class FileWatcherTestData
{
+
+ ///
+ /// Sources we currently explicitly ignore during testing ebcause they use an
+ /// overly broad pattern ("*.*") and require special handling to avoid test pollution.
+ ///
+ public static Type[] IgnoredSources = [
+ typeof(Tekken8ReplayFileSource),
+ typeof(AgeOfEmpires4ReplayFileSource)
+ ];
+
///
/// Returns all discovered file watcher sources as test case data.
/// Each test case includes: Type sourceType, string[] patterns
@@ -23,9 +34,11 @@ public static IEnumerable