EquipmentDataQueuePage.xaml
3.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<Page x:Class="HHECS.DAQClient.View.EquipmentView.EquipmentDataQueuePage"
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:HHECS.DAQClient.View.EquipmentView"
mc:Ignorable="d"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:viewmodel="clr-namespace:HHECS.DAQClient.ViewModel.EquipmentVM"
d:DataContext="{d:DesignInstance Type=viewmodel:EquipmentDataQueueVM}"
d:DesignHeight="450" d:DesignWidth="800"
Title="EquipmentDataQueuePage">
<DockPanel>
<StackPanel DockPanel.Dock="Top">
<hc:UniformSpacingPanel Spacing="10">
<hc:ElementGroup VerticalAlignment="Center" Height="30" Margin="0,1" Layout="Stack">
<Border Style="{StaticResource BorderRegion}" Padding="6,0">
<TextBlock Text="设备编号" Width="50" VerticalAlignment="Center"/>
</Border>
<TextBox Text="{Binding EquipmentCode,UpdateSourceTrigger=PropertyChanged}" MinWidth="150"/>
</hc:ElementGroup>
<hc:ElementGroup VerticalAlignment="Center" Height="30" Layout="Stack">
<Border Style="{StaticResource BorderRegion}" Padding="6,0">
<TextBlock Text="设备类型" Width="50" VerticalAlignment="Center"/>
</Border>
<hc:ComboBox MinWidth="150" MaxWidth="200" ItemsSource="{Binding EquipmentTypes}" DisplayMemberPath="Key" SelectedValuePath="Value" SelectedValue="{Binding EquipmentTypeCode}" Style="{StaticResource ComboBoxExtend}" />
</hc:ElementGroup>
</hc:UniformSpacingPanel>
<ToolBar Padding="4" Margin="0,1" HorizontalAlignment="Right">
<Button Content="搜索" Command="{Binding SerachCommand}" CommandParameter="{Binding ElementName=SysOrgCbx,Path=SelectedItems}" Style="{StaticResource ButtonDefault}" hc:IconElement.Geometry="{StaticResource SearchGeometry}" Margin="5,0"/>
</ToolBar>
</StackPanel>
<hc:Pagination DockPanel.Dock="Bottom" MaxPageCount="{Binding MaxPage}" PageIndex="{Binding PageIndex}" DataCountPerPage="{Binding PageSize}" IsJumpEnabled="True">
<hc:Interaction.Triggers>
<hc:EventTrigger EventName="PageUpdated">
<hc:EventToCommand Command="{Binding PageUpdatedCommand}" PassEventArgsToCommand="True" />
</hc:EventTrigger>
</hc:Interaction.Triggers>
</hc:Pagination>
<DataGrid Style="{StaticResource DataGrid.Small}" IsReadOnly="True" hc:DataGridAttach.CanUnselectAllWithBlankArea="True" HeadersVisibility="All" RowHeaderWidth="60" AutoGenerateColumns="False" ItemsSource="{Binding DataQueues}" hc:DataGridAttach.ShowRowNumber="True">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Id}" Header="Id" Visibility="Hidden"/>
<DataGridTextColumn Binding="{Binding EquipmentCode}" Header="设备编号"/>
<DataGridTextColumn Binding="{Binding EquipmentTypeCode}" Header="设备类型编号"/>
<DataGridTextColumn Binding="{Binding Reported}" Header="Json数据"/>
<DataGridTextColumn Binding="{Binding Version}" Header="版本号"/>
<DataGridTextColumn Binding="{Binding SourceTimestamp}" Header="时间戳"/>
<DataGridTextColumn Binding="{Binding IsCommit}" Header="是否已提交"/>
<DataGridTextColumn Binding="{Binding CreateTime, StringFormat={}{0:yyyy/MM/dd HH:mm:ss}}" Header="创建时间"/>
</DataGrid.Columns>
</DataGrid>
</DockPanel>
</Page>