<Metro:MetroWindow x:Class="JianGongYun.TRTC.Windows.SettingWindow"
        xmlns:Metro="clr-namespace:AduSkin.Controls.Metro;assembly=AduSkin" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        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:local="clr-namespace:JianGongYun.TRTC.Windows"
        mc:Ignorable="d"
        ResizeMode="NoResize"          
        Title="设置" Height="380" Width="600">
    <Metro:MetroWindow.Resources>

        <DataTemplate x:Key="CusHeaderTitle1">
            <TextBlock Foreground="#aaaaaa" FontWeight="Bold" Background="Transparent">音频设置</TextBlock>
        </DataTemplate>
        <DataTemplate x:Key="CusHeaderTitle2">
            <TextBlock Foreground="#aaaaaa" FontWeight="Bold" Background="Transparent">录屏设置</TextBlock>
        </DataTemplate>
        <DataTemplate x:Key="CusHeaderTitle3">
            <TextBlock Foreground="#aaaaaa" FontWeight="Bold" Background="Transparent">直播设置</TextBlock>
        </DataTemplate>
    </Metro:MetroWindow.Resources>
    <Metro:AduNavigationPanel IndicatorStyle="{StaticResource LeftIndicatorStyle}" IndicatorItemContainerStyle="{StaticResource LeftIndicatorItemStyle}" x:Name="navigationPanel"
                                Height="auto" Width="auto"
                                IndicatorMargin="0" IndicatorHorizontalAlignment="Center" 
                                IndicatorSelectedIndex="0" IndicatorPlacement="Left">
        <Metro:MetroScrollViewer HorizontalScrollBarVisibility="Disabled">
            <StackPanel Background="#232428">
                <Metro:AduGroupBoxNor HeaderTemplate="{StaticResource CusHeaderTitle1}" Header="音频设置" HeaderBackground="Transparent" BorderThickness="0" BorderBrush="{StaticResource DefaultBorderBrush}" FontSize="14" HeaderPadding="10,6">
                    <StackPanel>
                        <DockPanel Style="{StaticResource SettingItem}">
                            <TextBlock Style="{StaticResource SettingItemText}" DockPanel.Dock="Left"> 麦克风</TextBlock>
                            <Metro:AduFlatButton Content="检测麦克风" x:Name="MicTestBtn" Click="TestMic"  Width="100" DockPanel.Dock="Right" Margin=" 11 0 10 0" Type="info" />
                            <Metro:AduComboBox ItemsSource="{Binding MicList,Mode=OneWay}" DisplayMemberPath="Text" SelectedValuePath="Id" SelectedValue="{Binding CurrentMic,Mode=TwoWay}" ComBoxItemPanelBackground="{StaticResource ComboBoxBrush}"></Metro:AduComboBox>
                        </DockPanel>
                        <DockPanel Style="{StaticResource SettingItem}">
                            <TextBlock Style="{StaticResource SettingItemText}" DockPanel.Dock="Left"> 麦采集音量</TextBlock>
                            <Metro:AduFlatSilder x:Name="Slider1" DecreaseColor="#3e7fff" IncreaseColor="#aaaaaa" Maximum="100" Value="{Binding MicVolume}" Margin="0 0 10 0" Height="17"/>
                        </DockPanel>
                        <DockPanel Style="{StaticResource SettingItem}">
                            <TextBlock Style="{StaticResource SettingItemText}" DockPanel.Dock="Left"> 音频来源</TextBlock>
                            <Metro:AduComboBox Margin="0 0 10 0" SelectedValuePath="Tag" SelectedValue="{Binding AudioSource}" ComBoxItemPanelBackground="{StaticResource ComboBoxBrush}">
                                <ComboBoxItem Content="仅麦克风" Tag="1"/>
                                <ComboBoxItem Content="麦和系统声音" Tag="2" />
                            </Metro:AduComboBox>
                        </DockPanel>
                        <DockPanel Visibility="{Binding ShowSytemGatherSlider}" Style="{StaticResource SettingItem}">
                            <TextBlock Style="{StaticResource SettingItemText}" DockPanel.Dock="Left"> 系统采集音量</TextBlock>
                            <Metro:AduFlatSilder x:Name="Slider2" DecreaseColor="#3e7fff" IncreaseColor="#aaaaaa" Maximum="100" Value="{Binding SytemGatherVolume}" Margin="0 0 10 0" Height="17"/>
                        </DockPanel>
                    </StackPanel>
                </Metro:AduGroupBoxNor>
                <Metro:AduGroupBoxNor HeaderTemplate="{StaticResource CusHeaderTitle2}" Header="录屏设置" HeaderBackground="Transparent" BorderThickness="0" BorderBrush="{StaticResource DefaultBorderBrush}" FontSize="14" HeaderPadding="10,6">
                    <StackPanel>
                        <DockPanel Style="{StaticResource SettingItem}">
                            <TextBlock Style="{StaticResource SettingItemText}" DockPanel.Dock="Left"> 视频帧率(fps)</TextBlock>
                            <Metro:AduComboBox Margin="0 0 10 0" SelectedValuePath="Content" SelectedValue="{Binding ScreenRecordingFps}" ComBoxItemPanelBackground="{StaticResource ComboBoxBrush}">
                                <ComboBoxItem Content="10" />
                                <ComboBoxItem Content="12" />
                                <ComboBoxItem Content="15" />
                                <ComboBoxItem Content="20" />
                                <ComboBoxItem Content="24" />
                                <ComboBoxItem Content="25" />
                                <ComboBoxItem Content="30" />
                            </Metro:AduComboBox>
                        </DockPanel>
                        <DockPanel Style="{StaticResource SettingItem}">
                            <TextBlock Style="{StaticResource SettingItemText}" DockPanel.Dock="Left"> 音频码率</TextBlock>
                            <Metro:AduComboBox Margin="0 0 10 0" SelectedValuePath="Tag" SelectedValue="{Binding Path=ScreenRecordingAudioBitrate}" ComBoxItemPanelBackground="{StaticResource ComboBoxBrush}">
                                <ComboBoxItem Content="24Kbps" Tag="24000" />
                                <ComboBoxItem Content="32Kbps" Tag="32000"/>
                                <ComboBoxItem Content="64Kbps" Tag="64000"/>
                                <ComboBoxItem Content="128Kbps" Tag="128000"/>
                                <ComboBoxItem Content="192Kbps" Tag="192000"/>
                                <ComboBoxItem Content="256Kbps" Tag="256000"/>
                                <ComboBoxItem Content="320Kbps" Tag="320000"/>
                            </Metro:AduComboBox>
                        </DockPanel>
                        <DockPanel Style="{StaticResource SettingItem}">
                            <TextBlock Style="{StaticResource SettingItemText}" DockPanel.Dock="Left"> 音频采样率</TextBlock>
                            <Metro:AduComboBox Margin="0 0 10 0" SelectedValuePath="Tag" SelectedValue="{Binding ScreenRecordingAudioFreq}" ComBoxItemPanelBackground="{StaticResource ComboBoxBrush}">
                                <ComboBoxItem Content="8000Hz" Tag="8000" />
                                <ComboBoxItem Content="11025Hz" Tag="11025"/>
                                <ComboBoxItem Content="16000Hz" Tag="16000"/>
                                <ComboBoxItem Content="22050Hz" Tag="22050"/>
                                <ComboBoxItem Content="37800Hz" Tag="37800"/>
                                <ComboBoxItem Content="44100Hz" Tag="44100"/>
                                <ComboBoxItem Content="48000Hz" Tag="48000"/>
                            </Metro:AduComboBox>
                        </DockPanel>
                        <DockPanel Style="{StaticResource SettingItem}">
                            <TextBlock Style="{StaticResource SettingItemText}" DockPanel.Dock="Left"> 编码级别</TextBlock>
                            <Metro:AduComboBox Margin="0 0 10 0" SelectedValuePath="Tag" SelectedValue="{Binding ScreenRecordingProfileLevel}" ComBoxItemPanelBackground="{StaticResource ComboBoxBrush}">
                                <ComboBoxItem Content="基本画质" Tag="-profile:v baseline -level 3.0" />
                                <ComboBoxItem Content="主流画质" Tag="-profile:v main -level 4.2"/>
                                <ComboBoxItem Content="高级画质" Tag="-profile:v high -level 5.1"/>
                            </Metro:AduComboBox>
                        </DockPanel>
                        <DockPanel Style="{StaticResource SettingItem}">
                            <TextBlock Style="{StaticResource SettingItemText}" DockPanel.Dock="Left"> 录制倒计时</TextBlock>
                            <Metro:AduComboBox Margin="0 0 10 0" SelectedValuePath="Tag" SelectedValue="{Binding ScreenRecordingCountdown}" ComBoxItemPanelBackground="{StaticResource ComboBoxBrush}">
                                <ComboBoxItem Content="3s" Tag="3" />
                                <ComboBoxItem Content="5s" Tag="5"/>
                                <ComboBoxItem Content="7s" Tag="7"/>
                                <ComboBoxItem Content="10s" Tag="10"/>
                            </Metro:AduComboBox>
                        </DockPanel>
                        <DockPanel Style="{StaticResource SettingItem}">
                            <TextBlock Style="{StaticResource SettingItemText}" DockPanel.Dock="Left"> 保存到文件夹</TextBlock>
                            <Metro:AduFlatButton CornerRadius="0 3 3 0" Content="打开" x:Name="OpenDir" BorderBrush="#3399ff" BorderThickness="1" Click="OpenDir_Click"  Width="50" DockPanel.Dock="Right" Margin="0 0 10 0" Type="info" />
                            <Metro:AduFlatButton CornerRadius="3 0 0 3" Background="Transparent" BorderBrush="#3399ff" BorderThickness="1" Content="更改" x:Name="ChangeDir" Click="ChangeDir_Click"  Width="50" DockPanel.Dock="Right" Margin=" 11 0 0 0" Type="info" />
                            <Border BorderBrush="White" BorderThickness="1" CornerRadius="3">
                                <TextBlock Cursor="IBeam" TextTrimming="CharacterEllipsis" ForceCursor="True" ToolTip="{Binding ScreenRecordingDir,Mode=OneWay}" Text="{Binding ScreenRecordingDir,Mode=OneWay}" Foreground="White" Padding="5 7"></TextBlock>
                            </Border>
                        </DockPanel>
                    </StackPanel>
                </Metro:AduGroupBoxNor>
                <Metro:AduGroupBoxNor HeaderTemplate="{StaticResource CusHeaderTitle3}" Header="直播设置" HeaderBackground="Transparent" BorderThickness="0" BorderBrush="{StaticResource DefaultBorderBrush}" FontSize="14" HeaderPadding="10,6">
                    <StackPanel>
                        <DockPanel Style="{StaticResource SettingItem}">
                            <TextBlock Style="{StaticResource SettingItemText}" DockPanel.Dock="Left"> 音频质量</TextBlock>
                            <Metro:AduComboBox Margin="0 0 10 0" SelectedValuePath="Tag" SelectedValue="{Binding LiveAudioLevel}" ComBoxItemPanelBackground="{StaticResource ComboBoxBrush}">
                                <ComboBoxItem Content="流畅" Tag="TRTCAudioQualitySpeech" />
                                <ComboBoxItem Content="高" Tag="TRTCAudioQualityDefault"/>
                                <ComboBoxItem Content="超高" Tag="TRTCAudioQualityMusic"/>
                            </Metro:AduComboBox>
                        </DockPanel>
                        <DockPanel Style="{StaticResource SettingItem}">
                            <TextBlock Style="{StaticResource SettingItemText}" DockPanel.Dock="Left"> 摄像画面帧率(fps)</TextBlock>
                            <Metro:AduComboBox Margin="0 0 10 0" SelectedValuePath="Content" SelectedValue="{Binding LiveMainFps}" ComBoxItemPanelBackground="{StaticResource ComboBoxBrush}">
                                <ComboBoxItem Content="10" />
                                <ComboBoxItem Content="12" />
                                <ComboBoxItem Content="15" />
                                <ComboBoxItem Content="20" />
                                <ComboBoxItem Content="24" />
                            </Metro:AduComboBox>
                        </DockPanel>
                        <DockPanel Style="{StaticResource SettingItem}">
                            <TextBlock Style="{StaticResource SettingItemText}" DockPanel.Dock="Left"> 摄像画面码率</TextBlock>
                            <Metro:AduComboBox Margin="0 0 10 0" SelectedValuePath="Tag" SelectedValue="{Binding Path=LiveMainBitrate}" ComBoxItemPanelBackground="{StaticResource ComboBoxBrush}">
                                <ComboBoxItem Content="1000Kbps" Tag="1000" />
                                <ComboBoxItem Content="1200Kbps" Tag="1200"/>
                                <ComboBoxItem Content="1600Kbps" Tag="1600"/>
                            </Metro:AduComboBox>
                        </DockPanel>
                        <DockPanel Style="{StaticResource SettingItem}">
                            <TextBlock Style="{StaticResource SettingItemText}" DockPanel.Dock="Left"> 摄像画面级别</TextBlock>
                            <Metro:AduComboBox Margin="0 0 10 0" SelectedValuePath="Tag" SelectedValue="{Binding Path=LiveMainLevel}" ComBoxItemPanelBackground="{StaticResource ComboBoxBrush}">
                                <ComboBoxItem Content="弱网下保流畅" Tag="TRTCVideoQosPreferenceSmooth" />
                                <ComboBoxItem Content="弱网下保清晰" Tag="TRTCVideoQosPreferenceClear"/>
                            </Metro:AduComboBox>
                        </DockPanel>
                        <DockPanel Style="{StaticResource SettingItem}">
                            <TextBlock Style="{StaticResource SettingItemText}" DockPanel.Dock="Left"> 屏幕分享帧率(fps)</TextBlock>
                            <Metro:AduComboBox Margin="0 0 10 0" SelectedValuePath="Content" SelectedValue="{Binding LiveSubFps}" ComBoxItemPanelBackground="{StaticResource ComboBoxBrush}">
                                <ComboBoxItem Content="10" />
                                <ComboBoxItem Content="12" />
                                <ComboBoxItem Content="15" />
                                <ComboBoxItem Content="20" />
                                <ComboBoxItem Content="24" />
                            </Metro:AduComboBox>
                        </DockPanel>
                        <DockPanel Style="{StaticResource SettingItem}">
                            <TextBlock Style="{StaticResource SettingItemText}" DockPanel.Dock="Left"> 屏幕分享码率</TextBlock>
                            <Metro:AduComboBox Margin="0 0 10 0" SelectedValuePath="Tag" SelectedValue="{Binding Path=LiveSubBitrate}" ComBoxItemPanelBackground="{StaticResource ComboBoxBrush}">
                                <ComboBoxItem Content="1200Kbps" Tag="1200"/>
                                <ComboBoxItem Content="1600Kbps" Tag="1600"/>
                                <ComboBoxItem Content="2000Kbps" Tag="2000"/>
                            </Metro:AduComboBox>
                        </DockPanel>
                    </StackPanel>
                </Metro:AduGroupBoxNor>
            </StackPanel>
        </Metro:MetroScrollViewer>
    </Metro:AduNavigationPanel>
</Metro:MetroWindow>
