终端一体化运控平台
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

GlobalVarMonitorView.xaml 6.3 KiB

hace 1 año
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <UserControl x:Class="BPASmartClient.JXJFoodBigStation.View.GlobalVarMonitorView"
  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:GlobalVarMonitorViewModel />
  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="60"/>
  25. <ColumnDefinition Width="400"/>
  26. <ColumnDefinition Width="200"/>
  27. <ColumnDefinition />
  28. <ColumnDefinition Width="200"/>
  29. </Grid.ColumnDefinitions>
  30. <Grid Grid.Column="0">
  31. <TextBlock Text="序号" FontSize="24" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"/>
  32. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  33. </Grid>
  34. <TextBlock Grid.Column="1" FontSize="24" Text="变量名" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Aqua" />
  35. <TextBlock Grid.Column="2" FontSize="24" Text="类型" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Aqua" />
  36. <Grid Grid.Column="3">
  37. <TextBlock Text="描述" FontSize="24" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Aqua" />
  38. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  39. </Grid>
  40. <TextBlock Grid.Column="4" FontSize="24" Text="当前值" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Aqua" />
  41. <Border Grid.ColumnSpan="10" BorderThickness="1,0,1,0" />
  42. </Grid>
  43. <Grid Grid.Row="1">
  44. <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" >
  45. <ItemsControl ItemsSource="{Binding PlcInfo}" Foreground="Aqua">
  46. <ItemsControl.ItemTemplate>
  47. <DataTemplate>
  48. <Grid Name="gr" Margin="0,3">
  49. <Grid.ColumnDefinitions>
  50. <ColumnDefinition Width="60"/>
  51. <ColumnDefinition Width="400"/>
  52. <ColumnDefinition Width="200"/>
  53. <ColumnDefinition />
  54. <ColumnDefinition Width="200"/>
  55. </Grid.ColumnDefinitions>
  56. <Grid Grid.Column="0">
  57. <TextBlock
  58. FontSize="16"
  59. HorizontalAlignment="Center"
  60. VerticalAlignment="Center"
  61. Text="{Binding SerialNum}" />
  62. <Border
  63. BorderThickness="1,0,1,0"
  64. Cursor="SizeWE" />
  65. </Grid>
  66. <Grid Grid.Column="1">
  67. <TextBlock
  68. FontSize="16"
  69. HorizontalAlignment="Left"
  70. VerticalAlignment="Center"
  71. Text="{Binding Variable}" />
  72. <Border
  73. BorderThickness="1,0,1,0"
  74. Cursor="SizeWE" />
  75. </Grid>
  76. <TextBlock
  77. Grid.Column="2"
  78. FontSize="16"
  79. HorizontalAlignment="Left"
  80. VerticalAlignment="Center"
  81. Text="{Binding Type }" />
  82. <Grid Grid.Column="3">
  83. <TextBlock
  84. FontSize="16"
  85. HorizontalAlignment="Left"
  86. VerticalAlignment="Center"
  87. Text="{Binding Describe}" />
  88. <Border
  89. BorderThickness="1,0,1,0"
  90. Cursor="SizeWE" />
  91. </Grid>
  92. <TextBlock
  93. HorizontalAlignment="Left"
  94. VerticalAlignment="Center"
  95. Grid.Column="4"
  96. Text="{Binding NowValue}" FontSize="16" />
  97. <Border
  98. Grid.ColumnSpan="10"
  99. BorderThickness="1,0,1,1" />
  100. </Grid>
  101. <DataTemplate.Triggers>
  102. <Trigger Property="IsMouseOver" Value="true">
  103. <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
  104. </Trigger>
  105. </DataTemplate.Triggers>
  106. </DataTemplate>
  107. </ItemsControl.ItemTemplate>
  108. </ItemsControl>
  109. </ScrollViewer>
  110. </Grid>
  111. </Grid>
  112. </UserControl>