diff --git a/src/Models/SimulateConfigModel.cs b/src/Models/SimulateConfigModel.cs
index 3044d17..beb9539 100644
--- a/src/Models/SimulateConfigModel.cs
+++ b/src/Models/SimulateConfigModel.cs
@@ -2,6 +2,9 @@
namespace GeneralUpdate.Tools.Models;
+public record PlatformItem(int Value, string DisplayName) { public override string ToString() => DisplayName; }
+public record AppTypeItem(int Value, string DisplayName) { public override string ToString() => DisplayName; }
+
///
/// Configuration for the simulate-update module.
///
@@ -19,11 +22,11 @@ public partial class SimulateConfigModel : ObservableObject
/// The target version the patch upgrades to.
[ObservableProperty] private string _targetVersion = "2.0.0.0";
- /// Platform selector (1=Windows, 2=Linux).
- [ObservableProperty] private int _platform = 1;
+ /// Platform selector.
+ [ObservableProperty] private PlatformItem _platform = new(1, "Windows");
- /// AppType sent to the server (1=ClientApp, 2=UpgradeApp).
- [ObservableProperty] private int _appType = 1;
+ /// AppType selector.
+ [ObservableProperty] private AppTypeItem _appType = new(1, "ClientApp");
/// Application secret key for the update API.
[ObservableProperty] private string _appSecretKey = "dfeb5833-975e-4afb-88f1-6278ee9aeff6";
diff --git a/src/Services/ReportGeneratorService.cs b/src/Services/ReportGeneratorService.cs
index 899cb92..45dba05 100644
--- a/src/Services/ReportGeneratorService.cs
+++ b/src/Services/ReportGeneratorService.cs
@@ -26,8 +26,8 @@ public async Task GenerateAsync(
sb.AppendLine("|-------|-------|");
sb.AppendLine($"| Patch | {EscapeMd(config.PatchFilePath)} |");
sb.AppendLine($"| App Directory | {EscapeMd(config.AppDirectory)} |");
- sb.AppendLine($"| Platform | {config.Platform} |");
- sb.AppendLine($"| AppType | {config.AppType} |");
+ sb.AppendLine($"| Platform | {config.Platform.DisplayName} |");
+ sb.AppendLine($"| AppType | {config.AppType.DisplayName} |");
sb.AppendLine($"| Version | {config.CurrentVersion} → {config.TargetVersion} |");
sb.AppendLine($"| Server Port | {config.ServerPort} |");
sb.AppendLine($"| Simulation Time | {DateTime.Now:yyyy-MM-dd HH:mm:ss} |");
diff --git a/src/Services/SimulationService.cs b/src/Services/SimulationService.cs
index 0e828d9..9e7d6c0 100644
--- a/src/Services/SimulationService.cs
+++ b/src/Services/SimulationService.cs
@@ -50,7 +50,7 @@ public async Task RunAsync(
var hash = ComputeQuickHash(patchDest);
LocalUpdateServerFiles.Register(patchName, patchDest);
- _server.Updates.Add((config.CurrentVersion, config.TargetVersion, hash, patchDest, config.AppType));
+ _server.Updates.Add((config.CurrentVersion, config.TargetVersion, hash, patchDest, config.AppType.Value));
await _server.StartAsync(config.ServerPort);
Log($" Server running on {_server.BaseUrl}", progress);
diff --git a/src/ViewModels/SimulateViewModel.cs b/src/ViewModels/SimulateViewModel.cs
index bb2605f..9f1eb3d 100644
--- a/src/ViewModels/SimulateViewModel.cs
+++ b/src/ViewModels/SimulateViewModel.cs
@@ -107,6 +107,3 @@ async Task StartSimulation()
void L(string msg) => Log.Add($"[{DateTime.Now:HH:mm:ss}] {msg}");
}
-
-public record PlatformItem(int Value, string DisplayName) { public override string ToString() => DisplayName; }
-public record AppTypeItem(int Value, string DisplayName) { public override string ToString() => DisplayName; }
diff --git a/src/Views/SimulateView.axaml b/src/Views/SimulateView.axaml
index aa2dc5d..39064cd 100644
--- a/src/Views/SimulateView.axaml
+++ b/src/Views/SimulateView.axaml
@@ -13,12 +13,12 @@
-
+
-
+
@@ -38,18 +38,18 @@
+ SelectedItem="{Binding Config.Platform}" Margin="8,0,16,0"
+ SelectedIndex="0"/>
+ SelectedItem="{Binding Config.AppType}" Margin="8,0"
+ SelectedIndex="0"/>
-
+
-
-
-
-
-
+
+
+
@@ -59,7 +59,7 @@
-
+