<commit_before>﻿<!--  Working Files List
      Visual Studio extension tool window that shows a selectable list of files
      that are open in the editor
      Copyright © 2016 <NAME>
      
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
      
          http://www.apache.org/licenses/LICENSE-2.0
      
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License. -->

<UserControl x:Class="WorkingFilesList.OptionsDialoguePage.View.OptionsPageControl"
             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:locator="clr-namespace:WorkingFilesList.Core.Service.Locator;assembly=WorkingFilesList.Core"
             xmlns:coreControls="clr-namespace:WorkingFilesList.Core.Controls;assembly=WorkingFilesList.Core"
             mc:Ignorable="d" 
             d:DesignHeight="400" d:DesignWidth="400">
    
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/WorkingFilesList.Core;component/Theme/NumericUpDown.xaml"/>
            </ResourceDictionary.MergedDictionaries>

            <locator:ViewModelService x:Key="ViewModel" />

            <Style TargetType="{x:Type CheckBox}">
                <Setter Property="Margin" Value="0,2"/>
            </Style>

            <Style TargetType="{x:Type ComboBox}">
                <Setter Property="Margin" Value="10,1,0,1"/>
                <Setter Property="ItemTemplate">
                    <Setter.Value>
                        <DataTemplate>
                            <TextBlock Text="{Binding DisplayName}"/>
                        </DataTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="Width" Value="70"/>
            </Style>

            <Style TargetType="{x:Type GroupBox}">
                <Setter Property="HeaderTemplate">
                    <Setter.Value>
                        <DataTemplate>
                            <TextBlock Margin="0,4" Text="{Binding}"/>
                        </DataTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </ResourceDictionary>
    </UserControl.Resources>
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <ScrollViewer VerticalScrollBarVisibility="Auto">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>

                <GroupBox Header="List item appearance"
                          d:DataContext="{Binding UserPreferences, Source={StaticResource ViewModel}}">
                    
                    <StackPanel>
                        <CheckBox IsChecked="{Binding ShowFileTypeIcons, Mode=TwoWay}">Show icon for file type</CheckBox>
                        <CheckBox IsChecked="{Binding ShowRecentUsage, Mode=TwoWay}">Show most recently used order</CheckBox>
                        <CheckBox IsChecked="{Binding AssignProjectColours, Mode=TwoWay}">Set background colour according to parent project</CheckBox>
                        <CheckBox IsChecked="{Binding HighlightFileName, Mode=TwoWay}">Highlight file name</CheckBox>
                        
                        <StackPanel Background="Transparent"
                                    HorizontalAlignment="Left"
                                    Margin="0,2"
                                    Orientation="Horizontal"
                                    ToolTip="A path segment is either a file name, directory, or drive designation">
                            
                            <StackPanel.Resources>
                                <Style TargetType="{x:Type TextBlock}">
                                    <Setter Property="IsHitTestVisible" Value="False"/>
                                    <Setter Property="VerticalAlignment" Value="Center"/>
                                </Style>
                            </StackPanel.Resources>
                            
                            <TextBlock Text="Show "/>
                            
                            <coreControls:NumericUpDown Focusable="False"
                                                        Minimum="1"
                                                        Value="{Binding PathSegmentCount, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                        Width="40">
                            </coreControls:NumericUpDown>
                            
                            <TextBlock Text=" path segments for each file"/>
                        </StackPanel>
                    </StackPanel>
                </GroupBox>

                <GroupBox Grid.Row="1"
                          Header="Grouping and ordering"
                          Margin="0,10,0,0"
                          d:DataContext="{Binding UserPreferences, Source={StaticResource ViewModel}}">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>

                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                        </Grid.RowDefinitions>

                        <CheckBox Grid.ColumnSpan="2" IsChecked="{Binding GroupByProject, Mode=TwoWay}">
                            Group by project
                        </CheckBox>

                        <TextBlock Grid.Column="0" Grid.Row="1"
                                   Text="Project display order"
                                   VerticalAlignment="Center">
                        </TextBlock>

                        <ComboBox Grid.Column="1"
                                  Grid.Row="1"
                                  ItemsSource="{Binding OptionsLists.ProjectSortOptions, Source={StaticResource ViewModel}}"
                                  SelectedValue="{Binding ProjectSortOptionName}"
                                  SelectedValuePath="DisplayName">
                        </ComboBox>

                        <TextBlock Grid.Column="0" Grid.Row="2"
                                   Text="Document display order"
                                   VerticalAlignment="Center">
                        </TextBlock>

                        <ComboBox Grid.Column="1"
                                  Grid.Row="2"
                                  ItemsSource="{Binding OptionsLists.DocumentSortOptions, Source={StaticResource ViewModel}}"
                                  SelectedValue="{Binding DocumentSortOptionName}"
                                  SelectedValuePath="DisplayName">
                        </ComboBox>
                    </Grid>
                </GroupBox>

                <GroupBox Grid.Row="2"
                          Header="Tools for Unity"
                          Margin="0,10,0,0"
                          d:DataContext="{Binding UserPreferences, Source={StaticResource ViewModel}}">
                    <StackPanel Background="Transparent"
                                HorizontalAlignment="Left"
                                Margin="0,2"
                                Orientation="Horizontal">

                        <StackPanel.Resources>
                            <Style TargetType="{x:Type TextBlock}">
                                <Setter Property="IsHitTestVisible" Value="False"/>
                                <Setter Property="VerticalAlignment" Value="Center"/>
                            </Style>
                        </StackPanel.Resources>

                        <TextBlock Text="Refresh file list "/>

                        <coreControls:NumericUpDown Focusable="False"
                                                    Minimum="0"
                                                    Value="{Binding UnityRefreshDelay, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                    Width="50">
                        </coreControls:NumericUpDown>

                        <TextBlock Text=" ms after adding/updating a Unity project"/>
                    </StackPanel>
                </GroupBox>

                <StackPanel d:DataContext="{Binding UserPreferences, Source={StaticResource ViewModel}}"
                            Grid.Row="3">
                    <TextBlock Margin="0,10,0,4"
                               Text="Resetting all settings to their default values cannot be undone"
                               TextWrapping="Wrap">
                    </TextBlock>

                    <Button Command="{Binding DialoguePageCommands.ResetSettings, Source={StaticResource ViewModel}}"
                            CommandParameter="{Binding}"
                            HorizontalAlignment="Left">
                        <TextBlock Margin="10,2" Text="Reset To Default"/>
                    </Button>
                </StackPanel>
            </Grid>
        </ScrollViewer>

        <TextBlock Grid.Row="1"
                   Margin="0,10,0,0"<commit_msg>Add link to more info on Unity refresh delay on options dialogue<commit_after>﻿<!--  Working Files List
      Visual Studio extension tool window that shows a selectable list of files
      that are open in the editor
      Copyright © 2016 <NAME>
      
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
      
          http://www.apache.org/licenses/LICENSE-2.0
      
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License. -->

