<UserControl x:Class="JuliusSweetland.OptiKey.UI.Views.Management.SoundsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">

    <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Auto">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
        
            <GroupBox Grid.Row="0" Header="Speech">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" SharedSizeGroup="LabelColumn" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
            
                    <TextBlock Grid.Row="0" Grid.Column="0" Text="Voice:" 
                               VerticalAlignment="Center" Margin="5" />
                    <ComboBox Grid.Row="0" Grid.Column="1" 
                              ItemsSource="{Binding SpeechVoices}"
                              SelectedValue="{Binding SpeechVoice, Mode=TwoWay}" />
                      
                    <TextBlock Grid.Row="1" Grid.Column="0" Text="Volume:" 
                               VerticalAlignment="Center" Margin="5" />
                    <controls:NumericUpDown Grid.Row="1" Grid.Column="1" TextAlignment="Left"
                                            Minimum="0" Maximum="100" Interval="1"
                                            Value="{Binding SpeechVolume, Mode=TwoWay}" />
            
                    <TextBlock Grid.Row="2" Grid.Column="0" Text="Rate:" 
                               VerticalAlignment="Center" Margin="5" />
                    <controls:NumericUpDown Grid.Row="2" Grid.Column="1" TextAlignment="Left"
                                            Minimum="-10" Maximum="10" Interval="1"
                                            Value="{Binding SpeechRate, Mode=TwoWay}" />
                </Grid>
            </GroupBox>
        
            <GroupBox Grid.Row="1" Header="Sound effects">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" SharedSizeGroup="LabelColumn" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
            
                    <TextBlock Grid.Row="0" Grid.Column="0" Text="Info:" 
                               VerticalAlignment="Center" Margin="5" />
                    <Grid Grid.Row="0" Grid.Column="1" >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <ComboBox Grid.Column="0" 
                              ItemsSource="{Binding GeneralSoundFiles}"
                              DisplayMemberPath="Key"
                              SelectedValuePath="Value"
                              SelectedValue="{Binding InfoSoundFile, Mode=TwoWay}" />
                        <controls:NumericUpDown Grid.Column="1" Width="75"
                                                TextAlignment="Right"
                                                Minimum="0" Maximum="100" Interval="1"
                                                Value="{Binding InfoSoundVolume, Mode=TwoWay}" />
                        <Button Grid.Column="2"
                                HorizontalAlignment="Center"
                                Content="Play"
                                Command="{Binding InfoSoundPlayCommand}"/>
                    </Grid>
                    
                    <TextBlock Grid.Row="1" Grid.Column="0" Text="Error:" 
                               VerticalAlignment="Center" Margin="5" />
                    <Grid Grid.Row="1" Grid.Column="1" >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <ComboBox Grid.Column="0" 
                              ItemsSource="{Binding GeneralSoundFiles}"
                              DisplayMemberPath="Key"
                              SelectedValuePath="Value"
                              SelectedValue="{Binding ErrorSoundFile, Mode=TwoWay}" />
                        <controls:NumericUpDown Grid.Column="1" Width="75"
                                                TextAlignment="Right"
                                                Minimum="0" Maximum="100" Interval="1"
                                                Value="{Binding ErrorSoundVolume, Mode=TwoWay}" />
                        <Button Grid.Column="2"
                                HorizontalAlignment="Center"
                                Content="Play"
                                Command="{Binding ErrorSoundPlayCommand}"/>
                    </Grid>
                    
                    <TextBlock Grid.Row="2" Grid.Column="0" Text="Key Selection:" 
                               VerticalAlignment="Center" Margin="5" />
                    <Grid Grid.Row="2" Grid.Column="1" >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <ComboBox Grid.Column="0" 
                              ItemsSource="{Binding GeneralSoundFiles}"
                              DisplayMemberPath="Key"
                              SelectedValuePath="Value"
                              SelectedValue="{Binding KeySelectionSoundFile, Mode=TwoWay}" />
                        <controls:NumericUpDown Grid.Column="1" Width="75"
                                                TextAlignment="Right"
                                                Minimum="0" Maximum="100" Interval="1"
                                                Value="{Binding KeySelectionSoundVolume, Mode=TwoWay}" />
                        <Button Grid.Column="2"
                                HorizontalAlignment="Center"
                                Content="Play"
                                Command="{Binding KeySelectionSoundPlayCommand}"/>
                    </Grid>

                    <TextBlock Grid.Row="3" Grid.Column="0" Text="Muli-key selection starting:" 
                               VerticalAlignment="Center" Margin="5" />
                    <Grid Grid.Row="3" Grid.Column="1" >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <ComboBox Grid.Column="0" 
                              ItemsSource="{Binding GeneralSoundFiles}"
                              DisplayMemberPath="Key"
                              SelectedValuePath="Value"
                              SelectedValue="{Binding MultiKeySelectionCaptureStartSoundFile, Mode=TwoWay}" />
                        <controls:NumericUpDown Grid.Column="1" Width="75"
                                                TextAlignment="Right"
                                                Minimum="0" Maximum="100" Interval="1"
                                                Value="{Binding MultiKeySelectionCaptureStartSoundVolume, Mode=TwoWay}" />
                        <Button Grid.Column="2"
                                HorizontalAlignment="Center"
                                Content="Play"
                                Command="{Binding MultiKeySelectionCaptureStartSoundPlayCommand}"/>
                    </Grid>

                    <TextBlock Grid.Row="4" Grid.Column="0" Text="Muli-key selection ending:" 
                               VerticalAlignment="Center" Margin="5" />
                    <Grid Grid.Row="4" Grid.Column="1" >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <ComboBox Grid.Column="0" 
                              ItemsSource="{Binding GeneralSoundFiles}"
                              DisplayMemberPath="Key"
                              SelectedValuePath="Value"
                              SelectedValue="{Binding MultiKeySelectionCaptureEndSoundFile, Mode=TwoWay}" />
                        <controls:NumericUpDown Grid.Column="1" Width="75"
                                                TextAlignment="Right"
                                                Minimum="0" Maximum="100" Interval="1"
                                                Value="{Binding MultiKeySelectionCaptureEndSoundVolume, Mode=TwoWay}" />
                        <Button Grid.Column="2"
                                HorizontalAlignment="Center"
                                Content="Play"
                                Command="{Binding MultiKeySelectionCaptureEndSoundPlayCommand}"/>
                    </Grid>

                    <TextBlock Grid.Row="5" Grid.Column="0" Text="Mouse click:" 
                               VerticalAlignment="Center" Margin="5" />
                    <Grid Grid.Row="5" Grid.Column="1" >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <ComboBox Grid.Column="0" 
                              ItemsSource="{Binding MouseClickSoundFiles}"
                              DisplayMemberPath="Key"
                              SelectedValuePath="Value"
                              SelectedValue="{Binding MouseClickSoundFile, Mode=TwoWay}" />
                        <controls:NumericUpDown Grid.Column="1" Width="75"
                                                TextAlignment="Right"
                                                Minimum="0" Maximum="100" Interval="1"
                                                Value="{Binding MouseClickSoundVolume, Mode=TwoWay}" />
                        <Button Grid.Column="2"
                                HorizontalAlignment="Center"
                                Content="Play"
                                Command="{Binding MouseClickSoundPlayCommand}"/>
                    </Grid>

                    <TextBlock Grid.Row="6" Grid.Column="0" Text="Mouse down:" 
                               VerticalAlignment="Center" Margin="5" />
                    <Grid Grid.Row="6" Grid.Column="1" >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <ComboBox Grid.Column="0" 
                              ItemsSource="{Binding MouseDownSoundFiles}"
                              DisplayMemberPath="Key"
                              SelectedValuePath="Value"
                              SelectedValue="{Binding MouseDownSoundFile, Mode=TwoWay}" />
                        <controls:NumericUpDown Grid.Column="1" Width="75"
                                                TextAlignment="Right"
                                                Minimum="0" Maximum="100" Interval="1"
                                                Value="{Binding MouseDownSoundVolume, Mode=TwoWay}" />
                        <Button Grid.Column="2"
                                HorizontalAlignment="Center"
                                Content="Play"
                                Command="{Binding MouseDownSoundPlayCommand}"/>
                    </Grid>

                    <TextBlock Grid.Row="7" Grid.Column="0" Text="Mouse up:" 
                               VerticalAlignment="Center" Margin="5" />
                    <Grid Grid.Row="7" Grid.Column="1" >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <ComboBox Grid.Column="0" 
                              ItemsSource="{Binding MouseUpSoundFiles}"
                              DisplayMemberPath="Key"
                              SelectedValuePath="Value"
                              SelectedValue="{Binding MouseUpSoundFile, Mode=TwoWay}" />
                        <controls:NumericUpDown Grid.Column="1" Width="75"
                                                TextAlignment="Right"
                                                Minimum="0" Maximum="100" Interval="1"
                                                Value="{Binding MouseUpSoundVolume, Mode=TwoWay}" />
                        <Button Grid.Column="2"
                                HorizontalAlignment="Center"
                                Content="Play"
                                Command="{Binding MouseUpSoundPlayCommand}"/>
                    </Grid>

                    <TextBlock Grid.Row="8" Grid.Column="0" Text="Mouse double click:" 
                               VerticalAlignment="Center" Margin="5" />
                    <Grid Grid.Row="8" Grid.Column="1" >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <ComboBox Grid.Column="0" 
                              ItemsSource="{Binding MouseDoubleClickSoundFiles}"
                              DisplayMemberPath="Key"
                              SelectedValuePath="Value"
                              SelectedValue="{Binding MouseDoubleClickSoundFile, Mode=TwoWay}" />
                        <controls:NumericUpDown Grid.Column="1" Width="75"
                                                TextAlignment="Right"
                                                Minimum="0" Maximum="100" Interval="1"
                                                Value="{Binding MouseDoubleClickSoundVolume, Mode=TwoWay}" />
                        <Button Grid.Column="2"
                                HorizontalAlignment="Center"
                                Content="Play"
                                Command="{Binding MouseDoubleClickSoundPlayCommand}"/>
                    </Grid>

                    <TextBlock Grid.Row="9" Grid.Column="0" Text="Mouse scroll:" 
                               VerticalAlignment="Center" Margin="5" />
                    <Grid Grid.Row="9" Grid.Column="1" >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <ComboBox Grid.Column="0" 
                              ItemsSource="{Binding MouseScrollSoundFiles}"
                              DisplayMemberPath="Key"
                              SelectedValuePath="Value"
                              SelectedValue="{Binding MouseScrollSoundFile, Mode=TwoWay}" />
                        <controls:NumericUpDown Grid.Column="1" Width="75"
                                                TextAlignment="Right"
                                                Minimum="0" Maximum="100" Interval="1"
                                                Value="{Binding MouseScrollSoundVolume, Mode=TwoWay}" />
                        <Button Grid.Column="2"
                                HorizontalAlignment="Center"
                                Content="Play"
                                Command="{Binding MouseScrollSoundPlayCommand}"/>
                    </Grid>
                </Grid>
            </GroupBox>
        </Grid>
    </ScrollViewer>
</UserControl>
