SettingView.xaml 14 KB

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