<UserControl x:Class="WorkingFilesList.OptionsDialoguePage.View.OptionsPageControl"
             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:locator="clr-namespace:WorkingFilesList.Core.Service.Locator;assembly=WorkingFilesList.Core"
             xmlns:coreControls="clr-namespace:WorkingFilesList.Core.Controls;assembly=WorkingFilesList.Core"
             mc:Ignorable="d" 
             d:DesignHeight="400" d:DesignWidth="420">
    
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/WorkingFilesList.Core;component/Theme/NumericUpDown.xaml"/>
            </ResourceDictionary.MergedDictionaries>

            <locator:ViewModelService x:Key="ViewModel" />

            <Style TargetType="{x:Type CheckBox}">
                <Setter Property="Margin" Value="0,2"/>
            </Style>

            <Style TargetType="{x:Type ComboBox}">
                <Setter Property="Margin" Value="10,1,0,1"/>
                <Setter Property="ItemTemplate">
                    <Setter.Value>
                        <DataTemplate>
                            <TextBlock Text="{Binding DisplayName}"/>
                        </DataTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="Width" Value="70"/>
            </Style>

            <Style TargetType="{x:Type GroupBox}">
                <Setter Property="HeaderTemplate">
                    <Setter.Value>
                        <DataTemplate>
                            <TextBlock Margin="0,4" Text="{Binding}"/>
                        </DataTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </ResourceDictionary>
    </UserControl.Resources>
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <ScrollViewer VerticalScrollBarVisibility="Auto">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>

                <GroupBox Header="List item appearance"
                          d:DataContext="{Binding UserPreferences, Source={StaticResource ViewModel}}">
                    
                    <StackPanel>
                        <CheckBox IsChecked="{Binding ShowFileTypeIcons, Mode=TwoWay}">Show icon for file type</CheckBox>
                        <CheckBox IsChecked="{Binding ShowRecentUsage, Mode=TwoWay}">Show most recently used order</CheckBox>
                        <CheckBox IsChecked="{Binding AssignProjectColours, Mode=TwoWay}">Set background colour according to parent project</CheckBox>
                        <CheckBox IsChecked="{Binding HighlightFileName, Mode=TwoWay}">Highlight file name</CheckBox>
                        
                        <StackPanel Background="Transparent"
                                    HorizontalAlignment="Left"
                                    Margin="0,2"
                                    Orientation="Horizontal"
                                    ToolTip="A path segment is either a file name, directory, or drive designation">
                            
                            <StackPanel.Resources>
                                <Style TargetType="{x:Type TextBlock}">
                                    <Setter Property="IsHitTestVisible" Value="False"/>
                                    <Setter Property="VerticalAlignment" Value="Center"/>
                                </Style>
                            </StackPanel.Resources>
                            
                            <TextBlock Text="Show "/>
                            
                            <coreControls:NumericUpDown Focusable="False"
                                                        Minimum="1"
                                                        Value="{Binding PathSegmentCount, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                        Width="40">
                            </coreControls:NumericUpDown>
                            
                            <TextBlock Text=" path segments for each file"/>
                        </StackPanel>
                    </StackPanel>
                </GroupBox>

                <GroupBox Grid.Row="1"
                          Header="Grouping and ordering"
                          Margin="0,10,0,0"
                          d:DataContext="{Binding UserPreferences, Source={StaticResource ViewModel}}">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>

                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                        </Grid.RowDefinitions>

                        <CheckBox Grid.ColumnSpan="2" IsChecked="{Binding GroupByProject, Mode=TwoWay}">
                            Group by project
                        </CheckBox>

                        <TextBlock Grid.Column="0" Grid.Row="1"
                                   Text="Project display order"
                                   VerticalAlignment="Center">
                        </TextBlock>

                        <ComboBox Grid.Column="1"
                                  Grid.Row="1"
                                  ItemsSource="{Binding OptionsLists.ProjectSortOptions, Source={StaticResource ViewModel}}"
                                  SelectedValue="{Binding ProjectSortOptionName}"
                                  SelectedValuePath="DisplayName">
                        </ComboBox>

                        <TextBlock Grid.Column="0" Grid.Row="2"
                                   Text="Document display order"
                                   VerticalAlignment="Center">
                        </TextBlock>

                        <ComboBox Grid.Column="1"
                                  Grid.Row="2"
                                  ItemsSource="{Binding OptionsLists.DocumentSortOptions, Source={StaticResource ViewModel}}"
                                  SelectedValue="{Binding DocumentSortOptionName}"
                                  SelectedValuePath="DisplayName">
                        </ComboBox>
                    </Grid>
                </GroupBox>

                <GroupBox Grid.Row="2"
                          Header="Tools for Unity"
                          Margin="0,10,0,0"
                          d:DataContext="{Binding UserPreferences, Source={StaticResource ViewModel}}">
                    <StackPanel Background="Transparent"
                                HorizontalAlignment="Left"
                                Margin="0,2"
                                Orientation="Horizontal">

                        <StackPanel.Resources>
                            <Style TargetType="{x:Type TextBlock}">
                                <Setter Property="IsHitTestVisible" Value="False"/>
                                <Setter Property="VerticalAlignment" Value="Center"/>
                            </Style>
                        </StackPanel.Resources>

                        <TextBlock Text="Refresh file list "/>

                        <coreControls:NumericUpDown Focusable="False"
                                                    Minimum="0"
                                                    Value="{Binding UnityRefreshDelay, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                    Width="50">
                        </coreControls:NumericUpDown>

                        <TextBlock Text=" ms after adding/updating a Unity project "/>

                        <TextBlock IsHitTestVisible="True">
                            <Hyperlink Command="{Binding DialoguePageCommands.Navigate, Source={StaticResource ViewModel}}"
                                       CommandParameter="{Binding NavigateUri, RelativeSource={RelativeSource Self}}"
                                       NavigateUri="https://github.com/Ant-f/WorkingFilesList#automatic-project-reloading-visual-studio-tools-for-unity">
                                more info
                            </Hyperlink>
                        </TextBlock>
                    </StackPanel>
                </GroupBox>

                <StackPanel d:DataContext="{Binding UserPreferences, Source={StaticResource ViewModel}}"
                            Grid.Row="3">
                    <TextBlock Margin="0,10,0,4"
                               Text="Resetting all settings to their default values cannot be undone"
                               TextWrapping="Wrap">
                    </TextBlock>

                    <Button Command="{Binding DialoguePageCommands.ResetSettings, Source={StaticResource ViewModel}}"
                            CommandParameter="{Binding}"
                            HorizontalAlignment="Left">
                        <TextBlock Margin="10,2" Text="Reset To Default"/>
                    </Button>
                </StackPanel>
            </Grid>
        </ScrollViewer>

        <TextBlock Grid.Row="1"
                   Margin="0,10,0,0"
{'fraction_non_alphanumeric': 0.08907459284934238, 'fraction_numerical': 0.008261715967902759, 'mean_word_length': 1.2203246890153912, 'pattern_counts': {'":': 0, '<': 243, '<?xml version=': 0, '>': 241, 'https://': 1, 'lorem ipsum': 0, 'www.': 2, 'xml': 14}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 62, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1892645', 'n_tokens_mistral': 4735, 'n_tokens_neox': 4228, 'n_words': 900}