终端一体化运控平台
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

před 2 roky
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <UserControl x:Class="BPASmartClient.MorkMW.View.MonitorView"
  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:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:BPASmartClient.MorkMW.View"
  7. xmlns:vm="clr-namespace:BPASmartClient.MorkMW.ViewModel"
  8. mc:Ignorable="d"
  9. Name="变量监控"
  10. d:DesignHeight="450" d:DesignWidth="800">
  11. <UserControl.DataContext>
  12. <vm:MonitorViewModel/>
  13. </UserControl.DataContext>
  14. <UserControl.Resources>
  15. <SolidColorBrush Color="White" x:Key="TitleFontColor"/>
  16. <SolidColorBrush x:Key="FontColor" Color="#FF2AB2E7" />
  17. </UserControl.Resources>
  18. <Grid Margin="10,0">
  19. <Grid.RowDefinitions>
  20. <RowDefinition Height="30"/>
  21. <RowDefinition/>
  22. </Grid.RowDefinitions>
  23. <Grid Background="#dd2AB2E7">
  24. <Grid.ColumnDefinitions>
  25. <ColumnDefinition Width="40" />
  26. <ColumnDefinition/>
  27. <ColumnDefinition/>
  28. <ColumnDefinition/>
  29. <ColumnDefinition/>
  30. <ColumnDefinition/>
  31. </Grid.ColumnDefinitions>
  32. <TextBlock
  33. HorizontalAlignment="Center"
  34. VerticalAlignment="Center"
  35. FontSize="16"
  36. Foreground="{StaticResource TitleFontColor}"
  37. Text="ID" />
  38. <GridSplitter Background="White" Width="2" />
  39. <TextBlock
  40. Grid.Column="1"
  41. HorizontalAlignment="Center"
  42. VerticalAlignment="Center"
  43. FontSize="16"
  44. Foreground="{StaticResource TitleFontColor}"
  45. Text="变量名" />
  46. <GridSplitter Background="White" Width="2" Grid.Column="1"/>
  47. <TextBlock
  48. Grid.Column="2"
  49. HorizontalAlignment="Center"
  50. VerticalAlignment="Center"
  51. FontSize="16"
  52. Foreground="{StaticResource TitleFontColor}"
  53. Text="机器人地址" />
  54. <GridSplitter Background="White" Width="2" Grid.Column="2"/>
  55. <TextBlock
  56. Grid.Column="3"
  57. HorizontalAlignment="Center"
  58. VerticalAlignment="Center"
  59. FontSize="16"
  60. Foreground="{StaticResource TitleFontColor}"
  61. Text="Modbus地址" />
  62. <GridSplitter Background="White" Width="2" Grid.Column="3"/>
  63. <TextBlock
  64. Grid.Column="4"
  65. HorizontalAlignment="Center"
  66. VerticalAlignment="Center"
  67. FontSize="16"
  68. Foreground="{StaticResource TitleFontColor}"
  69. Text="注释" />
  70. <GridSplitter Background="White" Width="2" Grid.Column="4"/>
  71. <TextBlock
  72. Grid.Column="5"
  73. HorizontalAlignment="Center"
  74. VerticalAlignment="Center"
  75. FontSize="16"
  76. Foreground="{StaticResource TitleFontColor}"
  77. Text="当前值" />
  78. <GridSplitter Background="White" Width="2" Grid.Column="5"/>
  79. </Grid>
  80. <ItemsControl ItemsSource="{Binding vars}" Grid.Row="1">
  81. <ItemsControl.ItemsPanel>
  82. <ItemsPanelTemplate>
  83. <StackPanel/>
  84. </ItemsPanelTemplate>
  85. </ItemsControl.ItemsPanel>
  86. <ItemsControl.ItemTemplate>
  87. <DataTemplate>
  88. <Grid>
  89. <Grid.ColumnDefinitions>
  90. <ColumnDefinition Width="40" />
  91. <ColumnDefinition/>
  92. <ColumnDefinition/>
  93. <ColumnDefinition/>
  94. <ColumnDefinition/>
  95. <ColumnDefinition/>
  96. </Grid.ColumnDefinitions>
  97. <TextBlock Text="{Binding Id}"
  98. Height="30"
  99. Margin="0,5"
  100. HorizontalAlignment="Center"
  101. VerticalAlignment="Center"
  102. Background="Transparent"
  103. FontSize="14"
  104. Foreground="{StaticResource FontColor}"/>
  105. <TextBlock Text="{Binding VaribleName}" Grid.Column="1"
  106. Height="30"
  107. Margin="0,5"
  108. HorizontalAlignment="Center"
  109. VerticalAlignment="Center"
  110. Background="Transparent"
  111. FontSize="14"
  112. Foreground="{StaticResource FontColor}"/>
  113. <TextBlock Text="{Binding RobotAddress}" Grid.Column="2" HorizontalAlignment="Center"
  114. Height="30"
  115. Margin="0,5"
  116. VerticalAlignment="Center"
  117. Background="Transparent"
  118. FontSize="14"
  119. Foreground="{StaticResource FontColor}"/>
  120. <TextBlock Text="{Binding ModbusAddress}" Grid.Column="3" HorizontalAlignment="Center"
  121. Height="30"
  122. Margin="0,5"
  123. VerticalAlignment="Center"
  124. Background="Transparent"
  125. FontSize="14"
  126. Foreground="{StaticResource FontColor}"/>
  127. <TextBlock Text="{Binding Notes}" Grid.Column="4" HorizontalAlignment="Center"
  128. Height="30"
  129. Margin="0,5"
  130. VerticalAlignment="Center"
  131. Background="Transparent"
  132. FontSize="14"
  133. Foreground="{StaticResource FontColor}"/>
  134. <TextBlock Text="{Binding CurrentValue}" Grid.Column="5" HorizontalAlignment="Center"
  135. Height="30"
  136. Margin="0,5"
  137. VerticalAlignment="Center"
  138. Background="Transparent"
  139. FontSize="14"
  140. Foreground="{StaticResource FontColor}"/>
  141. </Grid>
  142. </DataTemplate>
  143. </ItemsControl.ItemTemplate>
  144. </ItemsControl>
  145. </Grid>
  146. </UserControl>