终端一体化运控平台
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

157 lignes
8.7 KiB

  1. <UserControl x:Class="BPASmartClient.JXJFoodBigStation.View.HKPlcCommMonitorView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:vm="clr-namespace:BPASmartClient.JXJFoodBigStation.ViewModel"
  8. mc:Ignorable="d"
  9. d:DesignHeight="1080" d:DesignWidth="1920">
  10. <UserControl.DataContext>
  11. <vm:HKPlcCommMonitorViewModel />
  12. </UserControl.DataContext>
  13. <Grid Margin="10">
  14. <Grid.RowDefinitions>
  15. <RowDefinition Height="80" />
  16. <RowDefinition />
  17. </Grid.RowDefinitions>
  18. <!--#region 表格标题栏设置-->
  19. <Grid
  20. Grid.Row="0"
  21. Margin="0,10,0,0"
  22. Background="#ff0C255F">
  23. <Grid.ColumnDefinitions>
  24. <ColumnDefinition Width="1*"/>
  25. <ColumnDefinition Width="1*"/>
  26. <ColumnDefinition Width="1*"/>
  27. <ColumnDefinition Width="1*"/>
  28. <ColumnDefinition Width="1*"/>
  29. <ColumnDefinition Width="1*"/>
  30. <ColumnDefinition Width="1*"/>
  31. <ColumnDefinition Width="1*"/>
  32. </Grid.ColumnDefinitions>
  33. <Grid Grid.Column="0">
  34. <TextBlock Text="序号" FontSize="24" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"/>
  35. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  36. </Grid>
  37. <TextBlock Grid.Column="1" FontSize="24" Text="变量名" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
  38. <TextBlock Grid.Column="2" FontSize="24" Text="地址" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
  39. <TextBlock Grid.Column="3" FontSize="24" Text="类型" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
  40. <Grid Grid.Column="4">
  41. <TextBlock Text="描述" FontSize="24" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
  42. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  43. </Grid>
  44. <TextBlock Grid.Column="5" FontSize="24" Text="当前值" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
  45. <Grid Grid.Column="6">
  46. <TextBlock Text="设定值" FontSize="24" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
  47. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  48. </Grid>
  49. <TextBlock Grid.Column="7" FontSize="24" Text="功能操作" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
  50. <Border Grid.ColumnSpan="10" BorderThickness="1,0,1,0" />
  51. </Grid>
  52. <Grid Grid.Row="1">
  53. <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" >
  54. <ItemsControl ItemsSource="{Binding PlcInfo}" Foreground="Aqua">
  55. <ItemsControl.ItemTemplate>
  56. <DataTemplate>
  57. <Grid Name="gr" >
  58. <Grid.ColumnDefinitions>
  59. <ColumnDefinition />
  60. <ColumnDefinition />
  61. <ColumnDefinition />
  62. <ColumnDefinition />
  63. <ColumnDefinition />
  64. <ColumnDefinition />
  65. <ColumnDefinition />
  66. <ColumnDefinition />
  67. </Grid.ColumnDefinitions>
  68. <Grid Grid.Column="0">
  69. <TextBlock
  70. FontSize="16"
  71. HorizontalAlignment="Center"
  72. VerticalAlignment="Center"
  73. Text="{Binding SerialNum}" />
  74. <Border
  75. BorderThickness="1,0,1,0"
  76. Cursor="SizeWE" />
  77. </Grid>
  78. <Grid Grid.Column="1">
  79. <TextBlock
  80. FontSize="16"
  81. HorizontalAlignment="Center"
  82. VerticalAlignment="Center"
  83. Text="{Binding Variable}" />
  84. <Border
  85. BorderThickness="1,0,1,0"
  86. Cursor="SizeWE" />
  87. </Grid>
  88. <TextBlock
  89. Grid.Column="2"
  90. FontSize="16"
  91. HorizontalAlignment="Center"
  92. VerticalAlignment="Center"
  93. Text="{Binding Address }" />
  94. <TextBlock
  95. Grid.Column="3"
  96. FontSize="16"
  97. HorizontalAlignment="Center"
  98. VerticalAlignment="Center"
  99. Text="{Binding Type }" />
  100. <Grid Grid.Column="4">
  101. <TextBlock
  102. FontSize="16"
  103. HorizontalAlignment="Center"
  104. VerticalAlignment="Center"
  105. Text="{Binding Describe}" />
  106. <Border
  107. BorderThickness="1,0,1,0"
  108. Cursor="SizeWE" />
  109. </Grid>
  110. <TextBlock
  111. HorizontalAlignment="Center"
  112. VerticalAlignment="Center"
  113. Grid.Column="5"
  114. Text="{Binding NowValue}" FontSize="16" />
  115. <Grid Grid.Column="6">
  116. <TextBox
  117. Text="{Binding SetValue}" Foreground="Aqua" Background="Transparent" FontSize="16" VerticalAlignment="Center" />
  118. <Border
  119. BorderThickness="1,0,1,0"
  120. Cursor="SizeWE" />
  121. </Grid>
  122. <Grid Grid.Column="7">
  123. <pry:IcoButton
  124. Width="100"
  125. Command="{Binding DataContext.SetValueCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  126. CommandParameter="{Binding Address}"
  127. Grid.Column="0"
  128. Margin="50,5,50,5"
  129. Content="设置"
  130. FontSize="20"
  131. Foreground="Aqua"
  132. Style="{StaticResource IcoButtonStyle}" />
  133. <Border
  134. BorderThickness="1,0,1,0"
  135. Cursor="SizeWE" />
  136. </Grid>
  137. <Border
  138. Grid.ColumnSpan="10"
  139. BorderThickness="1,0,1,1" />
  140. </Grid>
  141. <DataTemplate.Triggers>
  142. <Trigger Property="IsMouseOver" Value="true">
  143. <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
  144. </Trigger>
  145. </DataTemplate.Triggers>
  146. </DataTemplate>
  147. </ItemsControl.ItemTemplate>
  148. </ItemsControl>
  149. </ScrollViewer>
  150. </Grid>
  151. </Grid>
  152. </UserControl>