2024-08-29 07:48:51 +00:00
|
|
|
using v2rayN.Desktop.ViewModels;
|
|
|
|
|
|
2025-04-02 03:44:23 +00:00
|
|
|
namespace v2rayN.Desktop.Views;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ThemeSettingView.xaml
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class ThemeSettingView : ReactiveUserControl<ThemeSettingViewModel>
|
2024-08-29 07:48:51 +00:00
|
|
|
{
|
2025-04-02 03:44:23 +00:00
|
|
|
public ThemeSettingView()
|
2024-08-29 07:48:51 +00:00
|
|
|
{
|
2025-04-02 03:44:23 +00:00
|
|
|
InitializeComponent();
|
|
|
|
|
ViewModel = new ThemeSettingViewModel();
|
2024-08-29 07:48:51 +00:00
|
|
|
|
2025-07-20 06:16:19 +00:00
|
|
|
cmbCurrentTheme.ItemsSource = Utils.GetEnumNames<ETheme>();
|
2025-11-28 12:31:40 +00:00
|
|
|
cmbCurrentFontSize.ItemsSource = Enumerable.Range(Global.MinFontSize, Global.MinFontSizeCount).ToList();
|
2025-07-20 06:16:19 +00:00
|
|
|
cmbCurrentLanguage.ItemsSource = Global.Languages;
|
2024-08-29 07:48:51 +00:00
|
|
|
|
2025-04-02 03:44:23 +00:00
|
|
|
this.WhenActivated(disposables =>
|
|
|
|
|
{
|
|
|
|
|
this.Bind(ViewModel, vm => vm.CurrentTheme, v => v.cmbCurrentTheme.SelectedValue).DisposeWith(disposables);
|
|
|
|
|
this.Bind(ViewModel, vm => vm.CurrentFontSize, v => v.cmbCurrentFontSize.SelectedValue).DisposeWith(disposables);
|
|
|
|
|
this.Bind(ViewModel, vm => vm.CurrentLanguage, v => v.cmbCurrentLanguage.SelectedValue).DisposeWith(disposables);
|
|
|
|
|
});
|
2024-08-29 07:48:51 +00:00
|
|
|
}
|
2025-01-30 09:10:05 +00:00
|
|
|
}
|