<UserControl x:Class="Hearthstone_Deck_Tracker.FlyoutControls.Options.Tracker.TrackerGeneral"
             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:options="clr-namespace:Hearthstone_Deck_Tracker.FlyoutControls.Options"
             xmlns:lex="http://wpflocalizeextension.codeplex.com"
             xmlns:converters="clr-namespace:Hearthstone_Deck_Tracker.Controls.Stats.Converters"
             lex:LocalizeDictionary.DesignCulture="en"
             lex:ResxLocalizationProvider.DefaultAssembly="HearthstoneDeckTracker"
             lex:ResxLocalizationProvider.DefaultDictionary="Strings"
             mc:Ignorable="d"
             d:DesignHeight="500" d:DesignWidth="300">
    <UserControl.Resources>
        <converters:InverseBooleanConverter x:Key="InverseBooleanConverter" />
        <converters:CardImageSizeBooleanConverter x:Key="CardImageSizeBooleanConverter" />
    </UserControl.Resources>
    <StackPanel>
        <GroupBox Header="{lex:LocTextUpper Options_Tracker_General_Label_CardLanguage}">
            <StackPanel>
                <DockPanel Margin="0,5,0,0">
                    <Label Content="{lex:Loc Options_Tracker_General_Label_Primary}" HorizontalAlignment="Left"
                           VerticalAlignment="Top" />
                    <ComboBox x:Name="ComboboxLanguages" HorizontalAlignment="Right"
                              VerticalAlignment="Top" Width="170"
                              SelectionChanged="ComboboxLanguages_SelectionChanged" />
                </DockPanel>
                <CheckBox Name="CheckBoxDefaultFont" Content="{lex:Loc Options_Tracker_General_CheckBox_Font}"
                          Foreground="{Binding Color, Source={x:Static options:AdvancedOptions.Instance}}"
                          Visibility="{Binding Visibility, Source={x:Static options:AdvancedOptions.Instance}}"
                          Margin="5,5,0,0" Checked="CheckBoxDefaultFont_OnChecked"
                          Unchecked="CheckBoxDefaultFont_OnUnchecked" />
                <Label Visibility="{Binding RestartLabelVisibility, RelativeSource={RelativeSource AncestorType=UserControl}}" Foreground="Red" Content="{lex:Loc Options_Tracker_General_Label_Restart}" />
            </StackPanel>
        </GroupBox>
        <GroupBox Header="{lex:LocTextUpper Options_Tracker_General_Label_CardTooltips}">
            <StackPanel>
                <DockPanel Margin="5,5,5,0">
                    <Slider x:Name="SliderCardImageSize" Margin="0,5,5,0" VerticalAlignment="Center" Value="{Binding Path=CardImageConfigs.CardImageSize, Source={StaticResource ConfigWrapper}}"
                            Width="170"
                            DockPanel.Dock="Right"
                            Maximum="2"
                            Minimum=".75"
                            Ticks=".75, 1, 1.25, 1.5, 1.75, 2"
                            SmallChange=".25"
                            LargeChange=".25"
                            TickPlacement="BottomRight"
                            IsSnapToTickEnabled="True"/>
                    <Label Content="{Binding Path=CardImageConfigs.CardImageSize, Source={StaticResource ConfigWrapper}}"
                           ContentStringFormat="{}{0}x"
                           HorizontalAlignment="Right" Margin="5,2,0,0"
                           VerticalAlignment="Center" DockPanel.Dock="Right"
                           Width="40"/>
                    <Label Content="{lex:Loc Options_Overlay_General_Label_Tooltip_Size}"
                           HorizontalAlignment="Left" Margin="0,2,0,0"
                           VerticalAlignment="Center" DockPanel.Dock="Left" />
                </DockPanel>
                <CheckBox x:Name="CheckboxDownloadHiResolutionCardImages" Content="Use High Resolution Card Images"
                          HorizontalAlignment="Left" Margin="10,5,0,0" VerticalAlignment="Top"
                          IsChecked="{Binding Path=CardImageConfigs.UseHighResolutionCardImages, Source={StaticResource ConfigWrapper}}"
                          IsEnabled="{Binding Path=CardImageConfigs.CardImageSize, Source={StaticResource ConfigWrapper}, Converter={StaticResource CardImageSizeBooleanConverter}}"/>
                <CheckBox x:Name="CheckboxTrackerCardToolTips" Content="{lex:Loc Options_Tracker_General_CheckBox_CardTooltips_MainWindow}"
                          ToolTip="{lex:Loc Options_Tracker_General_CheckBox_CardTooltips_Tooltip}"
                          HorizontalAlignment="Left" Margin="10,5,0,0" VerticalAlignment="Top"
                          Checked="CheckboxTrackerCardToolTips_Checked"
                          Unchecked="CheckboxTrackerCardToolTips_Unchecked" />
            </StackPanel>
        </GroupBox>
        <CheckBox x:Name="CheckBoxAutoDeckDetection" Margin="10,5,0,0"
                  Foreground="{Binding Color, Source={x:Static options:AdvancedOptions.Instance}}"
                  Visibility="{Binding Visibility, Source={x:Static options:AdvancedOptions.Instance}}"
                  Content="{lex:Loc Options_Tracker_General_CheckBox_AutoDeckDetection}"
                  Checked="CheckBoxAutoDeckDetecion_OnChecked" Unchecked="CheckBoxAutoDeckDetection_OnUnchecked" />
        <CheckBox x:Name="CheckBoxAutoUse" Margin="10,5,0,0"
                  Foreground="{Binding Color, Source={x:Static options:AdvancedOptions.Instance}}"
                  Visibility="{Binding Visibility, Source={x:Static options:AdvancedOptions.Instance}}"
                  Checked="CheckBoxAutoUse_OnChecked" Unchecked="CheckBoxAutoUse_OnUnchecked">
            <TextBlock Text="{lex:Loc Options_Tracker_General_CheckBox_AutoUse}" TextWrapping="Wrap"/>
        </CheckBox>
        <CheckBox x:Name="CheckBoxClassCardsFirst" Margin="10,5,0,0"
                  Content="{lex:Loc Options_Tracker_General_CheckBox_Sorting}"
                  Foreground="{Binding Color, Source={x:Static options:AdvancedOptions.Instance}}"
                  Visibility="{Binding Visibility, Source={x:Static options:AdvancedOptions.Instance}}"
                  Checked="CheckBoxClassCardsFirst_Checked"
                  Unchecked="CheckBoxClassCardsFirst_Unchecked" />
        
        <CheckBox x:Name="CheckboxShowMyGamesPanel"
                  Foreground="{Binding Color, Source={x:Static options:AdvancedOptions.Instance}}"
                  Visibility="{Binding Visibility, Source={x:Static options:AdvancedOptions.Instance}}"
                  Content="{lex:Loc Options_Tracker_General_CheckBox_MyGames}" HorizontalAlignment="Left"
                  Margin="10,5,0,0" VerticalAlignment="Top"
                  Checked="CheckboxShowMyGamesPanel_OnChecked"
                  Unchecked="CheckboxShowMyGamesPanel_OnUnchecked"
                  />
        <CheckBox x:Name="CheckboxHideManaCurveMyDecks"
                  Foreground="{Binding Color, Source={x:Static options:AdvancedOptions.Instance}}"
                  Visibility="{Binding Visibility, Source={x:Static options:AdvancedOptions.Instance}}"
                  Content="{lex:Loc Options_Tracker_General_CheckBox_ManaCurve}" HorizontalAlignment="Left"
                  Margin="10,5,0,0" VerticalAlignment="Top"
                  Checked="CheckboxManaCurveMyDecks_Checked"
                  Unchecked="CheckboxManaCurveMyDecks_Unchecked" />
        <Separator Margin="0,5,0,0" Visibility="{Binding Visibility, Source={x:Static options:AdvancedOptions.Instance}}" />
        <CheckBox x:Name="CheckboxDeckPickerCaps" Content="{lex:Loc Options_Tracker_General_CheckBox_UpperCaseDeckNames}"
                  Foreground="{Binding Color, Source={x:Static options:AdvancedOptions.Instance}}"
                  Visibility="{Binding Visibility, Source={x:Static options:AdvancedOptions.Instance}}"
                  HorizontalAlignment="Left" Margin="10,5,0,0"
                  VerticalAlignment="Top" Checked="CheckboxDeckPickerCaps_Checked"
                  Unchecked="CheckboxDeckPickerCaps_Unchecked"
                  ToolTip="{lex:Loc Options_Tracker_General_CheckBox_UpperCaseDeckNames_Tooltip}" />
        <DockPanel Margin="5,5,5,0" Height="26">
            <Label Content="{lex:Loc Options_Tracker_General_ComboBox_DeckDateType}" Height="26" VerticalAlignment="Top" Width="123" HorizontalAlignment="Left" Margin="0"/>
            <ComboBox DockPanel.Dock="Right" Name="ComboBoxDeckDateType" VerticalAlignment="Top" HorizontalAlignment="Right" Width="170" Margin="0"
                SelectionChanged="ComboBoxDatesOnDecks_OnSelectionChanged" >
                <ComboBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Path=., Converter={StaticResource EnumDescriptionConverter}}" />
                    </DataTemplate>
                </ComboBox.ItemTemplate>
            </ComboBox>
        </DockPanel>
        <DockPanel Margin="35,5,10,0" Name="DateFormatPanel">
            <Label Content="{lex:Loc Options_Tracker_General_Label_Format}"/>
            <ComboBox DockPanel.Dock="Right" Name="ComboBoxDateFormat"  Margin="5,0,0,0" Width="150" HorizontalAlignment="Right"
                  SelectionChanged="ComboBoxDateFormat_OnSelectionChanged" VerticalAlignment="Top" >
                <ComboBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Path=., Converter={StaticResource EnumDescriptionConverter}}" />
                    </DataTemplate>
                </ComboBox.ItemTemplate>
            </ComboBox>
        </DockPanel>
        <Separator Margin="0,5,0,0" Visibility="{Binding Visibility, Source={x:Static options:AdvancedOptions.Instance}}" />
        <CheckBox x:Name="CheckBoxAutoArchiveArenaDecks" Content="{lex:Loc Options_Tracker_General_CheckBox_AutoArchiveArena}"
                  HorizontalAlignment="Left" Margin="10,5,0,0"
                  VerticalAlignment="Top" Checked="CheckBoxAutoArchiveArenaDecks_Checked"
                  Unchecked="CheckBoxAutoArchiveArenaDecks_Unchecked"/>
    </StackPanel>
</UserControl>
