<commit_before>﻿<UserControl x:Class="OpenKh.Tools.Kh2SystemEditor.Views.ItemView"
             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:local="clr-namespace:OpenKh.Tools.Kh2SystemEditor.Views"
             xmlns:controls="clr-namespace:Xe.Tools.Wpf.Controls;assembly=Xe.Tools.Wpf"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">
    <UserControl.Resources>
        <Thickness x:Key="LabelMargin" Left="0" Top="0" Right="5" Bottom="0" />
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="0"/>
            <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>

        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>

            <ListBox
                Grid.Column="0"
                ItemsSource="{Binding Items}"
                SelectedItem="{Binding SelectedItem}"
                DisplayMemberPath="Name">
            </ListBox>

            <Grid Grid.Row="1" Margin="0 5 0 5">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="3"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Image Grid.Column="0" Source="{StaticResource Search_16x}"/>
                <TextBox Grid.Column="2"
                    Text="{Binding SearchTerm, UpdateSourceTrigger=PropertyChanged}"/>
            </Grid>
        </Grid>

        <StackPanel
            Grid.Column="2"
            Margin="5 0 5 0"
            Visibility="{Binding IsItemEditMessageVisible, FallbackValue=Collapsed}">
            <TextBlock
                Text="Please select an item to modify"/>
        </StackPanel>

        <ScrollViewer
            Grid.Column="2"
            Margin="5 0 5 0"
            VerticalScrollBarVisibility="Auto"
            Visibility="{Binding IsItemEditingVisible}">
            <controls:TwoColumnsPanel RowSpacing="3" DataContext="{Binding SelectedItem}">
                <TextBlock Text="Id" Margin="{StaticResource LabelMargin}"/>
                <TextBlock Text="{Binding IdText}"/>

                <TextBlock Text="Type" Margin="{StaticResource LabelMargin}"/>
                <ComboBox
                    ItemsSource="{Binding Types}"
                    SelectedValue="{Binding Type}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="Value"/>

                <TextBlock Text="Flag0" Margin="{StaticResource LabelMargin}"/>
                <TextBox Text="{Binding Flag0, UpdateSourceTrigger=PropertyChanged}"/>

                <TextBlock Text="Flag1" Margin="{StaticResource LabelMargin}"/>
                <TextBox Text="{Binding Flag1, UpdateSourceTrigger=PropertyChanged}"/>

                <TextBlock Text="Rank" Margin="{StaticResource LabelMargin}"/>
                <ComboBox
                    ItemsSource="{Binding Ranks}"
                    SelectedValue="{Binding Rank}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="Value"/>

                <TextBlock Text="StatEntry" Margin="{StaticResource LabelMargin}"/>
                <TextBox Text="{Binding StatEntry, UpdateSourceTrigger=PropertyChanged}"/>

                <TextBlock Text="Name" Margin="{StaticResource LabelMargin}"/>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <TextBox Grid.Column="0" Text="{Binding NameId, UpdateSourceTrigger=PropertyChanged}" Margin="{StaticResource LabelMargin}"/>
                    <TextBox Grid.Column="1" IsEnabled="False" Text="{Binding Name, UpdateSourceTrigger=PropertyChanged}"/>
                    <Button Grid.Column="2" Visibility="Collapsed" Width="22" Content="..." Command="{Binding ChangeNameCommand}"/>
                </Grid>

                <TextBlock Text="Description" Margin="{StaticResource LabelMargin}"/>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>
                    <TextBox Grid.Column="0" Text="{Binding DescriptionId, UpdateSourceTrigger=PropertyChanged}" Margin="{StaticResource LabelMargin}"/>
                    <TextBox Grid.Column="1" IsEnabled="False" Text="{Binding Description, UpdateSourceTrigger=PropertyChanged}"/>
                    <Button Grid.Column="2" Visibility="Collapsed" Width="22" Content="..." Command="{Binding ChangeDescriptionCommand}"/>
                </Grid>

                <TextBlock Text="Shop buy id" Margin="{StaticResource LabelMargin}"/>
                <TextBox Text="{Binding ShopBuy, UpdateSourceTrigger=PropertyChanged}"/>

                <TextBlock Text="Shop sell id" Margin="{StaticResource LabelMargin}"/>
                <TextBox Text="{Binding ShopSell, UpdateSourceTrigger=PropertyChanged}"/>

                <TextBlock Text="Command" Margin="{StaticResource LabelMargin}"/>
                <TextBox Text="{Binding Command, UpdateSourceTrigger=PropertyChanged}"/>

                <TextBlock Text="Slot" Margin="{StaticResource LabelMargin}"/>
                <TextBox Text="{Binding Slot, UpdateSourceTrigger=PropertyChanged}"/>

                <TextBlock Text="Picture" Margin="{StaticResource LabelMargin}"/>
                <TextBox Text="{Binding Picture, UpdateSourceTrigger=PropertyChanged}"/>

                <TextBlock Text="Icon1" Margin="{StaticResource LabelMargin}"/>
                <TextBox Text="{Binding Icon1, UpdateSourceTrigger=PropertyChanged}"/>

                <TextBlock Text="Icon2" Margin="{StaticResource LabelMargin}"/><commit_msg>Remove unused code for Item<commit_after>﻿<UserControl x:Class="OpenKh.Tools.Kh2SystemEditor.Views.ItemView"
             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:local="clr-namespace:OpenKh.Tools.Kh2SystemEditor.Views"
             xmlns:controls="clr-namespace:Xe.Tools.Wpf.Controls;assembly=Xe.Tools.Wpf"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">
    <UserControl.Resources>
        <Thickness x:Key="LabelMargin" Left="0" Top="0" Right="5" Bottom="0" />
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="0"/>
            <ColumnDefinition Width="2*"/>
        </Grid.ColumnDefinitions>

        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>

            <ListBox
                Grid.Column="0"
                ItemsSource="{Binding Items}"
                SelectedItem="{Binding SelectedItem}"
                DisplayMemberPath="Name">
            </ListBox>

            <Grid Grid.Row="1" Margin="0 5 0 5">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="3"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Image Grid.Column="0" Source="{StaticResource Search_16x}"/>
                <TextBox Grid.Column="2"
                    Text="{Binding SearchTerm, UpdateSourceTrigger=PropertyChanged}"/>
            </Grid>
        </Grid>

        <StackPanel
            Grid.Column="2"
            Margin="5 0 5 0"
            Visibility="{Binding IsItemEditMessageVisible, FallbackValue=Collapsed}">
            <TextBlock
                Text="Please select an item to modify"/>
        </StackPanel>

        <ScrollViewer
            Grid.Column="2"
            Margin="5 0 5 0"
            VerticalScrollBarVisibility="Auto"
            Visibility="{Binding IsItemEditingVisible}">
            <controls:TwoColumnsPanel RowSpacing="3" DataContext="{Binding SelectedItem}">
                <TextBlock Text="Id" Margin="{StaticResource LabelMargin}"/>
                <TextBlock Text="{Binding IdText}"/>

                <TextBlock Text="Type" Margin="{StaticResource LabelMargin}"/>
                <ComboBox
                    ItemsSource="{Binding Types}"
                    SelectedValue="{Binding Type}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="Value"/>

                <TextBlock Text="Flag0" Margin="{StaticResource LabelMargin}"/>
                <TextBox Text="{Binding Flag0, UpdateSourceTrigger=PropertyChanged}"/>

                <TextBlock Text="Flag1" Margin="{StaticResource LabelMargin}"/>
                <TextBox Text="{Binding Flag1, UpdateSourceTrigger=PropertyChanged}"/>

                <TextBlock Text="Rank" Margin="{StaticResource LabelMargin}"/>
                <ComboBox
                    ItemsSource="{Binding Ranks}"
                    SelectedValue="{Binding Rank}"
                    DisplayMemberPath="Name"
                    SelectedValuePath="Value"/>

                <TextBlock Text="StatEntry" Margin="{StaticResource LabelMargin}"/>
                <TextBox Text="{Binding StatEntry, UpdateSourceTrigger=PropertyChanged}"/>

                <TextBlock Text="Name" Margin="{StaticResource LabelMargin}"/>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBox Grid.Column="0" Text="{Binding NameId, UpdateSourceTrigger=PropertyChanged}" Margin="{StaticResource LabelMargin}"/>
                    <TextBox Grid.Column="1" IsEnabled="False" Text="{Binding Name, UpdateSourceTrigger=PropertyChanged}"/>
                </Grid>

                <TextBlock Text="Description" Margin="{StaticResource LabelMargin}"/>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBox Grid.Column="0" Text="{Binding DescriptionId, UpdateSourceTrigger=PropertyChanged}" Margin="{StaticResource LabelMargin}"/>
                    <TextBox Grid.Column="1" IsEnabled="False" Text="{Binding Description, UpdateSourceTrigger=PropertyChanged}"/>
                </Grid>

                <TextBlock Text="Shop buy id" Margin="{StaticResource LabelMargin}"/>
                <TextBox Text="{Binding ShopBuy, UpdateSourceTrigger=PropertyChanged}"/>

                <TextBlock Text="Shop sell id" Margin="{StaticResource LabelMargin}"/>
                <TextBox Text="{Binding ShopSell, UpdateSourceTrigger=PropertyChanged}"/>

                <TextBlock Text="Command" Margin="{StaticResource LabelMargin}"/>
                <TextBox Text="{Binding Command, UpdateSourceTrigger=PropertyChanged}"/>

                <TextBlock Text="Slot" Margin="{StaticResource LabelMargin}"/>
                <TextBox Text="{Binding Slot, UpdateSourceTrigger=PropertyChanged}"/>

                <TextBlock Text="Picture" Margin="{StaticResource LabelMargin}"/>
                <TextBox Text="{Binding Picture, UpdateSourceTrigger=PropertyChanged}"/>

                <TextBlock Text="Icon1" Margin="{StaticResource LabelMargin}"/>
                <TextBox Text="{Binding Icon1, UpdateSourceTrigger=PropertyChanged}"/>

                <TextBlock Text="Icon2" Margin="{StaticResource LabelMargin}"/>
{'fraction_non_alphanumeric': 0.12332396627860297, 'fraction_numerical': 0.011401043757527098, 'mean_word_length': 2.070248952427902, 'pattern_counts': {'":': 0, '<': 157, '<?xml version=': 0, '>': 157, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 14}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1683999', 'n_tokens_mistral': 3253, 'n_tokens_neox': 2858, 'n_words': 535}