20240301_JSEQ_upperpc/JiangsuEarthquakeNow/JiangsuEarthquake/Views/UserControls/FTPSettingView.xaml
XuMin 3b6c570800 1 经过电控腔测试和升压站测试;
2 解决了后一个通信连接会影响前一个通信连接的问题;
3 测试过程中存在的问题修改;
2024-09-03 16:30:34 +08:00

631 lines
40 KiB
XML

<UserControl x:Class="JiangsuEarthquake.Views.UserControls.FTPSettingView"
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:JiangsuEarthquake.Views.UserControls"
mc:Ignorable="d"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:converters="clr-namespace:JiangsuEarthquake.Common"
Background="{DynamicResource RegionBrush}"
FontFamily="{StaticResource DigitalDisplay}"
Height="570" Width="920">
<UserControl.Resources>
<converters:DateTimeConverter x:Key="DateTimeConverter"/>
<Style TargetType="TextBox">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TextBox" >
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}" CornerRadius="0"
SnapsToDevicePixels="True">
<ScrollViewer x:Name="PART_ContentHost" Focusable="False"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ToolTip">
<Setter Property="Foreground" Value="White"/>
<!-- 设置ToolTip字体颜色为白色 -->
<Setter Property="FontSize" Value="13"/>
<!-- 设置ToolTip字体大小为14 -->
<!--<Setter Property="FontWeight" Value="Bold"/>-->
<!-- 设置ToolTip字体为粗体 -->
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<!-- 设置ToolTip背景颜色为浅灰色 -->
<Setter Property="FontFamily" Value="{StaticResource DigitalDisplay}"/>
<!-- 设置ToolTip字体为方正楷体简体 -->
<Setter Property="TextOptions.TextFormattingMode" Value="Ideal"/>
<!-- 设置ToolTip中文本的格式化模式 -->
<Setter Property="TextOptions.TextRenderingMode" Value="ClearType"/>
<!-- 设置ToolTip中文本的渲染模式 -->
<Setter Property="ToolTipService.ShowDuration" Value="10000"/>
<!--设置ToolTip中数据的显示时间-->
</Style>
<!--<Style TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
<Grid>
<Border x:Name="columnHeaderBorder" BorderThickness="0,0,0,0.5"
BorderBrush="#EEE"
Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
TextBlock.TextAlignment="Center"
TextBlock.FontSize="15"
TextBlock.Foreground="White"/>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>-->
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="8*"/>
</Grid.RowDefinitions>
<Button Name="ConnectSetBtn" Style="{StaticResource ButtonStyle}"
Background="#2614273A" Foreground="White" Height="35" Width="50"
HorizontalAlignment="Left" Margin="15,0,0,0" Click="ConnectSetBtn_Click">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="8"/>
</Style>
</Button.Resources>
<Button.ToolTip>
<ToolTip Content="连接设置" VerticalAlignment="Center" HorizontalAlignment="Center" BorderThickness="0"/>
</Button.ToolTip>
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Images/Set.png" Stretch="Fill" Width="20" Height="20"/>
</StackPanel>
</Button.Content>
</Button>
<TextBlock Text="FTP上传下载设置" FontSize="20" Foreground="White" Background="Transparent"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
<hc:Divider VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0,0,0,4"
Width="920"/>
<Button Width="26" Height="26" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource PrimaryBrush}"
hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right"
VerticalAlignment="Center" Margin="0,0,15,2" Command="hc:ControlCommands.Close"/>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="0.2*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="8*"/>
</Grid.RowDefinitions>
<UniformGrid Columns="3">
<Button Name="ReturnHighFTPBtn" Style="{StaticResource ButtonStyle}"
Background="#2614273A" Foreground="White" Height="35" Width="110"
Click="ReturnHighFTPBtn_Click">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="8"/>
</Style>
</Button.Resources>
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Images/ReturnHigh.png" Stretch="Fill" Width="20" Height="20"/>
<TextBlock Text="返回上级" HorizontalAlignment="Center" VerticalAlignment="Center"
Margin="10,0,0,0" FontSize="16" Foreground="White"/>
</StackPanel>
</Button.Content>
</Button>
<Button Name="RefreshFTPBtn" Style="{StaticResource ButtonStyle}"
Background="#2614273A" Foreground="White" Height="35" Width="90"
Click="RefreshFTPBtn_Click">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="8"/>
</Style>
</Button.Resources>
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Images/Refresh.png" Stretch="Fill" Width="20" Height="20"/>
<TextBlock Text="刷新" HorizontalAlignment="Center" VerticalAlignment="Center"
Margin="10,0,0,0" FontSize="16" Foreground="White"/>
</StackPanel>
</Button.Content>
</Button>
<Button Name="DeleteFTPBtn" Style="{StaticResource ButtonStyle}"
Background="#2614273A" Foreground="White" Height="35" Width="90"
Click="DeleteFTPBtn_Click">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="8"/>
</Style>
</Button.Resources>
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Images/Delete.png" Stretch="Fill" Width="20" Height="20"/>
<TextBlock Text="删除" HorizontalAlignment="Center" VerticalAlignment="Center"
Margin="10,0,0,0" FontSize="16" Foreground="White"/>
</StackPanel>
</Button.Content>
</Button>
</UniformGrid>
<StackPanel Grid.Row="1" VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Center">
<TextBlock Text="路径:" FontSize="17" Foreground="White" Margin="10,0,0,0"
VerticalAlignment="Center"/>
<TextBox Name="PathTxtBox" Text="{Binding ftpList.datagrid1Path}" Foreground="Black"
FontSize="16" Width="200" Height="30" ToolTipService.ToolTip="{Binding ftpList.datagrid1Path}"
TextAlignment="Left" VerticalContentAlignment="Center"/>
<Button Name="SelectFTPPathBtn" Style="{StaticResource ButtonStyle}" Margin="15,0,0,0"
Background="#2614273A" Foreground="White" Height="30" Width="50"
Click="SelectFTPPathBtn_Click">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="8"/>
</Style>
</Button.Resources>
<Button.ToolTip>
<ToolTip Content="默认文件夹路径" VerticalAlignment="Center" HorizontalAlignment="Center"
BorderThickness="0"/>
</Button.ToolTip>
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Images/Check.png" Stretch="Fill" Width="18" Height="18"/>
</StackPanel>
</Button.Content>
</Button>
<Button Name="EnsureFTPPathBtn" Style="{StaticResource ButtonStyle}" Margin="15,0,0,0"
Background="#2614273A" Foreground="White" Height="30" Width="50"
Click="EnsureFTPPathBtn_Click">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="8"/>
</Style>
</Button.Resources>
<Button.ToolTip>
<ToolTip Content="确认路径" VerticalAlignment="Center" HorizontalAlignment="Center"
BorderThickness="0"/>
</Button.ToolTip>
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Images/Ensure.png" Stretch="Fill" Width="18" Height="18"/>
</StackPanel>
</Button.Content>
</Button>
</StackPanel>
<!--<ScrollViewer Grid.Row="2" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Visible">
<DataGrid x:Name="FTPFloderDataGrid" ItemsSource="{Binding ftpList.FTPList}"
AutoGenerateColumns="False" CanUserSortColumns="False" SelectionMode="Single"
CanUserAddRows="False" CanUserDeleteRows="False" Background="Transparent"
CanUserReorderColumns="False" CanUserResizeColumns="False" IsHitTestVisible="False"
CanUserResizeRows="False" BorderThickness="0" Grid.RowSpan="2"
SelectedItem="{Binding FTPFloderDataGridSelectedItem, UpdateSourceTrigger=PropertyChanged}"
>
<DataGrid.Resources>
<Style TargetType="DataGridCell" x:Key="DataGridCellCenter">
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderBrush" Value="#A0A0A0"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="DataGridCell">
<Border x:Name="border" BorderBrush="#A0A0A0" BorderThickness="0,0,0,0.5"
Background="{TemplateBinding Background}">
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</DataGrid.Resources>
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding FileName}"
Header="文件名称" Width="100"
CanUserSort="False" CellStyle="{StaticResource DataGridCellCenter}"/>
<DataGridTextColumn Binding="{Binding CreateTime, StringFormat='yyyy/MM/dd HH:mm:ss'}"
Header="修改日期" Width="100"
CanUserSort="False" CellStyle="{StaticResource DataGridCellCenter}"/>
<DataGridTextColumn Binding="{Binding FileType,StringFormat=F2}"
Header="类型" Width="100"
CanUserSort="False" CellStyle="{StaticResource DataGridCellCenter}"/>
<DataGridTextColumn Binding="{Binding FileSize,StringFormat=F2}"
Header="大小" Width="80"
CanUserSort="False" CellStyle="{StaticResource DataGridCellCenter}"/>
</DataGrid.Columns>
</DataGrid>
</ScrollViewer>-->
<hc:TransitioningContentControl Grid.Row="2">
<DataGrid Grid.Row="2" Name="FTPFloderDataGrid" HeadersVisibility="All" RowHeaderWidth="60" AutoGenerateColumns="False"
ItemsSource="{Binding ftpList.FTPList}" IsReadOnly="True" CanUserResizeColumns="False"
MouseDoubleClick="FTPFloderDataGrid_MouseDoubleClick">
<DataGrid.RowHeaderTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding IsSelected,RelativeSource={RelativeSource AncestorType=DataGridRow}}"/>
</DataTemplate>
</DataGrid.RowHeaderTemplate>
<DataGrid.Resources>
<Style TargetType="DataGridColumnHeader">
<Setter Property="FontSize" Value="15"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
</Style>
</DataGrid.Resources>
<DataGrid.Columns>
<DataGridTemplateColumn Header="文件名称" Width="1.6*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding FileName}" ToolTipService.ToolTip="{Binding FileName}">
<TextBlock.Resources>
<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="14"/>
</Style>
</TextBlock.Resources>
</TextBlock>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="修改日期" Width="1.6*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding CreateTime,StringFormat='yyyy/MM/dd'}" HorizontalAlignment="Center" ToolTipService.ToolTip="{Binding CreateTime, Converter={StaticResource ResourceKey=DateTimeConverter}}">
<TextBlock.Resources>
<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="14"/>
</Style>
</TextBlock.Resources>
</TextBlock>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="类型" Width="0.9*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding FileType}" HorizontalAlignment="Left" ToolTipService.ToolTip="{Binding FileType}">
<TextBlock.Resources>
<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="14"/>
</Style>
</TextBlock.Resources>
</TextBlock>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="大小" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding FileSize}" HorizontalAlignment="Left" ToolTipService.ToolTip="{Binding FileSize}">
<TextBlock.Resources>
<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="14"/>
</Style>
</TextBlock.Resources>
</TextBlock>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--<DataGridTextColumn Binding="{Binding FileName, Mode=TwoWay}"
Header="文件名称" Width="1.6*" FontSize="14"/>
<DataGridTextColumn Binding="{Binding CreateTime, StringFormat='yyyy/MM/dd HH:mm:ss', Mode=TwoWay}"
Header="修改日期" Width="1.7*" FontSize="14"/>
<DataGridTextColumn Binding="{Binding FileType, Mode=TwoWay}"
Header="类型" Width="0.8*" FontSize="14"/>
<DataGridTextColumn Binding="{Binding FileSize, Mode=TwoWay}"
Header="大小" Width="0.9*" FontSize="14"/>-->
</DataGrid.Columns>
</DataGrid>
</hc:TransitioningContentControl>
</Grid>
<StackPanel Grid.Column="1" Orientation="Vertical" HorizontalAlignment="Center">
<Button Name="DownloadFileBtn" Style="{StaticResource ButtonStyle}" Margin="0,230,0,0"
Background="#2614273A" Foreground="White" Height="35" Width="60"
Click="DownloadFileBtn_Click">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="8"/>
</Style>
</Button.Resources>
<Button.ToolTip>
<ToolTip Content="下载文件" VerticalAlignment="Center" HorizontalAlignment="Center"
BorderThickness="0"/>
</Button.ToolTip>
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Images/Right2.png" Stretch="Fill" Width="18" Height="18"/>
</StackPanel>
</Button.Content>
</Button>
<TextBlock Name="DownloadFileMsg" FontSize="14" Margin="0,10,0,0"
HorizontalAlignment="Center"/>
<Button Name="UploadFileBtn" Style="{StaticResource ButtonStyle}" Margin="0,50,0,0"
Background="#2614273A" Foreground="White" Height="35" Width="60"
Click="UploadFileBtn_Click">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="8"/>
</Style>
</Button.Resources>
<Button.ToolTip>
<ToolTip Content="上传文件" VerticalAlignment="Center" HorizontalAlignment="Center"
BorderThickness="0"/>
</Button.ToolTip>
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Images/Left2.png" Stretch="Fill" Width="18" Height="18"/>
</StackPanel>
</Button.Content>
</Button>
<TextBlock Name="UploadFileMsg" FontSize="14" Margin="0,10,0,0"
HorizontalAlignment="Center"/>
</StackPanel>
<Grid Grid.Column="3">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="8*"/>
</Grid.RowDefinitions>
<UniformGrid Columns="3">
<Button Name="ReturnHighLoaclBtn" Style="{StaticResource ButtonStyle}"
Background="#2614273A" Foreground="White" Height="35" Width="110"
Click="ReturnHighLoaclBtn_Click">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="8"/>
</Style>
</Button.Resources>
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Images/ReturnHigh.png" Stretch="Fill" Width="20" Height="20"/>
<TextBlock Text="返回上级" HorizontalAlignment="Center" VerticalAlignment="Center"
Margin="10,0,0,0" FontSize="16" Foreground="White"/>
</StackPanel>
</Button.Content>
</Button>
<Button Name="RefreshLocalBtn" Style="{StaticResource ButtonStyle}"
Background="#2614273A" Foreground="White" Height="35" Width="90"
Click="RefreshLocalBtn_Click">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="8"/>
</Style>
</Button.Resources>
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Images/Refresh.png" Stretch="Fill" Width="20" Height="20"/>
<TextBlock Text="刷新" HorizontalAlignment="Center" VerticalAlignment="Center"
Margin="10,0,0,0" FontSize="16" Foreground="White"/>
</StackPanel>
</Button.Content>
</Button>
<Button Name="DeleteLocalBtn" Style="{StaticResource ButtonStyle}"
Background="#2614273A" Foreground="White" Height="35" Width="90"
Click="DeleteLocalBtn_Click">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="8"/>
</Style>
</Button.Resources>
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Images/Delete.png" Stretch="Fill" Width="20" Height="20"/>
<TextBlock Text="删除" HorizontalAlignment="Center" VerticalAlignment="Center"
Margin="10,0,0,0" FontSize="16" Foreground="White"/>
</StackPanel>
</Button.Content>
</Button>
</UniformGrid>
<StackPanel Grid.Row="1" VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Center">
<TextBlock Text="路径:" FontSize="17" Foreground="White" Margin="10,0,0,0"
VerticalAlignment="Center"/>
<TextBox Name="PathTxtLocalBox" Text="{Binding ftpList.datagrid2Path}"
Foreground="Black" FontSize="16" Width="200" Height="30"
TextAlignment="Left" VerticalContentAlignment="Center"
ToolTipService.ToolTip="{Binding ftpList.datagrid2Path}"/>
<Button Name="SelectLocalPathBtn" Style="{StaticResource ButtonStyle}" Margin="15,0,0,0"
Background="#2614273A" Foreground="White" Height="30" Width="50"
Click="SelectLocalPathBtn_Click">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="8"/>
</Style>
</Button.Resources>
<Button.ToolTip>
<ToolTip Content="选择文件夹路径" VerticalAlignment="Center" HorizontalAlignment="Center"
BorderThickness="0"/>
</Button.ToolTip>
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Images/Check.png" Stretch="Fill" Width="18" Height="18"/>
</StackPanel>
</Button.Content>
</Button>
<Button Name="EnsureLocalPathBtn" Style="{StaticResource ButtonStyle}" Margin="15,0,0,0"
Background="#2614273A" Foreground="White" Height="30" Width="50"
Click="EnsureLocalPathBtn_Click">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="8"/>
</Style>
</Button.Resources>
<Button.ToolTip>
<ToolTip Content="确认路径" VerticalAlignment="Center" HorizontalAlignment="Center"
BorderThickness="0"/>
</Button.ToolTip>
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="/Assets/Images/Ensure.png" Stretch="Fill" Width="18" Height="18"/>
</StackPanel>
</Button.Content>
</Button>
</StackPanel>
<!--<DataGrid x:Name="LocalFloderDataGrid" Grid.Row="2" ItemsSource="{Binding ftpList.LocalList}"
AutoGenerateColumns="False" CanUserSortColumns="True" IsReadOnly="True"
CanUserAddRows="False" CanUserDeleteRows="False" Background="Transparent"
CanUserReorderColumns="False" CanUserResizeColumns="True" IsHitTestVisible="True"
CanUserResizeRows="False" BorderThickness="0" Grid.RowSpan="2" SelectionMode="Single"
SelectedItem="{Binding LoaclFloderDataGridSelectedItem, UpdateSourceTrigger=PropertyChanged}">
<DataGrid.Resources>
<Style TargetType="DataGridCell" x:Key="DataGridCellCenter">
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderBrush" Value="#A0A0A0"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="DataGridCell">
<Border x:Name="border" BorderBrush="#A0A0A0" BorderThickness="0,0,0,0.5"
Background="{TemplateBinding Background}">
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</DataGrid.Resources>
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding FileName, Mode=TwoWay}"
Header="文件名称" Width="1.8*"
CanUserSort="False" CellStyle="{StaticResource DataGridCellCenter}"/>
<DataGridTextColumn Binding="{Binding CreateTime, StringFormat='yyyy/MM/dd HH:mm:ss', Mode=TwoWay}"
Header="修改日期" Width="1.7*"
CanUserSort="False" CellStyle="{StaticResource DataGridCellCenter}"/>
<DataGridTextColumn Binding="{Binding FileType, Mode=TwoWay}"
Header="类型" Width="0.6*"
CanUserSort="False" CellStyle="{StaticResource DataGridCellCenter}"/>
<DataGridTextColumn Binding="{Binding FileSize, Mode=TwoWay}"
Header="大小" Width="0.7*"
CanUserSort="False" CellStyle="{StaticResource DataGridCellCenter}"/>
</DataGrid.Columns>
</DataGrid>-->
<hc:TransitioningContentControl Grid.Row="2">
<DataGrid Grid.Row="2" Name="LocalFloderDataGrid" HeadersVisibility="All" RowHeaderWidth="60" AutoGenerateColumns="False"
ItemsSource="{Binding ftpList.LocalList}" IsReadOnly="True" CanUserSortColumns="True" CanUserResizeColumns="False"
MouseDoubleClick="LocalFloderDataGrid_MouseDoubleClick">
<DataGrid.RowHeaderTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding IsSelected,RelativeSource={RelativeSource AncestorType=DataGridRow}}"/>
</DataTemplate>
</DataGrid.RowHeaderTemplate>
<DataGrid.Resources>
<Style TargetType="DataGridColumnHeader">
<Setter Property="FontSize" Value="15"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
</Style>
</DataGrid.Resources>
<DataGrid.Columns>
<DataGridTemplateColumn Header="文件名称" Width="1.6*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding FileName}" HorizontalAlignment="Left" ToolTipService.ToolTip="{Binding FileName}">
<TextBlock.Resources>
<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="14"/>
</Style>
</TextBlock.Resources>
</TextBlock>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="修改日期" Width="1.6*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding CreateTime,StringFormat='yyyy/MM/dd'}" HorizontalAlignment="Center" ToolTipService.ToolTip="{Binding CreateTime, Converter={StaticResource ResourceKey=DateTimeConverter}}">
<TextBlock.Resources>
<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="14"/>
</Style>
</TextBlock.Resources>
</TextBlock>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="类型" Width="0.9*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding FileType}" HorizontalAlignment="Left" ToolTipService.ToolTip="{Binding FileType}">
<TextBlock.Resources>
<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="14"/>
</Style>
</TextBlock.Resources>
</TextBlock>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="大小" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding FileSize}" HorizontalAlignment="Left" ToolTipService.ToolTip="{Binding FileSize}">
<TextBlock.Resources>
<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="14"/>
</Style>
</TextBlock.Resources>
</TextBlock>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<!--<DataGridTextColumn Binding="{Binding FileName, Mode=TwoWay}"
Header="文件名称" Width="1.6*" FontSize="14"/>-->
<!--<DataGridTextColumn Binding="{Binding CreateTime, StringFormat='yyyy/MM/dd HH:mm:ss', Mode=TwoWay}"
Header="修改日期" Width="1.7*" FontSize="14"/>
<DataGridTextColumn Binding="{Binding FileType, Mode=TwoWay}"
Header="类型" Width="0.8*" FontSize="14"/>
<DataGridTextColumn Binding="{Binding FileSize, Mode=TwoWay}"
Header="大小" Width="0.9*" FontSize="14"/>-->
</DataGrid.Columns>
</DataGrid>
</hc:TransitioningContentControl>
</Grid>
</Grid>
</Grid>
</UserControl>