using XFEExtension.NetCore.WinUIHelper.Utilities.Helper; namespace XFEWorkflow.Views { /// /// ����ҳ�� /// public sealed partial class SettingPage : Page { public static SettingPage? Current { get; set; } public SettingPageViewModel ViewModel { get; set; } = new(); public SettingPage() { Current = this; this.InitializeComponent(); ViewModel.DialogService.RegisterDialog(cleanCacheContentDialog); ViewModel.SettingService.AddComboBox(appThemeComboBox, ProfileHelper.GetEnumProfileSaveFunc(), ProfileHelper.GetEnumProfileLoadFuncForComboBox()); ViewModel.SettingService.Initialize(); ViewModel.SettingService.RegisterEvents(); ServerAddress.Text = Services.AppServices.Current.State.SpaceAddress; CredentialsHost.Content = new Controls.CredentialSettings(); DesktopInputHost.Content = new Controls.DesktopInputSettings(); } protected override void OnNavigatedTo(Microsoft.UI.Xaml.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); SettingsTabs.SelectedIndex = (e.Parameter as string) switch { "credentials" => 1, "input" => 2, _ => 0 }; } } }