|
@@ -0,0 +1,403 @@
|
|
|
+<UserControl x:Class="MV485.uc.UCMonitorData2"
|
|
|
+ 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:MV485.uc"
|
|
|
+ xmlns:zdfflatui="clr-namespace:ZdfFlatUI;assembly=WPF.UI"
|
|
|
+ mc:Ignorable="d"
|
|
|
+ Padding="5,2,5,5"
|
|
|
+ Background="WhiteSmoke"
|
|
|
+ d:DesignHeight="600" d:DesignWidth="1366">
|
|
|
+ <UserControl.Resources>
|
|
|
+ <!--<BooleanToVisibilityConverter x:Key="BoolToVisibilityConverter" />
|
|
|
+ <local1:InverseBoolToVisibilityConverter x:Key="InverseBoolToVisibilityConverter" />-->
|
|
|
+
|
|
|
+ <Style TargetType="ContextMenu">
|
|
|
+ <Setter Property="Background" Value="White"/>
|
|
|
+ <Setter Property="BorderBrush" Value="#DDDDDD"/>
|
|
|
+ <Setter Property="BorderThickness" Value="1"/>
|
|
|
+ </Style>
|
|
|
+
|
|
|
+ <Style TargetType="MenuItem">
|
|
|
+ <Setter Property="Padding" Value="5,2"/>
|
|
|
+ <!--<Setter Property="Icon" Value="{StaticResource DefaultIcon}"/>-->
|
|
|
+ </Style>
|
|
|
+ </UserControl.Resources>
|
|
|
+ <Grid>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="550" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+
|
|
|
+ <Border Grid.Column="0" BorderBrush="#D3D3D3" BorderThickness="0 0 1 0">
|
|
|
+ <Grid>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="35" />
|
|
|
+ <RowDefinition Height="*" />
|
|
|
+ <RowDefinition Height="40" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+
|
|
|
+ <Grid Grid.Row="0" Margin="0 5 0 0">
|
|
|
+ <TextBlock Text="485设备列表" VerticalAlignment="Center" FontSize="14px" FontWeight="Bold" Margin="10 0 0 0" />
|
|
|
+ <StackPanel Orientation="Horizontal" Grid.Row="0" HorizontalAlignment="Right" Margin="0 0 10 0">
|
|
|
+ <!--<StackPanel x:Name="pnlDetailFunc" Orientation="Horizontal" HorizontalAlignment="Right">-->
|
|
|
+ <TextBlock Text="端口名称" VerticalAlignment="Center" Margin="0 0 5 0"
|
|
|
+ Foreground="Black" FontSize="14px" FontWeight="Normal"/>
|
|
|
+ <ComboBox Grid.Column="1" x:Name="cmbComPort" FontSize="13px" Foreground="#000000"
|
|
|
+ DisplayMemberPath="Value" SelectedValuePath="Key" Width="110"
|
|
|
+ Margin="0,0,10,0" Padding="4" VerticalAlignment="Center"/>
|
|
|
+
|
|
|
+ <zdfflatui:FlatButton Grid.Column="0" x:Name="btnAddDevice" HorizontalAlignment="Left"
|
|
|
+ Background="#4CAF50" Content="添加设备"
|
|
|
+ Click="BtnAddDevice_Click" Foreground="White"
|
|
|
+ Width="80" Height="28" FontSize="13" Margin="10 0 0 0" />
|
|
|
+ <!--<zdfflatui:FlatButton Grid.Column="1" x:Name="btnDelDevice" HorizontalAlignment="Left"
|
|
|
+ Background="#FF4C4C" Content="删除设备"
|
|
|
+ Click="BtnDelDevice_Click" Foreground="White"
|
|
|
+ Width="80" Height="28" FontSize="13" Margin="10 0 0 0" />-->
|
|
|
+ <!--<zdfflatui:FlatButton Grid.Column="1" x:Name="btnTestConnect" HorizontalAlignment="Left"
|
|
|
+ Background="#2196F3" Content="连接测试"
|
|
|
+ Click="BtnDelDevice_Click" Foreground="White"
|
|
|
+ Width="80" Height="28" FontSize="13" Margin="10 0 0 0" />-->
|
|
|
+ </StackPanel>
|
|
|
+ </Grid>
|
|
|
+
|
|
|
+
|
|
|
+ <Border Grid.Row="1" BorderThickness="0" Padding="5 5 5 5">
|
|
|
+ <DataGrid Name="dgDevice" GridLinesVisibility="All" HorizontalGridLinesBrush="#D3D3D3" VerticalGridLinesBrush="#D3D3D3" RowHeight="80" BorderBrush="#D3D3D3"
|
|
|
+ HeadersVisibility="Column" SelectionMode="Single" SelectionUnit="FullRow" HorizontalScrollBarVisibility="Auto" CanUserResizeColumns="False"
|
|
|
+ SelectedItem="{Binding SelectedDeviceItem,Mode=TwoWay}"
|
|
|
+ AutoGenerateColumns="False" CanUserAddRows="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="White">
|
|
|
+ <DataGrid.Resources>
|
|
|
+ <Style TargetType="DataGridColumnHeader">
|
|
|
+ <Setter Property="Height" Value="40" />
|
|
|
+ <!--Setter Property="Background" Value="White" /-->
|
|
|
+ <Setter Property="Foreground" Value="Black" />
|
|
|
+ <Setter Property="FontSize" Value="13px" />
|
|
|
+ <Setter Property="FontWeight" Value="Bold" />
|
|
|
+ <Setter Property="BorderBrush" Value="#D3D3D3" />
|
|
|
+ <Setter Property="BorderThickness" Value="0,0,1,1" />
|
|
|
+ <Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
|
+ </Style>
|
|
|
+ <!-- 自定义行的选中样式 -->
|
|
|
+ <Style TargetType="DataGridRow">
|
|
|
+ <Style.Triggers>
|
|
|
+ <!-- 当行被选中时 -->
|
|
|
+ <DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="True">
|
|
|
+ <!-- 设置选中行的背景色 -->
|
|
|
+ <Setter Property="Background" Value="AliceBlue"/>
|
|
|
+ </DataTrigger>
|
|
|
+ </Style.Triggers>
|
|
|
+ </Style>
|
|
|
+
|
|
|
+ <!-- 自定义选中单元格的背景色 -->
|
|
|
+ <Style TargetType="DataGridCell">
|
|
|
+ <Style.Triggers>
|
|
|
+ <DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="True">
|
|
|
+ <!-- 设置选中单元格的背景色 -->
|
|
|
+ <Setter Property="Background" Value="AliceBlue"/>
|
|
|
+ <Setter Property="BorderBrush" Value="Transparent" />
|
|
|
+ </DataTrigger>
|
|
|
+ </Style.Triggers>
|
|
|
+ </Style>
|
|
|
+ </DataGrid.Resources>
|
|
|
+
|
|
|
+
|
|
|
+ <DataGrid.Columns>
|
|
|
+ <DataGridTemplateColumn Header="串口参数" Width="100">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding ConnectParam}" FontSize="14px" Foreground="Black"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Padding="5 0 0 0"/>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+
|
|
|
+ <DataGridTemplateColumn Header="地址" Width="50">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding DeviceId}" FontSize="14px" Foreground="Black"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Padding="5 0 0 0"/>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+
|
|
|
+ <DataGridTemplateColumn Header="读频率" Width="60">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding ReadFreqName}" FontSize="14px" Foreground="Black"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Padding="5 0 0 0"/>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+
|
|
|
+ <DataGridTemplateColumn Header="启用" Width="60">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding ReadStatusName}" FontSize="14px" Foreground="{Binding ReadStatusColor}"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Padding="5 0 0 0"/>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+
|
|
|
+ <DataGridTemplateColumn Header="读照片" Width="60">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding ReadStatusName}" FontSize="14px" Foreground="{Binding ReadStatusColor}"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Padding="5 0 0 0"/>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+
|
|
|
+ <DataGridTemplateColumn Header="操作" Width="60">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <StackPanel Orientation="Vertical" VerticalAlignment="Center">
|
|
|
+ <Button x:Name="btnConnectTest" Width="Auto" FontSize="13px" Content="连接测试" Foreground="#2196F3" VerticalAlignment="Center"
|
|
|
+ BorderBrush="Transparent" BorderThickness="0 0 0 0" Background="Transparent" Click="BtnConnectTest_Click" />
|
|
|
+ <Button x:Name="btnUpdateDevice" Width="Auto" FontSize="13px" Content="更新" Foreground="#2196F3" VerticalAlignment="Center"
|
|
|
+ Click="BtnUpdateDevice_Click"
|
|
|
+ BorderBrush="Transparent" BorderThickness="0 0 0 0" Background="Transparent" Margin="0 0 0 10" />
|
|
|
+ <Button x:Name="btnDelDevice" Width="Auto" FontSize="13px" Content="删除" Foreground="#2196F3" VerticalAlignment="Center"
|
|
|
+ BorderBrush="Transparent" BorderThickness="0 0 0 0" Background="Transparent" Click="BtnDelDevice_Click" />
|
|
|
+ </StackPanel>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+
|
|
|
+ <DataGridTemplateColumn Header="最后读时间" Width="120">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding ReadFreqName}" FontSize="14px" Foreground="Black"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Padding="5 0 0 0"/>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+ <!--<DataGridTemplateColumn Header="标注" Width="50">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding MarkCountName}" FontSize="13px" Foreground="#000000" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>-->
|
|
|
+
|
|
|
+ </DataGrid.Columns>
|
|
|
+
|
|
|
+ </DataGrid>
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ <StackPanel Grid.Row="2" Height="35" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0 0 0 0">
|
|
|
+ <TextBlock Text="{Binding Path=TotalRecords,StringFormat='共 {0} 个设备'}" Margin="5" VerticalAlignment="Center" FontSize="13px"/>
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ </Grid>
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ <Border Grid.Column="1" BorderBrush="#D3D3D3" BorderThickness="0 0 0 0">
|
|
|
+ <Grid>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="35" />
|
|
|
+ <RowDefinition Height="*" />
|
|
|
+ <RowDefinition Height="40" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+
|
|
|
+ <Grid Grid.Row="0" Margin="0 5 0 0">
|
|
|
+ <StackPanel Orientation="Horizontal" Grid.Row="0">
|
|
|
+ <TextBlock Text="COM1-115200 设备地址:123(0x01)" FontSize="14px" FontWeight="Bold"
|
|
|
+ Foreground="Black" VerticalAlignment="Center" Margin="10 0 0 0" />
|
|
|
+ </StackPanel>
|
|
|
+ <zdfflatui:FlatButton Grid.Column="1" x:Name="btnClearData" HorizontalAlignment="Right"
|
|
|
+ Background="#FF4C4C" Content="清空数据"
|
|
|
+ Click="BtnClearData_Click" Foreground="White"
|
|
|
+ Width="80" Height="28" FontSize="13" Margin="10 0 10 0" />
|
|
|
+ </Grid>
|
|
|
+
|
|
|
+ <Border Grid.Row="1" BorderThickness="0" Padding="5 5 5 5">
|
|
|
+ <DataGrid Name="dgData" GridLinesVisibility="All" HorizontalGridLinesBrush="#D3D3D3" VerticalGridLinesBrush="#D3D3D3" RowHeight="80" BorderBrush="#D3D3D3"
|
|
|
+ HeadersVisibility="Column" SelectionMode="Single" SelectionUnit="FullRow" HorizontalScrollBarVisibility="Auto" CanUserResizeColumns="False"
|
|
|
+ SelectedItem="{Binding SelectedDeviceItem,Mode=TwoWay}" FrozenColumnCount="2"
|
|
|
+ AutoGenerateColumns="False" CanUserAddRows="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="White">
|
|
|
+ <DataGrid.Resources>
|
|
|
+ <Style TargetType="DataGridColumnHeader">
|
|
|
+ <Setter Property="Height" Value="40" />
|
|
|
+ <!--Setter Property="Background" Value="White" /-->
|
|
|
+ <Setter Property="Foreground" Value="Black" />
|
|
|
+ <Setter Property="FontSize" Value="13px" />
|
|
|
+ <Setter Property="FontWeight" Value="Bold" />
|
|
|
+ <Setter Property="BorderBrush" Value="#D3D3D3" />
|
|
|
+ <Setter Property="BorderThickness" Value="0,0,1,1" />
|
|
|
+ <Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
|
+ </Style>
|
|
|
+ <!-- 自定义行的选中样式 -->
|
|
|
+ <Style TargetType="DataGridRow">
|
|
|
+ <Style.Triggers>
|
|
|
+ <!-- 当行被选中时 -->
|
|
|
+ <DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="True">
|
|
|
+ <!-- 设置选中行的背景色 -->
|
|
|
+ <Setter Property="Background" Value="AliceBlue"/>
|
|
|
+ </DataTrigger>
|
|
|
+ </Style.Triggers>
|
|
|
+ </Style>
|
|
|
+
|
|
|
+ <!-- 自定义选中单元格的背景色 -->
|
|
|
+ <Style TargetType="DataGridCell">
|
|
|
+ <Style.Triggers>
|
|
|
+ <DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="True">
|
|
|
+ <!-- 设置选中单元格的背景色 -->
|
|
|
+ <Setter Property="Background" Value="AliceBlue"/>
|
|
|
+ <Setter Property="BorderBrush" Value="Transparent" />
|
|
|
+ </DataTrigger>
|
|
|
+ </Style.Triggers>
|
|
|
+ </Style>
|
|
|
+ </DataGrid.Resources>
|
|
|
+
|
|
|
+
|
|
|
+ <DataGrid.Columns>
|
|
|
+ <DataGridTemplateColumn Header="设备SN" Width="120">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding DeviceSn}" FontSize="14px" Foreground="Black"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Padding="5 0 0 0"/>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+
|
|
|
+ <DataGridTemplateColumn Header="485读取时间" Width="120">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding ReadTime}" FontSize="14px" Foreground="Black"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Padding="5 0 0 0"/>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+
|
|
|
+ <!--<DataGridTemplateColumn Header="结果图片" Width="120">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <Image Visibility="{Binding ResultVisiable}" Source="{Binding DstImage,Converter={StaticResource ImagePatchConverter}}"
|
|
|
+ ToolTip="{Binding DstImage}"
|
|
|
+ PreviewMouseLeftButtonDown ="DstImage_PreviewMouseLeftButtonDown"
|
|
|
+ VerticalAlignment="Center" HorizontalAlignment="Center" Margin="2,2,2,2"/>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>-->
|
|
|
+
|
|
|
+ <DataGridTemplateColumn Header="水表照片" Width="120">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <Image Source="{Binding MeterImage}" PreviewMouseLeftButtonDown="MeterImage_PreviewMouseLeftButtonDown"
|
|
|
+ ToolTip="{Binding MeterImage}"
|
|
|
+ VerticalAlignment="Center" HorizontalAlignment="Center" Margin="2,2,2,2"/>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+
|
|
|
+ <DataGridTemplateColumn Header="累计流量(m³)" Width="120">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding AiResult}" FontSize="14px" Foreground="Black"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Padding="5 0 0 0"/>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+
|
|
|
+ <DataGridTemplateColumn Header="采样时间" Width="120">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding SampleTime}" FontSize="14px" Foreground="Black"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Padding="5 0 0 0"/>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+
|
|
|
+ <DataGridTemplateColumn Header="水表类型" Width="100">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding MeterTypeName}" FontSize="14px"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Padding="5 0 0 0"/>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+
|
|
|
+ <DataGridTemplateColumn Header="结果说明" Width="150">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <TextBlock Text="{Binding MeterResultName}" FontSize="14px" Foreground="Black"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Padding="5 0 0 0"/>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+ <DataGridTemplateColumn Header="操作" Width="60">
|
|
|
+ <DataGridTemplateColumn.CellTemplate>
|
|
|
+ <DataTemplate>
|
|
|
+ <StackPanel Orientation="Vertical" VerticalAlignment="Center">
|
|
|
+ <Button x:Name="btnLogViewer" Width="Auto" FontSize="13px" Content="日志" Foreground="#2196F3" VerticalAlignment="Center"
|
|
|
+ Click="BtnLogViewer_Click"
|
|
|
+ BorderBrush="Transparent" BorderThickness="0 0 0 0" Background="Transparent" Margin="0 0 0 10" />
|
|
|
+ <Button x:Name="btnDelData" Width="Auto" FontSize="13px" Content="删除" Foreground="#2196F3" VerticalAlignment="Center"
|
|
|
+ BorderBrush="Transparent" BorderThickness="0 0 0 0" Background="Transparent" Click="BtnDelData_Click" />
|
|
|
+ </StackPanel>
|
|
|
+ </DataTemplate>
|
|
|
+ </DataGridTemplateColumn.CellTemplate>
|
|
|
+ </DataGridTemplateColumn>
|
|
|
+ </DataGrid.Columns>
|
|
|
+ </DataGrid>
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ <!-- 底部分页控件 -->
|
|
|
+ <StackPanel Grid.Row="2" Height="35" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0">
|
|
|
+ <!--<TextBlock Text="共 100 条数据" Margin="5" VerticalAlignment="Center" FontSize="13px"/>-->
|
|
|
+ <TextBlock Text="{Binding ElementName=ucPatchGird,Path=TotalRecords,StringFormat='共 {0} 条数据'}" Margin="5" VerticalAlignment="Center" FontSize="13px"/>
|
|
|
+ <ComboBox Width="55" Margin="5" FontSize="13px"
|
|
|
+ ItemsSource="{Binding PageSizeOptions}"
|
|
|
+ SelectedValue="{Binding mConfigItem.PageSize3}"/>
|
|
|
+ <Button x:Name="btnDataFirstPage" Content="首页" Width="55" Margin="5" FontSize="13px" Click="BtnDataFirstPage_Click"/>
|
|
|
+ <Button x:Name="btnDataPrePage" Content="上一页" Width="55" Margin="5" FontSize="13px" Click="BtnDataPrePage_Click"/>
|
|
|
+ <!--<TextBlock Text="第 2 页 / 共 10 页" Margin="5" FontSize="13px" VerticalAlignment="Center"/>-->
|
|
|
+ <TextBlock Margin="5" FontSize="13px" VerticalAlignment="Center">
|
|
|
+ <TextBlock.Text>
|
|
|
+ <MultiBinding StringFormat="第 {0} 页 / 共 {1} 页">
|
|
|
+ <Binding ElementName="ucPatchGird" Path="PatchDetailPage.PageNumber"/>
|
|
|
+ <Binding ElementName="ucPatchGird" Path="PatchDetailPage.PageCount"/>
|
|
|
+ </MultiBinding>
|
|
|
+ </TextBlock.Text>
|
|
|
+ </TextBlock>
|
|
|
+ <Button x:Name="btnDataNextPage" Content="下一页" Width="55" Margin="5" FontSize="13px" Click="BtnDataNextPage_Click"/>
|
|
|
+ <Button x:Name="btnDataLastPage" Content="尾页" Width="55" Margin="5" FontSize="13px" Click="BtnDataLastPage_Click"/>
|
|
|
+ <TextBox x:Name="txtDataPageNumber" Width="55" Margin="5" TextAlignment="Center" FontSize="13px"
|
|
|
+ Text="{Binding ElementName=ucPatchGird,Path=PatchDetailPage.PageNumber,Mode=OneWay}"
|
|
|
+ MaxLength="5" PreviewTextInput="TextBox_PreviewTextInput" VerticalContentAlignment="Center"/>
|
|
|
+ <Button x:Name="btnDataSpeciPage" Content="跳转" Width="55" Margin="5" FontSize="13px" Click="BtnDataSpeciPage_Click"/>
|
|
|
+ </StackPanel>
|
|
|
+
|
|
|
+ </Grid>
|
|
|
+ </Border>
|
|
|
+
|
|
|
+
|
|
|
+ </Grid>
|
|
|
+</UserControl>
|