终端一体化运控平台
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

2 роки тому
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <UserControl
  2. x:Class="BPASmartClient.JXJFoodSmallStation.View.ManualCommView"
  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:local="clr-namespace:BPASmartClient.JXJFoodSmallStation.View"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  9. xmlns:vm="clr-namespace:BPASmartClient.JXJFoodSmallStation.ViewModel"
  10. d:DesignHeight="850"
  11. d:DesignWidth="1200"
  12. mc:Ignorable="d">
  13. <UserControl.DataContext>
  14. <vm:ManualCommViewModel />
  15. </UserControl.DataContext>
  16. <UserControl.Resources>
  17. <Style x:Key="radioButtonStyle" TargetType="RadioButton">
  18. <Setter Property="Template">
  19. <Setter.Value>
  20. <ControlTemplate TargetType="RadioButton">
  21. <Grid Name="gr" Opacity="0.8">
  22. <ContentControl
  23. Margin="{TemplateBinding Margin}"
  24. HorizontalAlignment="Center"
  25. VerticalAlignment="Center"
  26. HorizontalContentAlignment="Center"
  27. VerticalContentAlignment="Center"
  28. Content="{TemplateBinding Content}"
  29. FontSize="{TemplateBinding FontSize}"
  30. Foreground="{TemplateBinding Foreground}" />
  31. <Image
  32. Name="image"
  33. Source="/BPASmartClient.CustomResource;component/Image/边框线.png"
  34. Stretch="Fill" />
  35. </Grid>
  36. <ControlTemplate.Triggers>
  37. <Trigger Property="IsChecked" Value="False">
  38. <Setter TargetName="image" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/边框线.png" />
  39. </Trigger>
  40. <Trigger Property="IsChecked" Value="True">
  41. <Setter TargetName="image" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/透明背景.png" />
  42. </Trigger>
  43. <Trigger Property="IsMouseOver" Value="True">
  44. <Setter TargetName="gr" Property="Opacity" Value="1" />
  45. </Trigger>
  46. </ControlTemplate.Triggers>
  47. </ControlTemplate>
  48. </Setter.Value>
  49. </Setter>
  50. </Style>
  51. </UserControl.Resources>
  52. <Grid Margin="10">
  53. <Grid.RowDefinitions>
  54. <RowDefinition Height="40" />
  55. <RowDefinition />
  56. </Grid.RowDefinitions>
  57. <!--#region 表格标题栏设置-->
  58. <Grid
  59. Grid.Row="0"
  60. Margin="0,10,0,0"
  61. Background="#ff0C255F">
  62. <Grid.ColumnDefinitions>
  63. <ColumnDefinition Width="1*"/>
  64. <ColumnDefinition Width="1*"/>
  65. <ColumnDefinition Width="1*"/>
  66. <ColumnDefinition Width="1*"/>
  67. <ColumnDefinition Width="1*"/>
  68. <ColumnDefinition Width="1*"/>
  69. </Grid.ColumnDefinitions>
  70. <Grid Grid.Column="0">
  71. <TextBlock Text="序号" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"/>
  72. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  73. </Grid>
  74. <TextBlock Grid.Column="1" Text="地址" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
  75. <Grid Grid.Column="2">
  76. <TextBlock Text="描述" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
  77. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  78. </Grid>
  79. <TextBlock Grid.Column="3" Text="当前值" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
  80. <Grid Grid.Column="4">
  81. <TextBlock Text="设定值" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
  82. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  83. </Grid>
  84. <TextBlock Grid.Column="5" Text="功能操作" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
  85. <Border Grid.ColumnSpan="10" BorderThickness="1,0,1,0" />
  86. </Grid>
  87. <Grid Grid.Row="1">
  88. <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" >
  89. <ItemsControl ItemsSource="{Binding PlcInfo}" Foreground="Aqua">
  90. <ItemsControl.ItemTemplate>
  91. <DataTemplate>
  92. <Grid Name="gr" >
  93. <Grid.ColumnDefinitions>
  94. <ColumnDefinition />
  95. <ColumnDefinition />
  96. <ColumnDefinition />
  97. <ColumnDefinition />
  98. <ColumnDefinition />
  99. <ColumnDefinition />
  100. </Grid.ColumnDefinitions>
  101. <Grid Grid.Column="0">
  102. <TextBlock
  103. HorizontalAlignment="Center"
  104. VerticalAlignment="Center"
  105. Text="{Binding SerialNum}" />
  106. <Border
  107. BorderThickness="1,0,1,0"
  108. Cursor="SizeWE" />
  109. </Grid>
  110. <TextBlock
  111. Grid.Column="1"
  112. HorizontalAlignment="Center"
  113. VerticalAlignment="Center"
  114. Text="{Binding Address }" />
  115. <Grid Grid.Column="2">
  116. <TextBlock
  117. HorizontalAlignment="Center"
  118. VerticalAlignment="Center"
  119. Text="{Binding Describe}" />
  120. <Border
  121. BorderThickness="1,0,1,0"
  122. Cursor="SizeWE" />
  123. </Grid>
  124. <TextBlock
  125. HorizontalAlignment="Center"
  126. VerticalAlignment="Center"
  127. Grid.Column="3"
  128. Text="{Binding NowValue}" />
  129. <Grid Grid.Column="4">
  130. <TextBox
  131. Text="{Binding SetValue}" />
  132. <Border
  133. BorderThickness="1,0,1,0"
  134. Cursor="SizeWE" />
  135. </Grid>
  136. <Grid Grid.Column="5">
  137. <pry:IcoButton
  138. Command="{Binding EStopCommand}"
  139. Grid.Column="0"
  140. Margin="40,5,40,5"
  141. Content="设置"
  142. FontSize="20"
  143. Foreground="Aqua"
  144. Style="{StaticResource IcoButtonStyle}" />
  145. <Border
  146. BorderThickness="1,0,1,0"
  147. Cursor="SizeWE" />
  148. </Grid>
  149. <Border
  150. Grid.ColumnSpan="10"
  151. BorderThickness="1,0,1,1" />
  152. </Grid>
  153. <DataTemplate.Triggers>
  154. <Trigger Property="IsMouseOver" Value="true">
  155. <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
  156. </Trigger>
  157. </DataTemplate.Triggers>
  158. </DataTemplate>
  159. </ItemsControl.ItemTemplate>
  160. </ItemsControl>
  161. </ScrollViewer>
  162. </Grid>
  163. </Grid>
  164. </UserControl>