using Avalonia; using Avalonia.Animation; using Avalonia.Controls; using Avalonia.Input; using Avalonia.Interactivity; using Avalonia.Markup.Xaml; using Avalonia.Media; using Avalonia.Threading; using LanMountainDesktop.Launcher.Models; using LanMountainDesktop.Launcher.Services; namespace LanMountainDesktop.Launcher.Views; public partial class OobeWindow : Window { private const int AnimationDurationMs = 300; private const int TypingDelayMs = 100; private readonly TaskCompletionSource _completionSource = new(); private readonly DataLocationResolver _resolver; private bool _isTransitioning; private bool _isDebugMode; private int _currentStep = 1; // 数据位置选择 private DataLocationMode _selectedDataLocationMode = DataLocationMode.System; private bool _migrateExistingData; // 主题选择 private Services.ThemeMode _selectedThemeMode = Services.ThemeMode.Light; private string _selectedAccentColor = "#0078D4"; private MonetSource _selectedMonetSource = MonetSource.Wallpaper; public OobeWindow() { AvaloniaXamlLoader.Load(this); Loaded += OnWindowLoaded; Opened += OnWindowOpened; var appRoot = AppDomain.CurrentDomain.BaseDirectory; _resolver = new DataLocationResolver(appRoot); } public void SetDebugMode(bool isDebugMode) { _isDebugMode = isDebugMode; } public Task WaitForEnterAsync() => _completionSource.Task; private void OnWindowLoaded(object? sender, RoutedEventArgs e) { InitializeDataLocationStep(); SetupEventHandlers(); } private void SetupEventHandlers() { // 步骤 1: 开始按钮 if (this.FindControl