<commit_before>﻿<local:SalamanderWindow x:Class="SalamanderWnmp.UI.SettingWin"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:component="clr-namespace:SalamanderWnmp.UserComponent"
        xmlns:local="clr-namespace:SalamanderWnmp.UserClass"
        xmlns:prop="clr-namespace:SalamanderWnmp.Properties"
        WindowStartupLocation="CenterScreen"
        Title="{x:Static prop:Resources.Settings}" Height="360" Width="380" Loaded="Window_Loaded">
    <local:SalamanderWindow.Resources>
        <Style TargetType="TextBox" x:Key="RegularTextBox" BasedOn="{StaticResource {x:Type TextBox}}">
            <Setter Property="Width" Value="80" />
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="HorizontalAlignment" Value="Left" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
        </Style>

        <Style TargetType="Button" x:Key="SaveBtn" BasedOn="{StaticResource {x:Type Button}}">
            <Setter Property="Width" Value="100" />
            <Setter Property="Padding" Value="0, 4" />
            <Setter Property="Margin" Value="0,10,0,0" />
            <Setter Property="Content" Value="保存设置" />
        </Style>
    </local:SalamanderWindow.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition />
        </Grid.RowDefinitions>

        <!--标题栏-->
        <Grid x:Name="gridTitle" Background="{DynamicResource ThemeColor}" MouseDown="TitleBar_MouseMove">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{x:Static prop:Resources.Settings}" FontSize="13" FontWeight="Bold" Foreground="White" Margin="0,10" HorizontalAlignment="Left" Padding="10,0,0,0"/>
            <StackPanel Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Top" Orientation="Horizontal">
                <Button x:Name="btnExit"  Width="20" Height="20" Margin="0" Style="{StaticResource ExitButton}" Click="btnClose_Click"/>
            </StackPanel>
        </Grid>
        <TabControl Grid.Row="1" TabStripPlacement="Left">
            <TabItem Header="常规">
                <Grid Margin="15, 10" x:Name="gridRegular">
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>

                    <TextBlock Text="自动启动Nginx" VerticalAlignment="Center" />
                    <ToggleButton Grid.Column="1" HorizontalAlignment="Center" IsChecked="{Binding StartNginxOnLaunch.Value, Mode=TwoWay}"/>

                    <TextBlock Grid.Row="1" Text="自动启动PHP" VerticalAlignment="Center" />
                    <ToggleButton Grid.Row="1" Grid.Column="1" HorizontalAlignment="Center" IsChecked="{Binding StartPHPOnLaunch.Value, Mode=TwoWay}"/>

                    <TextBlock Grid.Row="2" Text="自动启动Mysql" VerticalAlignment="Center"/>
                    <ToggleButton Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center" IsChecked="{Binding StartMysqlOnLaunch.Value, Mode=TwoWay}"/>

                    <TextBlock Grid.Row="3" Text="Nginx目录名" VerticalAlignment="Center"/>
                    <TextBox Grid.Row="3" Grid.Column="1"  Style="{StaticResource RegularTextBox}" Text="{Binding NginxDirName.Value, Mode=TwoWay}"/>

                    <TextBlock Grid.Row="4" Text="PHP目录名" VerticalAlignment="Center" />
                    <TextBox Grid.Row="4" Grid.Column="1" Style="{StaticResource RegularTextBox}" Text="{Binding PHPDirName.Value, Mode=TwoWay}"/>

                    <TextBlock Grid.Row="5" Text="Mysql目录名" VerticalAlignment="Center"/>
                    <TextBox Grid.Row="5" Grid.Column="1" Style="{StaticResource RegularTextBox}" Text="{Binding MysqlDirName.Value, Mode=TwoWay}"/>


                    <TextBlock Grid.Row="6"  Text="PHP-CGI进程数" VerticalAlignment="Center" />
                    <component:NumericControl Width="80" Grid.Row="6" Grid.Column="1" VerticalAlignment="Center" MinValue="1" MaxValue="5" Increment="1" Value="{Binding PHPProcesses.Value, Mode=TwoWay}"/>

                    <Button Grid.ColumnSpan="2"  Grid.Row="7" Style="{StaticResource SaveBtn}" Click="btnSave_Click"/>
                </Grid>
            </TabItem>
            
            <TabItem Header="PHP">
                <Grid Margin="15, 10">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition />
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <StackPanel Orientation="Horizontal" Margin="0,0,0,5">
                        <TextBlock Text="勾选需要的扩展"  FontSize="14"/>
                        <TextBlock x:Name="txtTotal" Text="{Binding ItemsSource.Count, StringFormat='（总{0}项）'}" FontSize="14"/>
                    </StackPanel>
                    <ListBox Grid.Row="1"  x:Name="lbPHPExt">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition/>
                                    </Grid.ColumnDefinitions>
                                    <CheckBox VerticalAlignment="Center" IsChecked="{Binding IsLoad, Mode=TwoWay}"/>
                                    <TextBlock Grid.Column="1" Text="{Binding ExtName, Mode=TwoWay}" Margin="5" VerticalAlignment="Center"/><commit_msg>调整设置界面布局<commit_after>﻿<local:SalamanderWindow x:Class="SalamanderWnmp.UI.SettingWin"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:component="clr-namespace:SalamanderWnmp.UserComponent"
        xmlns:local="clr-namespace:SalamanderWnmp.UserClass"
        xmlns:prop="clr-namespace:SalamanderWnmp.Properties"
        WindowStartupLocation="CenterScreen"
        Title="{x:Static prop:Resources.Settings}" Height="360" Width="370" Loaded="Window_Loaded">
    <local:SalamanderWindow.Resources>
        <Style TargetType="TextBox" x:Key="RegularTextBox" BasedOn="{StaticResource {x:Type TextBox}}">
            <Setter Property="Width" Value="100" />
            <Setter Property="Padding" Value="0, 3" />
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="HorizontalAlignment" Value="Left" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
        </Style>

        <Style TargetType="Button" x:Key="SaveBtn" BasedOn="{StaticResource {x:Type Button}}">
            <Setter Property="Width" Value="100" />
            <Setter Property="Padding" Value="0, 4" />
            <Setter Property="Margin" Value="0,10,0,0" />
            <Setter Property="Content" Value="保存设置" />
        </Style>
    </local:SalamanderWindow.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition />
        </Grid.RowDefinitions>

        <!--标题栏-->
        <Grid x:Name="gridTitle" Background="{DynamicResource ThemeColor}" MouseDown="TitleBar_MouseMove">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{x:Static prop:Resources.Settings}" FontSize="13" FontWeight="Bold" Foreground="White" Margin="0,10" HorizontalAlignment="Left" Padding="10,0,0,0"/>
            <StackPanel Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Top" Orientation="Horizontal">
                <Button x:Name="btnExit"  Width="20" Height="20" Margin="0" Style="{StaticResource ExitButton}" Click="btnClose_Click"/>
            </StackPanel>
        </Grid>
        <TabControl Grid.Row="1" TabStripPlacement="Left">
            <TabItem Header="常规">
                <Grid Margin="15, 10" x:Name="gridRegular">
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>

                    <TextBlock Text="自动启动Nginx" VerticalAlignment="Center" />
                    <ToggleButton Grid.Column="1" HorizontalAlignment="Center" IsChecked="{Binding StartNginxOnLaunch.Value, Mode=TwoWay}"/>

                    <TextBlock Grid.Row="1" Text="自动启动PHP" VerticalAlignment="Center" />
                    <ToggleButton Grid.Row="1" Grid.Column="1" HorizontalAlignment="Center" IsChecked="{Binding StartPHPOnLaunch.Value, Mode=TwoWay}"/>

                    <TextBlock Grid.Row="2" Text="自动启动Mysql" VerticalAlignment="Center"/>
                    <ToggleButton Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center" IsChecked="{Binding StartMysqlOnLaunch.Value, Mode=TwoWay}"/>

                    <TextBlock Grid.Row="3" Text="Nginx目录名" VerticalAlignment="Center"/>
                    <TextBox Grid.Row="3" Grid.Column="1"  Style="{StaticResource RegularTextBox}" Text="{Binding NginxDirName.Value, Mode=TwoWay}"/>

                    <TextBlock Grid.Row="4" Text="PHP目录名" VerticalAlignment="Center" />
                    <TextBox Grid.Row="4" Grid.Column="1" Style="{StaticResource RegularTextBox}" Text="{Binding PHPDirName.Value, Mode=TwoWay}"/>

                    <TextBlock Grid.Row="5" Text="Mysql目录名" VerticalAlignment="Center"/>
                    <TextBox Grid.Row="5" Grid.Column="1" Style="{StaticResource RegularTextBox}" Text="{Binding MysqlDirName.Value, Mode=TwoWay}"/>


                    <TextBlock Grid.Row="6"  Text="PHP-CGI进程数" VerticalAlignment="Center" />
                    <component:NumericControl Width="100" Grid.Row="6" Grid.Column="1"  VerticalAlignment="Center" MinValue="1" MaxValue="5" Increment="1" Value="{Binding PHPProcesses.Value, Mode=TwoWay}"/>

                    <Button Grid.ColumnSpan="2"  Grid.Row="7" Style="{StaticResource SaveBtn}" Click="btnSave_Click"/>
                </Grid>
            </TabItem>
            
            <TabItem Header="PHP">
                <Grid Margin="15, 10">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition />
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <StackPanel Orientation="Horizontal" Margin="0,0,0,5">
                        <TextBlock Text="勾选需要的扩展"  FontSize="14"/>
                        <TextBlock x:Name="txtTotal" Text="{Binding ItemsSource.Count, StringFormat='（总{0}项）'}" FontSize="14"/>
                    </StackPanel>
                    <ListBox Grid.Row="1"  x:Name="lbPHPExt">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition/>
                                    </Grid.ColumnDefinitions>
                                    <CheckBox VerticalAlignment="Center" IsChecked="{Binding IsLoad, Mode=TwoWay}"/>
                                    <TextBlock Grid.Column="1" Text="{Binding ExtName, Mode=TwoWay}" Margin="5" VerticalAlignment="Center"/>
{'fraction_non_alphanumeric': 0.13383254998805066, 'fraction_numerical': 0.014498526248705488, 'mean_word_length': 2.0397094430992735, 'pattern_counts': {'":': 0, '<': 176, '<?xml version=': 0, '>': 176, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 10}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3289496', 'n_tokens_mistral': 3492, 'n_tokens_neox': 3157, 'n_words': 517}