终端一体化运控平台
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

143 wiersze
6.3 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.JXJFoodBigStation.View.GlobalVarMonitorView"
  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:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  8. xmlns:vm="clr-namespace:BPASmartClient.JXJFoodBigStation.ViewModel"
  9. d:DesignHeight="1080"
  10. d:DesignWidth="1920"
  11. mc:Ignorable="d">
  12. <UserControl.DataContext>
  13. <vm:GlobalVarMonitorViewModel />
  14. </UserControl.DataContext>
  15. <Grid Margin="10">
  16. <Grid.RowDefinitions>
  17. <RowDefinition Height="80" />
  18. <RowDefinition />
  19. </Grid.RowDefinitions>
  20. <!--#region 表格标题栏设置-->
  21. <Grid
  22. Grid.Row="0"
  23. Margin="0,10,0,0"
  24. Background="#ff0C255F">
  25. <Grid.ColumnDefinitions>
  26. <ColumnDefinition Width="60" />
  27. <ColumnDefinition Width="400" />
  28. <ColumnDefinition Width="200" />
  29. <ColumnDefinition />
  30. <ColumnDefinition Width="200" />
  31. </Grid.ColumnDefinitions>
  32. <Grid Grid.Column="0">
  33. <TextBlock
  34. HorizontalAlignment="Center"
  35. VerticalAlignment="Center"
  36. FontSize="24"
  37. Foreground="Aqua"
  38. Text="序号" />
  39. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  40. </Grid>
  41. <TextBlock
  42. Grid.Column="1"
  43. HorizontalAlignment="Left"
  44. VerticalAlignment="Center"
  45. FontSize="24"
  46. Foreground="Aqua"
  47. Text="变量名" />
  48. <TextBlock
  49. Grid.Column="2"
  50. HorizontalAlignment="Left"
  51. VerticalAlignment="Center"
  52. FontSize="24"
  53. Foreground="Aqua"
  54. Text="类型" />
  55. <Grid Grid.Column="3">
  56. <TextBlock
  57. HorizontalAlignment="Left"
  58. VerticalAlignment="Center"
  59. FontSize="24"
  60. Foreground="Aqua"
  61. Text="描述" />
  62. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  63. </Grid>
  64. <TextBlock
  65. Grid.Column="4"
  66. HorizontalAlignment="Left"
  67. VerticalAlignment="Center"
  68. FontSize="24"
  69. Foreground="Aqua"
  70. Text="当前值" />
  71. <Border Grid.ColumnSpan="10" BorderThickness="1,0,1,0" />
  72. </Grid>
  73. <Grid Grid.Row="1">
  74. <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
  75. <ItemsControl Foreground="Aqua" ItemsSource="{Binding PlcInfo}">
  76. <ItemsControl.ItemTemplate>
  77. <DataTemplate>
  78. <Grid Name="gr" Margin="0,3">
  79. <Grid.ColumnDefinitions>
  80. <ColumnDefinition Width="60" />
  81. <ColumnDefinition Width="400" />
  82. <ColumnDefinition Width="200" />
  83. <ColumnDefinition />
  84. <ColumnDefinition Width="200" />
  85. </Grid.ColumnDefinitions>
  86. <Grid Grid.Column="0">
  87. <TextBlock
  88. HorizontalAlignment="Center"
  89. VerticalAlignment="Center"
  90. FontSize="16"
  91. Text="{Binding SerialNum}" />
  92. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  93. </Grid>
  94. <Grid Grid.Column="1">
  95. <TextBlock
  96. HorizontalAlignment="Left"
  97. VerticalAlignment="Center"
  98. FontSize="16"
  99. Text="{Binding Variable}" />
  100. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  101. </Grid>
  102. <TextBlock
  103. Grid.Column="2"
  104. HorizontalAlignment="Left"
  105. VerticalAlignment="Center"
  106. FontSize="16"
  107. Text="{Binding Type}" />
  108. <Grid Grid.Column="3">
  109. <TextBlock
  110. HorizontalAlignment="Left"
  111. VerticalAlignment="Center"
  112. FontSize="16"
  113. Text="{Binding Describe}" />
  114. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  115. </Grid>
  116. <TextBlock
  117. Grid.Column="4"
  118. HorizontalAlignment="Left"
  119. VerticalAlignment="Center"
  120. FontSize="16"
  121. Text="{Binding NowValue}" />
  122. <Border Grid.ColumnSpan="10" BorderThickness="1,0,1,1" />
  123. </Grid>
  124. <DataTemplate.Triggers>
  125. <Trigger Property="IsMouseOver" Value="true">
  126. <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
  127. </Trigger>
  128. </DataTemplate.Triggers>
  129. </DataTemplate>
  130. </ItemsControl.ItemTemplate>
  131. </ItemsControl>
  132. </ScrollViewer>
  133. </Grid>
  134. </Grid>
  135. </UserControl>