forked from LiteCoder/DoubanFM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGeneralSettingWindow.xaml
81 lines (81 loc) · 5.83 KB
/
GeneralSettingWindow.xaml
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
<!--
Author : K.F.Storm
Email : yk000123 at sina.com
Website : http://www.kfstorm.com
-->
<local:ChildWindowBase x:Class="DoubanFM.GeneralSettingWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:DoubanFM"
xmlns:resx="clr-namespace:DoubanFM.Resources"
x:Name="Window"
Title="{x:Static resx:Resources.GeneralSettingsButton}" Background="#FF813131">
<StackPanel Width="300" Margin="10">
<Grid Margin="0,2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Margin="0,0,10,0" VerticalAlignment="Center" Text="{x:Static resx:Resources.LanguageTextBlock}"/>
<ComboBox x:Name="CbLanguage" Grid.Column="1"/>
</Grid>
<CheckBox x:Name="CheckBoxEnableDownloadRateRestriction" Content="{x:Static resx:Resources.CheckBoxEnableDownloadRateRestriction}" IsChecked="{Binding Settings.EnableDownloadRateRestriction, Mode=TwoWay, Source={StaticResource Player}}" VerticalAlignment="Center" Margin="0,2" Click="CheckBoxEnableDownloadRateRestriction_OnClick"/>
<CheckBox x:Name="CheckBoxAdjustVolumeWithMouseWheel" Content="{x:Static resx:Resources.CheckBoxAdjustVolumeWithMouseWheel}" IsChecked="{Binding Settings.AdjustVolumeWithMouseWheel, Mode=TwoWay, Source={StaticResource Player}}" VerticalAlignment="Center" Margin="0,2"/>
<!--<CheckBox x:Name="CheckBoxRememberLastChannel" Content="{x:Static resx:Resources.CheckBoxRememberLastChannel}" IsChecked="{Binding Settings.RememberLastChannel, Mode=TwoWay, Source={StaticResource Player}}" VerticalAlignment="Center" Margin="0,2"/>-->
<CheckBox x:Name="CheckBoxIsSearchFilterEnabled" Content="{x:Static resx:Resources.CheckBoxIsSearchFilterEnabled}" IsChecked="{Binding Settings.IsSearchFilterEnabled, Mode=TwoWay, Source={StaticResource Player}}" VerticalAlignment="Center" Margin="0,2"/>
<Grid Margin="0,2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Margin="0,0,10,0" VerticalAlignment="Center" Text="{x:Static resx:Resources.OutputDevicesTextBlock}"/>
<ComboBox x:Name="CbOutputDevice" Grid.Column="1" SelectionChanged="CbOutputDevice_SelectionChanged"/>
</Grid>
<GroupBox Margin="0,2" Header="{x:Static resx:Resources.DownloadSearchSettingsGroupBox}">
<StackPanel>
<CheckBox Margin="0,2" IsChecked="{Binding Settings.SearchAlbum, Source={StaticResource Player}}" Content="{x:Static resx:Resources.AlbumSearchCheckBox}"/>
<CheckBox Margin="0,2" IsChecked="{Binding Settings.TrimBrackets, Source={StaticResource Player}}" Content="{x:Static resx:Resources.TrimBracketsCheckBox}"/>
<CheckBox Margin="0,2" x:Name="CbSearchBaiduMusic" Click="CbSearchBaiduMusic_Click" Content="{x:Static resx:Resources.CbSearchBaiduMusic}"/>
<CheckBox Margin="0,2" x:Name="CbSearchQQMusic" Click="CbSearchQQMusic_Click" Content="{x:Static resx:Resources.CbSearchQQMusic}"/>
</StackPanel>
</GroupBox>
<GroupBox Header="{x:Static resx:Resources.ProxyServerGroupBox}" Margin="0,2">
<StackPanel>
<Grid Margin="2">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<!-- Width="0"/> 目前代码有问题,无法设置为不使用代理,所以这里把它隐藏掉-->
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<RadioButton x:Name="RbDefaultProxy" Click="ProxyKindChanged" Content="{x:Static resx:Resources.RbDefaultProxy}"/>
<RadioButton Grid.Column="1" x:Name="RbNoProxy" Click="ProxyKindChanged" Content="{x:Static resx:Resources.RbNoProxy}"/>
<RadioButton Grid.Column="2" x:Name="RbCustomProxy" Click="ProxyKindChanged" Content="{x:Static resx:Resources.RbCustomProxy}"/>
</Grid>
<Grid x:Name="CustomProxyPanel" IsEnabled="{Binding IsChecked, ElementName=RbCustomProxy}" Margin="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Label Content="{x:Static resx:Resources.HostComputerLabel}"/>
<TextBox x:Name="TbHost" Grid.Column="1" Text="{Binding Settings.ProxyHost, Mode=TwoWay, Source={StaticResource Player}}" Height="20"/>
<Label Grid.Column="2" Margin="10,0,0,0" Content="{x:Static resx:Resources.PortLabel}"/>
<TextBox x:Name="TbPort" Grid.Column="3" Text="{Binding Settings.ProxyPort, Mode=TwoWay, Source={StaticResource Player}}" Height="20" MaxLength="10"/>
<Label Grid.Row="1" Content="{x:Static resx:Resources.UserNameLabel}"/>
<TextBox x:Name="TbProxyUsername" Grid.Row="1" Grid.Column="1" Text="{Binding Settings.ProxyUsername, Mode=TwoWay, Source={StaticResource Player}}" Height="20"/>
<Label Grid.Row="1" Grid.Column="2" Margin="10,0,0,0" Content="{x:Static resx:Resources.PasswordBlock}"/>
<PasswordBox x:Name="PbProxyPassword" Grid.Row="1" Grid.Column="3" PasswordChanged="PbProxyPassword_PasswordChanged" Height="20"/>
<Label Grid.Row="2" Grid.ColumnSpan="4" FontSize="11" Content="{x:Static resx:Resources.ProxyNoCredentialsLabel}"/>
</Grid>
<Button x:Name="BtnApplyProxy" HorizontalAlignment="Right" Grid.Column="1" Height="30" Margin="0,2" Click="BtnApplyProxy_Click" Content="{x:Static resx:Resources.BtnApplyProxy}"/>
</StackPanel>
</GroupBox>
</StackPanel>
</local:ChildWindowBase>