<commit_before>﻿<Window x:Class="GameMover.UI.MainWindow"
        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:viewModels="clr-namespace:GameMover.ViewModels"
        xmlns:code="clr-namespace:GameMover.Code"
        xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
        xmlns:prism="http://prismlibrary.com/"
        xmlns:ui="clr-namespace:GameMover.UI"
        xmlns:columns="clr-namespace:GameMover.UI.Columns"
        TextElement.Foreground="{DynamicResource MaterialDesignBody}"
        TextElement.FontWeight="Regular"
        TextElement.FontSize="13"
        TextOptions.TextFormattingMode="Ideal"
        TextOptions.TextRenderingMode="Auto"
        Title="Game Mover"
        Width="750"
        Height="450"
        MinWidth="600"
        MinHeight="400"
        mc:Ignorable="d">
    <Window.DataContext>
        <viewModels:MainWindowViewModel />
    </Window.DataContext>

    <materialDesign:DialogHost OpenDialogCommandDataContextSource="DialogHostInstance" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
        <i:Interaction.Triggers>
            <prism:InteractionRequestTrigger SourceObject="{Binding DisplayFindJunctionsDialogRequest}">
                <i:InvokeCommandAction Command="{x:Static ui:MainWindow.OpenDialogDelegateCommand}">
                    <i:InvokeCommandAction.CommandParameter>
                        <ui:FindExistingJunctionsDialog />
                    </i:InvokeCommandAction.CommandParameter>
                </i:InvokeCommandAction>
            </prism:InteractionRequestTrigger>

            <prism:InteractionRequestTrigger SourceObject="{Binding CloseDialogRequest}">
                <i:InvokeCommandAction Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}" />
            </prism:InteractionRequestTrigger>

            <i:EventTrigger EventName="DialogClosing">
                <prism:InvokeCommandAction Command="{Binding DialogClosedCommand}" />
            </i:EventTrigger>
        </i:Interaction.Triggers>
        <DockPanel>
            <Menu DockPanel.Dock="Top" Height="36">
                <MenuItem Header="_File" Height="36">
                    <MenuItem Header="_Search Existing Junctions"
                              Command="{Binding FindExistingJunctionsCommand}" />
                    <Separator />
                    <MenuItem Header="_Refresh" Command="{Binding RefreshFoldersCommand}" />
                    <MenuItem Header="Hide Destination"
                              IsCheckable="True"
                              Checked="HideDestination"
                              Unchecked="ShowDestination" />
                </MenuItem>
            </Menu>
            <DockPanel Dock="Top">
                <Button Command="{Binding DeleteCurrentLocationCommand}" DockPanel.Dock="Right">Delete</Button>
                <Button Command="{Binding SaveCurrentLocationCommand}" DockPanel.Dock="Right">Save Current</Button>
                <ComboBox DockPanel.Dock="Left"
                          Margin="10 3 10 3"
                          ItemsSource="{Binding DisplayedMappings}"
                          SelectedItem="{Binding SelectedMapping, Mode=TwoWay}">

                    <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <DockPanel>
                                <materialDesign:PackIcon Visibility="{Binding IsSavedMapping, Converter={StaticResource BooleanToVisibilityConverter}}" Kind="Star" />
                                <ContentPresenter Content="{Binding}" />
                            </DockPanel>
                        </DataTemplate>
                    </ComboBox.ItemTemplate>
                </ComboBox>
            </DockPanel>

            <Grid Margin="10" DockPanel.Dock="Top">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.5*" />
                    <ColumnDefinition x:Name="destinationColumnDefinition" Width="0.5*" />
                </Grid.ColumnDefinitions>

                <DockPanel Grid.Column="0" DataContext="{Binding SourceCollection}">
                    <DockPanel Margin="0,5,0,0"
                               HorizontalAlignment="Center"
                               DockPanel.Dock="Top"
                               LastChildFill="False">
                        <Button Command="{Binding SelectLocationCommand}" Content="Select Source Folder" />
                    </DockPanel>

                    <DockPanel Margin="0,5,0,0"
                               HorizontalAlignment="Center"
                               DockPanel.Dock="Bottom">
                        <Button Command="{Binding SelectFoldersNotInOtherPaneCommand}" Content="Select Not In Destination" />
                    </DockPanel>

                    <DockPanel HorizontalAlignment="Center"
                               DockPanel.Dock="Bottom"
                               LastChildFill="False">
                        <TextBlock Text="{Binding SelectedItems.Count}" />
                        <Button Command="{Binding CopyCommand}" Content="Copy -&gt;" />
                        <Button Command="{Binding DeleteFoldersCommand}" Content="Delete" />
                        <Button Command="{Binding DeleteJunctionsCommand}" Content="Delete Junction" />
                        <Button Command="{Binding ArchiveCommand}" Content="Archive -&gt;" />
                    </DockPanel>
                    <code:MultiSelectDataGrid x:Name="sourceGrid"
                                              ItemsSource="{Binding Folders}"
                                              CellStyle="{StaticResource CustomCellStyle}"
                                              SelectedItemsList="{Binding SelectedItems}"
                                              Style="{StaticResource GameFolderDataGridStyle}">
                        <DataGrid.Columns>
                            <columns:NameColumn />
                            <columns:SizeColumn />
                            <columns:JunctionTargetColumn />
                            <columns:LastUpdated />
                        </DataGrid.Columns>
                    </code:MultiSelectDataGrid>
                </DockPanel>


                <DockPanel Grid.Column="1" DataContext="{Binding DestinationCollection}">
                    <DockPanel Margin="0,5,0,0"
                               HorizontalAlignment="Center"
                               DockPanel.Dock="Top">
                        <Button Command="{Binding SelectLocationCommand}" Content="Select Destination Folder" />
                    </DockPanel>

                    <DockPanel Margin="0,5,0,0"
                               HorizontalAlignment="Center"
                               DockPanel.Dock="Bottom">
                        <Button Command="{Binding SelectFoldersNotInOtherPaneCommand}" Content="Select Not In Source" />
                    </DockPanel>

                    <DockPanel HorizontalAlignment="Center"
                               DockPanel.Dock="Bottom"
                               LastChildFill="False">
                        <TextBlock Text="{Binding SelectedItems.Count}" />
                        <Button Command="{Binding CopyCommand}" Content="&lt;- Copy" />
                        <Button Command="{Binding CreateJunctionCommand}" Content="&lt;- Create Junction" />
                        <Button Command="{Binding DeleteFoldersCommand}" Content="Delete" />
                    </DockPanel>

                    <code:MultiSelectDataGrid x:Name="destinationGrid"
                                              ItemsSource="{Binding Folders}"
                                              CellStyle="{StaticResource CustomCellStyle}"
                                              SelectedItemsList="{Binding SelectedItems}"
                                              Style="{StaticResource GameFolderDataGridStyle}">
                        <DataGrid.Columns>
                            <columns:NameColumn />
                            <columns:SizeColumn />
                            <columns:LastUpdated />
                        </DataGrid.Columns>
                    </code:MultiSelectDataGrid>
                </DockPanel>
            </Grid>
        </DockPanel>
    </materialDesign:DialogHost>
