-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSettingsWindow.axaml
More file actions
93 lines (82 loc) · 4.73 KB
/
Copy pathSettingsWindow.axaml
File metadata and controls
93 lines (82 loc) · 4.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="BrainFuel.SettingsWindow"
Width="460" Height="560"
CanResize="False"
WindowStartupLocation="CenterOwner"
ShowInTaskbar="True"
Topmost="True"
WindowDecorations="Full">
<Grid RowDefinitions="Auto, *, Auto">
<!-- header -->
<StackPanel Grid.Row="0" Margin="24,20,24,8" Spacing="6">
<TextBlock Text="{DynamicResource SettingsTitle}" FontSize="18" FontWeight="Bold"/>
<TextBlock Text="{DynamicResource SettingsDesc}"
Foreground="#FF9FA0A0" TextWrapping="Wrap"/>
</StackPanel>
<!-- form (right margin reserves space for the scrollbar) -->
<ScrollViewer Grid.Row="1" Margin="24,0" HorizontalScrollBarVisibility="Disabled">
<StackPanel Spacing="16" Margin="0,0,18,0">
<StackPanel Spacing="4">
<TextBlock Text="{DynamicResource LblLanguage}"/>
<ComboBox x:Name="LangBox" SelectedIndex="0" HorizontalAlignment="Stretch">
<ComboBoxItem Content="中文"/>
<ComboBoxItem Content="English"/>
</ComboBox>
</StackPanel>
<StackPanel Spacing="4">
<TextBlock Text="{DynamicResource LblTheme}"/>
<ComboBox x:Name="ThemeBox" SelectedIndex="2" HorizontalAlignment="Stretch">
<ComboBoxItem Content="{DynamicResource ThemeSystem}"/>
<ComboBoxItem Content="{DynamicResource ThemeLight}"/>
<ComboBoxItem Content="{DynamicResource ThemeDark}"/>
</ComboBox>
</StackPanel>
<StackPanel Spacing="4">
<TextBlock Text="{DynamicResource LblOpacity}"/>
<Slider x:Name="OpacitySlider" Minimum="0.3" Maximum="1" Value="1"
TickFrequency="0.05" IsSnapToTickEnabled="True"
HorizontalAlignment="Stretch"/>
</StackPanel>
<StackPanel Spacing="4">
<TextBlock Text="{DynamicResource LblApiKey}"/>
<TextBox x:Name="KeyBox" PlaceholderText="{DynamicResource KeyPlaceholder}"
PasswordChar="•" HorizontalAlignment="Stretch"/>
</StackPanel>
<StackPanel Spacing="4">
<TextBlock Text="{DynamicResource LblPlatform}"/>
<ComboBox x:Name="PlatformBox" SelectedIndex="0" HorizontalAlignment="Stretch">
<ComboBoxItem Content="{DynamicResource PlatformCn}"/>
<ComboBoxItem Content="{DynamicResource PlatformIntl}"/>
</ComboBox>
</StackPanel>
<StackPanel Spacing="4">
<TextBlock Text="{DynamicResource LblInterval}"/>
<NumericUpDown x:Name="IntervalBox" Minimum="1" Maximum="60" Value="5"
Width="140" HorizontalAlignment="Left"/>
</StackPanel>
<StackPanel Spacing="6">
<CheckBox x:Name="WeeklyRemaining" Content="{DynamicResource ChkWeeklyRemaining}"/>
<CheckBox x:Name="HourlyRemaining" Content="{DynamicResource ChkHourlyRemaining}"/>
</StackPanel>
<Border Height="1" Background="#22000000" Margin="0,4"/>
<CheckBox x:Name="AutoStartBox" Content="{DynamicResource ChkAutostart}"/>
<StackPanel Spacing="6">
<CheckBox x:Name="NotifyBox" Content="{DynamicResource ChkNotify}"/>
<StackPanel Orientation="Horizontal" Spacing="8" Margin="24,0,0,0">
<TextBlock Text="{DynamicResource LblThreshold}" VerticalAlignment="Center" FontSize="12"/>
<NumericUpDown x:Name="ThresholdBox" Minimum="10" Maximum="99" Value="80" Width="140"/>
</StackPanel>
</StackPanel>
</StackPanel>
</ScrollViewer>
<!-- footer -->
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right"
Spacing="10" Margin="24,8,24,20">
<Button Content="{DynamicResource BtnCancel}" Click="Cancel_Click" Width="100"
HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
<Button Content="{DynamicResource BtnSave}" Click="Save_Click" Width="100" Classes="accent"
HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
</StackPanel>
</Grid>
</Window>