You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
211 lines
11 KiB
211 lines
11 KiB
<reactive:ReactiveUserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:vm="using:MyAvaloniaApp.ViewModels.Pages"
|
|
xmlns:reactive="clr-namespace:Avalonia.ReactiveUI;assembly=Avalonia.ReactiveUI"
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="600"
|
|
x:Class="MyAvaloniaApp.Views.Pages.SettingsPageView"
|
|
x:DataType="vm:SettingsPageViewModel">
|
|
|
|
<Design.DataContext>
|
|
<vm:SettingsPageViewModel />
|
|
</Design.DataContext>
|
|
|
|
<Grid>
|
|
<!-- 设置内容 -->
|
|
<ScrollViewer>
|
|
<StackPanel Spacing="20">
|
|
|
|
<!-- 外观设置 -->
|
|
<Border Background="White"
|
|
CornerRadius="10"
|
|
BorderBrush="#DEE2E6"
|
|
BorderThickness="1"
|
|
Padding="25">
|
|
<StackPanel>
|
|
<TextBlock Text="🎨 外观设置"
|
|
FontSize="18"
|
|
FontWeight="Bold"
|
|
Foreground="#2C3E50"
|
|
Margin="0,0,0,20"/>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- 深色模式 -->
|
|
<Grid Grid.Row="0" Margin="0,0,0,15">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0">
|
|
<TextBlock Text="深色模式"
|
|
FontSize="14"
|
|
FontWeight="SemiBold"
|
|
Foreground="#2C3E50"/>
|
|
<TextBlock Text="启用深色主题界面"
|
|
FontSize="12"
|
|
Foreground="#6C757D"
|
|
Margin="0,2,0,0"/>
|
|
</StackPanel>
|
|
<ToggleButton Grid.Column="1"
|
|
IsChecked="{Binding DarkMode}"
|
|
Width="50" Height="25"/>
|
|
</Grid>
|
|
|
|
<!-- 语言设置 -->
|
|
<Grid Grid.Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="200"/>
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0">
|
|
<TextBlock Text="界面语言"
|
|
FontSize="14"
|
|
FontWeight="SemiBold"
|
|
Foreground="#2C3E50"/>
|
|
<TextBlock Text="选择系统界面显示语言"
|
|
FontSize="12"
|
|
Foreground="#6C757D"
|
|
Margin="0,2,0,0"/>
|
|
</StackPanel>
|
|
<ComboBox Grid.Column="1"
|
|
SelectedItem="{Binding Language}"
|
|
HorizontalAlignment="Right">
|
|
<ComboBoxItem Content="中文 (简体)" Tag="zh-CN"/>
|
|
<ComboBoxItem Content="English" Tag="en-US"/>
|
|
<ComboBoxItem Content="日本語" Tag="ja-JP"/>
|
|
</ComboBox>
|
|
</Grid>
|
|
</Grid>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- 通知设置 -->
|
|
<Border Background="White"
|
|
CornerRadius="10"
|
|
BorderBrush="#DEE2E6"
|
|
BorderThickness="1"
|
|
Padding="25">
|
|
<StackPanel>
|
|
<TextBlock Text="🔔 通知设置"
|
|
FontSize="18"
|
|
FontWeight="Bold"
|
|
Foreground="#2C3E50"
|
|
Margin="0,0,0,20"/>
|
|
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0">
|
|
<TextBlock Text="系统通知"
|
|
FontSize="14"
|
|
FontWeight="SemiBold"
|
|
Foreground="#2C3E50"/>
|
|
<TextBlock Text="接收系统消息和提醒通知"
|
|
FontSize="12"
|
|
Foreground="#6C757D"
|
|
Margin="0,2,0,0"/>
|
|
</StackPanel>
|
|
<ToggleButton Grid.Column="1"
|
|
IsChecked="{Binding Notifications}"
|
|
Width="50" Height="25"/>
|
|
</Grid>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- 性能设置 -->
|
|
<Border Background="White"
|
|
CornerRadius="10"
|
|
BorderBrush="#DEE2E6"
|
|
BorderThickness="1"
|
|
Padding="25">
|
|
<StackPanel>
|
|
<TextBlock Text="⚡ 性能设置"
|
|
FontSize="18"
|
|
FontWeight="Bold"
|
|
Foreground="#2C3E50"
|
|
Margin="0,0,0,20"/>
|
|
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="200"/>
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0">
|
|
<TextBlock Text="数据刷新间隔"
|
|
FontSize="14"
|
|
FontWeight="SemiBold"
|
|
Foreground="#2C3E50"/>
|
|
<TextBlock Text="设置数据自动刷新的时间间隔"
|
|
FontSize="12"
|
|
Foreground="#6C757D"
|
|
Margin="0,2,0,0"/>
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="10">
|
|
<Slider Value="{Binding RefreshInterval}"
|
|
Minimum="10"
|
|
Maximum="300"
|
|
Width="120"
|
|
VerticalAlignment="Center"/>
|
|
<TextBlock Text="{Binding RefreshInterval}"
|
|
FontSize="12"
|
|
Foreground="#2C3E50"
|
|
VerticalAlignment="Center"
|
|
Width="30"/>
|
|
<TextBlock Text="秒"
|
|
FontSize="12"
|
|
Foreground="#6C757D"
|
|
VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- 操作按钮 -->
|
|
<StackPanel Orientation="Horizontal"
|
|
Spacing="15"
|
|
HorizontalAlignment="Right"
|
|
Margin="0,20,0,0">
|
|
<Button Background="#27AE60"
|
|
Foreground="White"
|
|
BorderThickness="0"
|
|
CornerRadius="5"
|
|
Padding="20,12">
|
|
<StackPanel Orientation="Horizontal" Spacing="5">
|
|
<TextBlock Text="💾" FontSize="14"/>
|
|
<TextBlock Text="保存设置" FontSize="14"/>
|
|
</StackPanel>
|
|
</Button>
|
|
<Button Background="#95A5A6"
|
|
Foreground="White"
|
|
BorderThickness="0"
|
|
CornerRadius="5"
|
|
Padding="20,12">
|
|
<StackPanel Orientation="Horizontal" Spacing="5">
|
|
<TextBlock Text="🔄" FontSize="14"/>
|
|
<TextBlock Text="重置默认" FontSize="14"/>
|
|
</StackPanel>
|
|
</Button>
|
|
<Button Background="#E74C3C"
|
|
Foreground="White"
|
|
BorderThickness="0"
|
|
CornerRadius="5"
|
|
Padding="20,12">
|
|
<StackPanel Orientation="Horizontal" Spacing="5">
|
|
<TextBlock Text="❌" FontSize="14"/>
|
|
<TextBlock Text="取消" FontSize="14"/>
|
|
</StackPanel>
|
|
</Button>
|
|
</StackPanel>
|
|
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</reactive:ReactiveUserControl>
|
|
|