</Window><commit_msg>Disable the combobox if there aren't any items in it that can be selected.<commit_after>﻿<Window x:Class="GameMover.UI.MainWindow"
        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:viewModels="clr-namespace:GameMover.ViewModels"
        xmlns:code="clr-namespace:GameMover.Code"
        xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
        xmlns:prism="http://prismlibrary.com/"
        xmlns:ui="clr-namespace:GameMover.UI"
        xmlns:columns="clr-namespace:GameMover.UI.Columns"
        TextElement.Foreground="{DynamicResource MaterialDesignBody}"
        TextElement.FontWeight="Regular"
        TextElement.FontSize="13"
        TextOptions.TextFormattingMode="Ideal"
        TextOptions.TextRenderingMode="Auto"
        Title="Game Mover"
        Width="750"
        Height="450"
        MinWidth="600"
        MinHeight="400"
        mc:Ignorable="d">
    <Window.DataContext>
        <viewModels:MainWindowViewModel />
    </Window.DataContext>

    <materialDesign:DialogHost OpenDialogCommandDataContextSource="DialogHostInstance" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
        <i:Interaction.Triggers>
            <prism:InteractionRequestTrigger SourceObject="{Binding DisplayFindJunctionsDialogRequest}">
                <i:InvokeCommandAction Command="{x:Static ui:MainWindow.OpenDialogDelegateCommand}">
                    <i:InvokeCommandAction.CommandParameter>
                        <ui:FindExistingJunctionsDialog />
                    </i:InvokeCommandAction.CommandParameter>
                </i:InvokeCommandAction>
            </prism:InteractionRequestTrigger>

            <prism:InteractionRequestTrigger SourceObject="{Binding CloseDialogRequest}">
                <i:InvokeCommandAction Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}" />
            </prism:InteractionRequestTrigger>

            <i:EventTrigger EventName="DialogClosing">
                <prism:InvokeCommandAction Command="{Binding DialogClosedCommand}" />
            </i:EventTrigger>
        </i:Interaction.Triggers>
        <DockPanel>
            <Menu DockPanel.Dock="Top" Height="36">
                <MenuItem Header="_File" Height="36">
                    <MenuItem Header="_Search Existing Junctions"
                              Command="{Binding FindExistingJunctionsCommand}" />
                    <Separator />
                    <MenuItem Header="_Refresh" Command="{Binding RefreshFoldersCommand}" />
                    <MenuItem Header="Hide Destination"
                              IsCheckable="True"
                              Checked="HideDestination"
                              Unchecked="ShowDestination" />
                </MenuItem>
            </Menu>
            <DockPanel Dock="Top">
                <Button Command="{Binding DeleteCurrentLocationCommand}" DockPanel.Dock="Right">Delete</Button>
                <Button Command="{Binding SaveCurrentLocationCommand}" DockPanel.Dock="Right">Save Current</Button>
                <ComboBox DockPanel.Dock="Left"
                          Margin="10 3 10 3"
                          ItemsSource="{Binding DisplayedMappings}"
                          SelectedItem="{Binding SelectedMapping, Mode=TwoWay}">

                    <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <DockPanel>
                                <materialDesign:PackIcon Visibility="{Binding IsSavedMapping, Converter={StaticResource BooleanToVisibilityConverter}}" Kind="Star" />
                                <ContentPresenter Content="{Binding}" />
                            </DockPanel>
                        </DataTemplate>
                    </ComboBox.ItemTemplate>

                    <ComboBox.Style>
                        <Style TargetType="ComboBox" BasedOn="{StaticResource {x:Type ComboBox}}">
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding DisplayedMappings.Count}" Value="0">
                                    <Setter Property="IsEnabled" Value="False" />
                                </DataTrigger>
                                <DataTrigger Binding="{Binding DisplayedMappings.Count}" Value="1">
                                    <Setter Property="IsEnabled" Value="False" />
                                </DataTrigger>
                                <MultiDataTrigger>
                                    <MultiDataTrigger.Conditions>
                                        <Condition Binding="{Binding DisplayedMappings.Count}" Value="1" />
                                        <Condition Binding="{Binding SelectedMapping}" Value="{x:Null}" />
                                    </MultiDataTrigger.Conditions>
                                    <Setter Property="IsEnabled" Value="True" />
                                </MultiDataTrigger>
                            </Style.Triggers>
                        </Style>
                    </ComboBox.Style>
                </ComboBox>
            </DockPanel>

            <Grid Margin="10" DockPanel.Dock="Top">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.5*" />
                    <ColumnDefinition x:Name="destinationColumnDefinition" Width="0.5*" />
                </Grid.ColumnDefinitions>

                <DockPanel Grid.Column="0" DataContext="{Binding SourceCollection}">
                    <DockPanel Margin="0,5,0,0"
                               HorizontalAlignment="Center"
                               DockPanel.Dock="Top"
                               LastChildFill="False">
                        <Button Command="{Binding SelectLocationCommand}" Content="Select Source Folder" />
                    </DockPanel>

                    <DockPanel Margin="0,5,0,0"
                               HorizontalAlignment="Center"
                               DockPanel.Dock="Bottom">
                        <Button Command="{Binding SelectFoldersNotInOtherPaneCommand}" Content="Select Not In Destination" />
                    </DockPanel>

                    <DockPanel HorizontalAlignment="Center"
                               DockPanel.Dock="Bottom"
                               LastChildFill="False">
                        <TextBlock Text="{Binding SelectedItems.Count}" />
                        <Button Command="{Binding CopyCommand}" Content="Copy -&gt;" />
                        <Button Command="{Binding DeleteFoldersCommand}" Content="Delete" />
                        <Button Command="{Binding DeleteJunctionsCommand}" Content="Delete Junction" />
                        <Button Command="{Binding ArchiveCommand}" Content="Archive -&gt;" />
                    </DockPanel>
                    <code:MultiSelectDataGrid x:Name="sourceGrid"
                                              ItemsSource="{Binding Folders}"
                                              CellStyle="{StaticResource CustomCellStyle}"
                                              SelectedItemsList="{Binding SelectedItems}"
                                              Style="{StaticResource GameFolderDataGridStyle}">
                        <DataGrid.Columns>
                            <columns:NameColumn />
                            <columns:SizeColumn />
                            <columns:JunctionTargetColumn />
                            <columns:LastUpdated />
                        </DataGrid.Columns>
                    </code:MultiSelectDataGrid>
                </DockPanel>


                <DockPanel Grid.Column="1" DataContext="{Binding DestinationCollection}">
                    <DockPanel Margin="0,5,0,0"
                               HorizontalAlignment="Center"
                               DockPanel.Dock="Top">
                        <Button Command="{Binding SelectLocationCommand}" Content="Select Destination Folder" />
                    </DockPanel>

                    <DockPanel Margin="0,5,0,0"
                               HorizontalAlignment="Center"
                               DockPanel.Dock="Bottom">
                        <Button Command="{Binding SelectFoldersNotInOtherPaneCommand}" Content="Select Not In Source" />
                    </DockPanel>

                    <DockPanel HorizontalAlignment="Center"
                               DockPanel.Dock="Bottom"
                               LastChildFill="False">
                        <TextBlock Text="{Binding SelectedItems.Count}" />
                        <Button Command="{Binding CopyCommand}" Content="&lt;- Copy" />
                        <Button Command="{Binding CreateJunctionCommand}" Content="&lt;- Create Junction" />
                        <Button Command="{Binding DeleteFoldersCommand}" Content="Delete" />
                    </DockPanel>

                    <code:MultiSelectDataGrid x:Name="destinationGrid"
                                              ItemsSource="{Binding Folders}"
                                              CellStyle="{StaticResource CustomCellStyle}"
                                              SelectedItemsList="{Binding SelectedItems}"
                                              Style="{StaticResource GameFolderDataGridStyle}">
                        <DataGrid.Columns>
                            <columns:NameColumn />
                            <columns:SizeColumn />
                            <columns:LastUpdated />
                        </DataGrid.Columns>
                    </code:MultiSelectDataGrid>
                </DockPanel>
            </Grid>
        </DockPanel>
    </materialDesign:DialogHost>
</Window>
{'fraction_non_alphanumeric': 0.1003727369542066, 'fraction_numerical': 0.0069755058572949944, 'mean_word_length': 1.5111645941970853, 'pattern_counts': {'":': 0, '<': 218, '<?xml version=': 0, '>': 218, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 24}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 39, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1333676', 'n_tokens_mistral': 4429, 'n_tokens_neox': 4011, 'n_words': 607}