终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

203 lines
10 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.FoodStationTest.View.PlcVarMonitorView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:vm="clr-namespace:BPASmartClient.FoodStationTest.ViewModel"
  8. d:DesignHeight="1080"
  9. d:DesignWidth="1920"
  10. mc:Ignorable="d">
  11. <UserControl.DataContext>
  12. <vm:PlcVarMonitorViewModel />
  13. </UserControl.DataContext>
  14. <Border BorderBrush="{StaticResource bordColor}" BorderThickness="0">
  15. <Grid Margin="0,10">
  16. <Grid.RowDefinitions>
  17. <RowDefinition Height="60" />
  18. <RowDefinition />
  19. </Grid.RowDefinitions>
  20. <Grid>
  21. <Grid.ColumnDefinitions>
  22. <ColumnDefinition Width="3*" />
  23. <ColumnDefinition Width="8*" />
  24. <ColumnDefinition Width="4*" />
  25. <ColumnDefinition Width="4*" />
  26. <ColumnDefinition Width="8*" />
  27. <ColumnDefinition Width="5*" />
  28. <ColumnDefinition Width="17" />
  29. </Grid.ColumnDefinitions>
  30. <Grid>
  31. <TextBlock
  32. HorizontalAlignment="Center"
  33. VerticalAlignment="Center"
  34. FontSize="32"
  35. Foreground="Aqua"
  36. Text="序号" />
  37. <Border
  38. BorderBrush="{StaticResource bordColor}"
  39. BorderThickness="1,1,0,0"
  40. Cursor="SizeWE" />
  41. </Grid>
  42. <Grid Grid.Column="1">
  43. <TextBlock
  44. HorizontalAlignment="Center"
  45. VerticalAlignment="Center"
  46. FontSize="32"
  47. Foreground="Aqua"
  48. Text="名称" />
  49. <Border
  50. BorderBrush="{StaticResource bordColor}"
  51. BorderThickness="1,1,0,0"
  52. Cursor="SizeWE" />
  53. </Grid>
  54. <Grid Grid.Column="2">
  55. <TextBlock
  56. HorizontalAlignment="Center"
  57. VerticalAlignment="Center"
  58. FontSize="32"
  59. Foreground="Aqua"
  60. Text="地址" />
  61. <Border
  62. BorderBrush="{StaticResource bordColor}"
  63. BorderThickness="1,1,0,0"
  64. Cursor="SizeWE" />
  65. </Grid>
  66. <Grid Grid.Column="3">
  67. <TextBlock
  68. HorizontalAlignment="Center"
  69. VerticalAlignment="Center"
  70. FontSize="32"
  71. Foreground="Aqua"
  72. Text="类型" />
  73. <Border
  74. BorderBrush="{StaticResource bordColor}"
  75. BorderThickness="1,1,0,0"
  76. Cursor="SizeWE" />
  77. </Grid>
  78. <Grid Grid.Column="4">
  79. <TextBlock
  80. HorizontalAlignment="Center"
  81. VerticalAlignment="Center"
  82. FontSize="32"
  83. Foreground="Aqua"
  84. Text="描述" />
  85. <Border
  86. BorderBrush="{StaticResource bordColor}"
  87. BorderThickness="1,1,0,0"
  88. Cursor="SizeWE" />
  89. </Grid>
  90. <Grid Grid.Column="5">
  91. <TextBlock
  92. HorizontalAlignment="Center"
  93. VerticalAlignment="Center"
  94. FontSize="32"
  95. Foreground="Aqua"
  96. Text="当前值" />
  97. <Border
  98. BorderBrush="{StaticResource bordColor}"
  99. BorderThickness="1,1,0,0"
  100. Cursor="SizeWE" />
  101. </Grid>
  102. </Grid>
  103. <Grid Grid.Row="1">
  104. <ScrollViewer>
  105. <ItemsControl Foreground="Aqua" ItemsSource="{Binding plcInfos}">
  106. <ItemsControl.ItemTemplate>
  107. <DataTemplate>
  108. <Grid Name="gr" Height="30">
  109. <Grid.ColumnDefinitions>
  110. <ColumnDefinition Width="3*" />
  111. <ColumnDefinition Width="8*" />
  112. <ColumnDefinition Width="4*" />
  113. <ColumnDefinition Width="4*" />
  114. <ColumnDefinition Width="8*" />
  115. <ColumnDefinition Width="5*" />
  116. </Grid.ColumnDefinitions>
  117. <Grid>
  118. <TextBlock
  119. HorizontalAlignment="Center"
  120. VerticalAlignment="Center"
  121. FontSize="16"
  122. Foreground="Aqua"
  123. Text="{Binding Count}" />
  124. <Border
  125. BorderBrush="{StaticResource bordColor}"
  126. BorderThickness="1"
  127. Cursor="SizeWE" />
  128. </Grid>
  129. <Grid Grid.Column="1">
  130. <TextBlock
  131. HorizontalAlignment="Left"
  132. VerticalAlignment="Center"
  133. FontSize="16"
  134. Foreground="Aqua"
  135. Text="{Binding Name}" />
  136. <Border
  137. BorderBrush="{StaticResource bordColor}"
  138. BorderThickness="1"
  139. Cursor="SizeWE" />
  140. </Grid>
  141. <Grid Grid.Column="2">
  142. <TextBlock
  143. HorizontalAlignment="Left"
  144. VerticalAlignment="Center"
  145. FontSize="16"
  146. Foreground="Aqua"
  147. Text="{Binding Address}" />
  148. <Border
  149. BorderBrush="{StaticResource bordColor}"
  150. BorderThickness="1"
  151. Cursor="SizeWE" />
  152. </Grid>
  153. <Grid Grid.Column="3">
  154. <TextBlock
  155. HorizontalAlignment="Left"
  156. VerticalAlignment="Center"
  157. FontSize="16"
  158. Foreground="Aqua"
  159. Text="{Binding Type}" />
  160. <Border
  161. BorderBrush="{StaticResource bordColor}"
  162. BorderThickness="1"
  163. Cursor="SizeWE" />
  164. </Grid>
  165. <Grid Grid.Column="4">
  166. <TextBlock
  167. HorizontalAlignment="Left"
  168. VerticalAlignment="Center"
  169. FontSize="16"
  170. Foreground="Aqua"
  171. Text="{Binding Describe}" />
  172. <Border
  173. BorderBrush="{StaticResource bordColor}"
  174. BorderThickness="1"
  175. Cursor="SizeWE" />
  176. </Grid>
  177. <Grid Grid.Column="5">
  178. <TextBlock
  179. HorizontalAlignment="Center"
  180. VerticalAlignment="Center"
  181. FontSize="16"
  182. Foreground="Aqua"
  183. Text="{Binding Value}" />
  184. <Border
  185. BorderBrush="{StaticResource bordColor}"
  186. BorderThickness="1"
  187. Cursor="SizeWE" />
  188. </Grid>
  189. </Grid>
  190. <DataTemplate.Triggers>
  191. <Trigger Property="IsMouseOver" Value="true">
  192. <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
  193. </Trigger>
  194. </DataTemplate.Triggers>
  195. </DataTemplate>
  196. </ItemsControl.ItemTemplate>
  197. </ItemsControl>
  198. </ScrollViewer>
  199. </Grid>
  200. </Grid>
  201. </Border>
  202. </UserControl>