SettingView.xaml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. <UserControl x:Class="LampInspectionMachine.Views.SettingView"
  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:LampInspectionMachine.Views"
  7. xmlns:prism="http://prismlibrary.com/"
  8. prism:ViewModelLocator.AutoWireViewModel="True"
  9. mc:Ignorable="d"
  10. d:DesignHeight="700"
  11. d:DesignWidth="1000"
  12. d:Background="White">
  13. <UserControl.Resources>
  14. <Style x:Key="textborder"
  15. TargetType="Border">
  16. <Setter Property="BorderThickness"
  17. Value="2" />
  18. <Setter Property="Background"
  19. Value="#548CC5" />
  20. <Setter Property="VerticalAlignment"
  21. Value="Center" />
  22. <Setter Property="BorderBrush"
  23. Value="#7DB1EC" />
  24. <Setter Property="CornerRadius"
  25. Value="5" />
  26. <Setter Property="Effect">
  27. <Setter.Value>
  28. <DropShadowEffect BlurRadius="10"
  29. Direction="0"
  30. ShadowDepth="0"
  31. Color="White" />
  32. </Setter.Value>
  33. </Setter>
  34. </Style>
  35. <Style x:Key="buttonborder"
  36. TargetType="Border">
  37. <Setter Property="BorderThickness"
  38. Value="2" />
  39. <Setter Property="Background"
  40. Value="Transparent" />
  41. <Setter Property="VerticalAlignment"
  42. Value="Center" />
  43. <Setter Property="BorderBrush"
  44. Value="White" />
  45. <Setter Property="CornerRadius"
  46. Value="5" />
  47. <Setter Property="Effect">
  48. <Setter.Value>
  49. <DropShadowEffect BlurRadius="10"
  50. Direction="0"
  51. ShadowDepth="0"
  52. Color="#D4D8DD" />
  53. </Setter.Value>
  54. </Setter>
  55. </Style>
  56. </UserControl.Resources>
  57. <Grid Margin="20">
  58. <Grid>
  59. <Grid.RowDefinitions>
  60. <RowDefinition Height="Auto" />
  61. <RowDefinition Height="Auto" />
  62. <RowDefinition Height="*" />
  63. </Grid.RowDefinitions>
  64. <Grid.ColumnDefinitions>
  65. <ColumnDefinition />
  66. <ColumnDefinition />
  67. </Grid.ColumnDefinitions>
  68. <StackPanel Grid.Row="0"
  69. Grid.Column="0">
  70. <Border Style="{StaticResource textborder}"
  71. Grid.Row="0">
  72. <TextBlock Text="通讯设置"
  73. Margin="15,5,5,5"
  74. FontSize="25" />
  75. </Border>
  76. <Grid>
  77. <Grid.RowDefinitions>
  78. <RowDefinition />
  79. <RowDefinition />
  80. <RowDefinition />
  81. </Grid.RowDefinitions>
  82. <StackPanel Margin="10"
  83. Grid.Row="0"
  84. Orientation="Horizontal"
  85. HorizontalAlignment="Left"
  86. VerticalAlignment="Center">
  87. <TextBlock Text="扫码枪:"
  88. Margin="5,5,5,5"
  89. FontSize="20"
  90. FontWeight="Bold"/>
  91. <TextBox Text="{Binding SettingModel.CodePortName}"
  92. Width="280"
  93. FontSize="20"
  94. HorizontalContentAlignment="Center"
  95. VerticalContentAlignment="Center" />
  96. <TextBox Text="{Binding SettingModel.BaudRateToCode}"
  97. Margin="10,0,0,0"
  98. Width="100"
  99. FontSize="20"
  100. HorizontalContentAlignment="Center"
  101. VerticalContentAlignment="Center" />
  102. </StackPanel>
  103. <StackPanel Grid.Row="1"
  104. Margin="10"
  105. Orientation="Horizontal"
  106. HorizontalAlignment="Left"
  107. VerticalAlignment="Center">
  108. <TextBlock Text="读卡器:"
  109. Margin="5,5,5,5"
  110. FontSize="20"
  111. FontWeight="Bold" />
  112. <TextBox Text="{Binding SettingModel.CardPortName}"
  113. FontSize="20"
  114. Width="280"
  115. HorizontalContentAlignment="Center"
  116. VerticalContentAlignment="Center" />
  117. <TextBox Text="{Binding SettingModel.BaudRateToCard}"
  118. Margin="10,0,0,0"
  119. Width="100"
  120. FontSize="20"
  121. HorizontalContentAlignment="Center"
  122. VerticalContentAlignment="Center" />
  123. </StackPanel>
  124. <StackPanel Grid.Row="2"
  125. Margin="10"
  126. Orientation="Horizontal"
  127. HorizontalAlignment="Left"
  128. VerticalAlignment="Center">
  129. <TextBlock Text="IO模块:"
  130. Margin="5,5,5,5"
  131. FontSize="20"
  132. FontWeight="Bold" />
  133. <TextBox Text="{Binding SettingModel.ModbusIp}"
  134. FontSize="20"
  135. Width="280"
  136. HorizontalContentAlignment="Center"
  137. VerticalContentAlignment="Center" />
  138. <TextBox Text="{Binding SettingModel.ModbuePost}"
  139. Margin="10,0,0,0"
  140. Width="100"
  141. FontSize="20"
  142. HorizontalContentAlignment="Center"
  143. VerticalContentAlignment="Center" />
  144. </StackPanel>
  145. </Grid>
  146. </StackPanel>
  147. <StackPanel Grid.Row="0"
  148. Margin="10,0,0,0"
  149. Grid.Column="1">
  150. <Border Style="{StaticResource textborder}"
  151. Grid.Row="0">
  152. <TextBlock Text="其它设置"
  153. Margin="15,5,5,5"
  154. FontSize="25" />
  155. </Border>
  156. <Grid>
  157. <Grid.RowDefinitions>
  158. <RowDefinition />
  159. <RowDefinition />
  160. <RowDefinition />
  161. <RowDefinition />
  162. </Grid.RowDefinitions>
  163. <StackPanel Margin="10"
  164. Grid.Row="0"
  165. Orientation="Horizontal"
  166. HorizontalAlignment="Left"
  167. VerticalAlignment="Center">
  168. <TextBlock Text="双色灯闪烁时长:"
  169. Margin="5,5,5,5"
  170. FontSize="20"
  171. FontWeight="Bold" />
  172. <TextBox Text="{Binding SettingModel.ArmLedTime}"
  173. Width="300"
  174. FontSize="20"
  175. ToolTip="s"
  176. HorizontalContentAlignment="Center"
  177. VerticalContentAlignment="Center" />
  178. </StackPanel>
  179. <StackPanel Grid.Row="1"
  180. Margin="10"
  181. Orientation="Horizontal"
  182. HorizontalAlignment="Left"
  183. VerticalAlignment="Center">
  184. <TextBlock Text="滚筒空转时间:"
  185. Margin="5,5,25,5"
  186. FontSize="20"
  187. FontWeight="Bold" />
  188. <TextBox Text="{Binding SettingModel.IdleTime}"
  189. FontSize="20"
  190. Width="300"
  191. HorizontalContentAlignment="Center"
  192. VerticalContentAlignment="Center" />
  193. </StackPanel>
  194. <StackPanel Grid.Row="2"
  195. Margin="10"
  196. Orientation="Horizontal"
  197. HorizontalAlignment="Left"
  198. VerticalAlignment="Center">
  199. <TextBlock Text="单次出料数量:"
  200. Margin="5,5,25,5"
  201. FontSize="20"
  202. FontWeight="Bold" />
  203. <TextBox Text="{Binding SettingModel.SingleOutPut}"
  204. FontSize="20"
  205. Width="300"
  206. HorizontalContentAlignment="Center"
  207. VerticalContentAlignment="Center" />
  208. </StackPanel>
  209. <StackPanel Grid.Row="3"
  210. Margin="10"
  211. Orientation="Horizontal"
  212. HorizontalAlignment="Left"
  213. VerticalAlignment="Center">
  214. <TextBlock Text="设备编号:"
  215. Margin="5,5,25,5"
  216. FontSize="20"
  217. FontWeight="Bold" />
  218. <TextBox Text="{Binding SettingModel.DeviceId}"
  219. FontSize="20"
  220. Width="300"
  221. HorizontalContentAlignment="Center"
  222. VerticalContentAlignment="Center" />
  223. </StackPanel>
  224. </Grid>
  225. </StackPanel>
  226. <StackPanel Grid.Row="1"
  227. Grid.Column="0">
  228. <Border Style="{StaticResource textborder}"
  229. Grid.Row="0">
  230. <TextBlock Text="MES通讯地址"
  231. Margin="15,5,5,5"
  232. FontSize="25" />
  233. </Border>
  234. <Grid>
  235. <Grid.RowDefinitions>
  236. <RowDefinition />
  237. <RowDefinition />
  238. <RowDefinition />
  239. <RowDefinition />
  240. </Grid.RowDefinitions>
  241. <StackPanel Grid.Row="0"
  242. Margin="10">
  243. <TextBlock Text="刷卡登录:"
  244. Margin="5,5,5,5"
  245. FontSize="20"
  246. FontWeight="Bold" />
  247. <TextBox Text="{Binding SettingModel.LoginIP}"
  248. FontSize="20" />
  249. </StackPanel>
  250. <StackPanel Grid.Row="1"
  251. Margin="10">
  252. <TextBlock Text="获取物料:"
  253. Margin="5,5,5,5"
  254. FontSize="20"
  255. FontWeight="Bold" />
  256. <TextBox Text="{Binding SettingModel.MaterialIP}"
  257. FontSize="20" />
  258. </StackPanel>
  259. <StackPanel Grid.Row="2"
  260. Margin="10">
  261. <TextBlock Text="扫码获取订单:"
  262. Margin="5,5,5,5"
  263. FontSize="20"
  264. FontWeight="Bold" />
  265. <TextBox Text="{Binding SettingModel.CaseIP}"
  266. FontSize="20" />
  267. </StackPanel>
  268. <StackPanel Grid.Row="3"
  269. Margin="10">
  270. <TextBlock Text="后台上传:"
  271. Margin="5,5,5,5"
  272. FontSize="20"
  273. FontWeight="Bold" />
  274. <TextBox Text="{Binding SettingModel.UpLoad}"
  275. FontSize="20" />
  276. </StackPanel>
  277. </Grid>
  278. </StackPanel>
  279. <StackPanel Grid.Row="2"
  280. Margin="30"
  281. VerticalAlignment="Bottom" HorizontalAlignment="Center"
  282. Grid.Column="0" Grid.ColumnSpan="2">
  283. <Border Style="{StaticResource buttonborder}">
  284. <Button Content="保存"
  285. VerticalAlignment="Top"
  286. Command="{Binding SaveSettingsCommand}"
  287. Padding="20,5,20,5"
  288. BorderBrush="Transparent"
  289. FontSize="15"
  290. WindowChrome.IsHitTestVisibleInChrome="True"
  291. Background="Transparent" />
  292. </Border>
  293. </StackPanel>
  294. </Grid>
  295. </Grid>
  296. </UserControl>