<UserControl x:Class="StartServerWPF.Modules.Main.Views.FilesWatcherView"
             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:StartServerWPF.Modules.Main.Views"
             mc:Ignorable="d" 
             xmlns:prism="http://prismlibrary.com/"
             prism:ViewModelLocator.AutoWireViewModel="True"
             d:DesignHeight="450" d:DesignWidth="800">
    <StackPanel>
        <TextBlock Text="监控文件路径：" Grid.Row="0" Grid.Column="0" />
        <DockPanel Grid.Row="1">
            <Button Content="..." Command="{Binding FilePathSaveCommand}" DockPanel.Dock="Right"  HorizontalAlignment="Right" Height="28" Width="30"/>
            <TextBox Text="{Binding WatcherPath}" IsReadOnly="True" DockPanel.Dock="Right" FontSize="10"/>
        </DockPanel>
        <Grid>
            <ListView x:Name="listView" ItemsSource="{Binding DataList}"  Grid.Column="1">
                <ListView.View>
                    <GridView>
                        <GridViewColumn Header="时间"  DisplayMemberBinding="{Binding  CreateTime, StringFormat=yyyy-MM-dd HH:mm:ss}" />
                        <GridViewColumn Header="内容" Width="300" >
                            <!--模板化单元格内容-->
                            <GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <TextBox Foreground="CornflowerBlue" MinWidth="200" Cursor="Hand" Text="{Binding Data}" IsReadOnly="True" BorderBrush="Transparent" Background="Transparent" TextWrapping="Wrap"></TextBox>
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                        <GridViewColumn Header="文件名" Width="80" DisplayMemberBinding="{Binding Name}" />
                        <GridViewColumn Header="修改类型" Width="80" DisplayMemberBinding="{Binding ChangeType}" />
                        <GridViewColumn Header="是否发送" >
                            <!--模板化单元格内容-->
                            <GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <ToggleButton IsEnabled="False" IsChecked="{Binding IsSend}"  HorizontalAlignment="Center" Margin="5,4" Style="{StaticResource ToggleButtonSwitch}"/>
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                    </GridView>
                </ListView.View>
            </ListView>

        </Grid>
    </StackPanel>
</UserControl>
