MainPage.xaml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. <UserControl x:Class="LogoForceTestApp.Modules.MainModule.Views.MainPage"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:converter="clr-namespace:LogoForceTestApp.Modules.MainModule.Converters"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:hc="https://handyorg.github.io/handycontrol"
  7. xmlns:local="clr-namespace:LogoForceTestApp.Modules.MainModule.Views"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:oxyplot="http://oxyplot.org/wpf"
  10. xmlns:viewmodels="clr-namespace:LogoForceTestApp.Modules.MainModule.ViewModels"
  11. d:DataContext="{d:DesignInstance Type=viewmodels:MainPageViewModel}"
  12. d:DesignHeight="450"
  13. d:DesignWidth="800"
  14. mc:Ignorable="d">
  15. <UserControl.Resources>
  16. <ResourceDictionary>
  17. <ResourceDictionary.MergedDictionaries>
  18. <ResourceDictionary Source="/LogoForceTestApp.Modules.MainModule;component/Dictionary.xaml" />
  19. <ResourceDictionary>
  20. <converter:BooleanToBrush x:Key="BoolBrush" />
  21. </ResourceDictionary>
  22. </ResourceDictionary.MergedDictionaries>
  23. <Style TargetType="DataGrid">
  24. <Setter Property="Height"
  25. Value="auto" />
  26. <Setter Property="Width"
  27. Value="auto" />
  28. <Setter Property="CanUserAddRows"
  29. Value="False" />
  30. <Setter Property="FontSize"
  31. Value="16" />
  32. </Style>
  33. </ResourceDictionary>
  34. </UserControl.Resources>
  35. <Grid>
  36. <Grid.ColumnDefinitions>
  37. <ColumnDefinition />
  38. <ColumnDefinition Width="300" />
  39. </Grid.ColumnDefinitions>
  40. <Grid Grid.Column="0">
  41. <Grid.RowDefinitions>
  42. <RowDefinition Height="auto" />
  43. <RowDefinition Height="1*" />
  44. <RowDefinition Height="auto" />
  45. <RowDefinition Height="1*" />
  46. </Grid.RowDefinitions>
  47. <Border BorderBrush="#6A5ACD"
  48. BorderThickness="4">
  49. <StackPanel Orientation="Horizontal">
  50. <TextBlock Text="当前账号:"
  51. VerticalAlignment="Center"
  52. HorizontalAlignment="Center"
  53. Foreground="Black"
  54. FontSize="22"
  55. Margin="5" />
  56. <TextBlock Text="{Binding NowID}"
  57. VerticalAlignment="Center"
  58. HorizontalAlignment="Center"
  59. Foreground="Blue"
  60. FontSize="22"
  61. Margin="5" />
  62. </StackPanel>
  63. </Border>
  64. <GroupBox Grid.Row="1"
  65. Header="产品信息"
  66. FontSize="20">
  67. <StackPanel Orientation="Horizontal"
  68. VerticalAlignment="Center"
  69. HorizontalAlignment="Center">
  70. <TextBlock VerticalAlignment="Center"
  71. HorizontalAlignment="Center"
  72. Text="产品码:" />
  73. <TextBox VerticalAlignment="Center"
  74. HorizontalAlignment="Center"
  75. Height="50"
  76. Width="600"
  77. Text="{Binding ProCode,UpdateSourceTrigger=PropertyChanged}"
  78. Name="TextBoxProCode"
  79. KeyDown="TextBoxProCode_KeyDown" />
  80. </StackPanel>
  81. <!--<Grid>
  82. <Grid.ColumnDefinitions>
  83. <ColumnDefinition Width="1*" />
  84. <ColumnDefinition Width="2*" />
  85. </Grid.ColumnDefinitions>
  86. <Border BorderThickness="0,0,3,0"
  87. BorderBrush="#6A5ACD">
  88. <Grid>
  89. <Grid.RowDefinitions>
  90. <RowDefinition Height="1*" />
  91. <RowDefinition Height="3*" />
  92. </Grid.RowDefinitions>
  93. <TextBlock VerticalAlignment="Center"
  94. HorizontalAlignment="Left"
  95. Text="当前生产订单"
  96. Foreground="#762DA6" />
  97. <TextBlock Grid.Row="1"
  98. VerticalAlignment="Center"
  99. HorizontalAlignment="Center"
  100. FontSize="30"
  101. Foreground="#762DA6"
  102. Text="{Binding OrderForGoods}" />
  103. </Grid>
  104. </Border>
  105. <StackPanel Orientation="Horizontal"
  106. Grid.Column="1"
  107. VerticalAlignment="Center"
  108. HorizontalAlignment="Center">
  109. <TextBlock VerticalAlignment="Center"
  110. HorizontalAlignment="Center"
  111. Text="产品码:" />
  112. <TextBox VerticalAlignment="Center"
  113. HorizontalAlignment="Center"
  114. Height="50"
  115. Width="600"
  116. Text="{Binding ProCode,UpdateSourceTrigger=PropertyChanged}"/>
  117. </StackPanel>
  118. </Grid>-->
  119. </GroupBox>
  120. <GroupBox Grid.Row="2"
  121. Header="维修用料"
  122. FontSize="20">
  123. <Grid>
  124. <Grid.ColumnDefinitions>
  125. <ColumnDefinition />
  126. <ColumnDefinition />
  127. </Grid.ColumnDefinitions>
  128. <StackPanel Orientation="Vertical"
  129. VerticalAlignment="Center"
  130. HorizontalAlignment="Center">
  131. <StackPanel Orientation="Horizontal">
  132. <TextBlock Text="01"
  133. VerticalAlignment="Center"
  134. HorizontalAlignment="Center" />
  135. <hc:TextBox Width="400"
  136. Height="40"
  137. Margin="5"
  138. Text="{Binding Wu1,UpdateSourceTrigger=PropertyChanged}"
  139. Name="TextBox1"
  140. KeyDown="TextBox1_KeyDown" />
  141. </StackPanel>
  142. <StackPanel Orientation="Horizontal">
  143. <TextBlock Text="02"
  144. VerticalAlignment="Center"
  145. HorizontalAlignment="Center" />
  146. <hc:TextBox Width="400"
  147. Height="40"
  148. Margin="5"
  149. Text="{Binding Wu2,UpdateSourceTrigger=PropertyChanged}"
  150. Name="TextBox2"
  151. KeyDown="TextBox2_KeyDown" />
  152. </StackPanel>
  153. <StackPanel Orientation="Horizontal">
  154. <TextBlock Text="03"
  155. VerticalAlignment="Center"
  156. HorizontalAlignment="Center" />
  157. <hc:TextBox Width="400"
  158. Height="40"
  159. Margin="5"
  160. Text="{Binding Wu3,UpdateSourceTrigger=PropertyChanged}"
  161. Name="TextBox3"
  162. KeyDown="TextBox3_KeyDown" />
  163. </StackPanel>
  164. <StackPanel Orientation="Horizontal">
  165. <TextBlock Text="04"
  166. VerticalAlignment="Center"
  167. HorizontalAlignment="Center" />
  168. <hc:TextBox Width="400"
  169. Height="40"
  170. Margin="5"
  171. Text="{Binding Wu4,UpdateSourceTrigger=PropertyChanged}"
  172. Name="TextBox4"
  173. KeyDown="TextBox4_KeyDown" />
  174. </StackPanel>
  175. <StackPanel Orientation="Horizontal">
  176. <TextBlock Text="05"
  177. VerticalAlignment="Center"
  178. HorizontalAlignment="Center" />
  179. <hc:TextBox Width="400"
  180. Height="40"
  181. Margin="5"
  182. Text="{Binding Wu5,UpdateSourceTrigger=PropertyChanged}"
  183. Name="TextBox5"
  184. KeyDown="TextBox5_KeyDown" />
  185. </StackPanel>
  186. <StackPanel Orientation="Horizontal">
  187. <TextBlock Text="06"
  188. VerticalAlignment="Center"
  189. HorizontalAlignment="Center" />
  190. <hc:TextBox Width="400"
  191. Height="40"
  192. Margin="5"
  193. Text="{Binding Wu6,UpdateSourceTrigger=PropertyChanged}"
  194. Name="TextBox6"
  195. KeyDown="TextBox6_KeyDown" />
  196. </StackPanel>
  197. <StackPanel Orientation="Horizontal">
  198. <TextBlock Text="07"
  199. VerticalAlignment="Center"
  200. HorizontalAlignment="Center" />
  201. <hc:TextBox Width="400"
  202. Height="40"
  203. Margin="5"
  204. Text="{Binding Wu7,UpdateSourceTrigger=PropertyChanged}"
  205. Name="TextBox7"
  206. KeyDown="TextBox7_KeyDown" />
  207. </StackPanel>
  208. <StackPanel Orientation="Horizontal">
  209. <TextBlock Text="08"
  210. VerticalAlignment="Center"
  211. HorizontalAlignment="Center" />
  212. <hc:TextBox Width="400"
  213. Height="40"
  214. Margin="5"
  215. Text="{Binding Wu8,UpdateSourceTrigger=PropertyChanged}"
  216. Name="TextBox8"
  217. KeyDown="TextBox8_KeyDown" />
  218. </StackPanel>
  219. <StackPanel Orientation="Horizontal">
  220. <TextBlock Text="09"
  221. VerticalAlignment="Center"
  222. HorizontalAlignment="Center" />
  223. <hc:TextBox Width="400"
  224. Height="40"
  225. Margin="5"
  226. Text="{Binding Wu9,UpdateSourceTrigger=PropertyChanged}"
  227. Name="TextBox9"
  228. KeyDown="TextBox9_KeyDown" />
  229. </StackPanel>
  230. <StackPanel Orientation="Horizontal">
  231. <TextBlock Text="10"
  232. VerticalAlignment="Center"
  233. HorizontalAlignment="Center" />
  234. <hc:TextBox Width="400"
  235. Height="40"
  236. Margin="5"
  237. Text="{Binding Wu10,UpdateSourceTrigger=PropertyChanged}"
  238. Name="TextBox10"
  239. KeyDown="TextBox10_KeyDown" />
  240. </StackPanel>
  241. </StackPanel>
  242. <StackPanel Orientation="Vertical"
  243. VerticalAlignment="Center"
  244. HorizontalAlignment="Center"
  245. Grid.Column="1">
  246. <StackPanel Orientation="Horizontal">
  247. <TextBlock Text="11"
  248. VerticalAlignment="Center"
  249. HorizontalAlignment="Center" />
  250. <hc:TextBox Width="400"
  251. Height="40"
  252. Margin="5"
  253. Text="{Binding Wu11,UpdateSourceTrigger=PropertyChanged}"
  254. Name="TextBox11"
  255. KeyDown="TextBox11_KeyDown" />
  256. </StackPanel>
  257. <StackPanel Orientation="Horizontal">
  258. <TextBlock Text="12"
  259. VerticalAlignment="Center"
  260. HorizontalAlignment="Center" />
  261. <hc:TextBox Width="400"
  262. Height="40"
  263. Margin="5"
  264. Text="{Binding Wu12,UpdateSourceTrigger=PropertyChanged}"
  265. Name="TextBox12"
  266. KeyDown="TextBox12_KeyDown" />
  267. </StackPanel>
  268. <StackPanel Orientation="Horizontal">
  269. <TextBlock Text="13"
  270. VerticalAlignment="Center"
  271. HorizontalAlignment="Center" />
  272. <hc:TextBox Width="400"
  273. Height="40"
  274. Margin="5"
  275. Text="{Binding Wu13,UpdateSourceTrigger=PropertyChanged}"
  276. Name="TextBox13"
  277. KeyDown="TextBox13_KeyDown" />
  278. </StackPanel>
  279. <StackPanel Orientation="Horizontal">
  280. <TextBlock Text="14"
  281. VerticalAlignment="Center"
  282. HorizontalAlignment="Center" />
  283. <hc:TextBox Width="400"
  284. Height="40"
  285. Margin="5"
  286. Text="{Binding Wu14,UpdateSourceTrigger=PropertyChanged}"
  287. Name="TextBox14"
  288. KeyDown="TextBox14_KeyDown" />
  289. </StackPanel>
  290. <StackPanel Orientation="Horizontal">
  291. <TextBlock Text="15"
  292. VerticalAlignment="Center"
  293. HorizontalAlignment="Center" />
  294. <hc:TextBox Width="400"
  295. Height="40"
  296. Margin="5"
  297. Text="{Binding Wu15,UpdateSourceTrigger=PropertyChanged}"
  298. Name="TextBox15"
  299. KeyDown="TextBox15_KeyDown" />
  300. </StackPanel>
  301. <StackPanel Orientation="Horizontal">
  302. <TextBlock Text="16"
  303. VerticalAlignment="Center"
  304. HorizontalAlignment="Center" />
  305. <hc:TextBox Width="400"
  306. Height="40"
  307. Margin="5"
  308. Text="{Binding Wu16,UpdateSourceTrigger=PropertyChanged}"
  309. Name="TextBox16"
  310. KeyDown="TextBox16_KeyDown" />
  311. </StackPanel>
  312. <StackPanel Orientation="Horizontal">
  313. <TextBlock Text="17"
  314. VerticalAlignment="Center"
  315. HorizontalAlignment="Center" />
  316. <hc:TextBox Width="400"
  317. Height="40"
  318. Margin="5"
  319. Text="{Binding Wu17,UpdateSourceTrigger=PropertyChanged}"
  320. Name="TextBox17"
  321. KeyDown="TextBox17_KeyDown" />
  322. </StackPanel>
  323. <StackPanel Orientation="Horizontal">
  324. <TextBlock Text="18"
  325. VerticalAlignment="Center"
  326. HorizontalAlignment="Center" />
  327. <hc:TextBox Width="400"
  328. Height="40"
  329. Margin="5"
  330. Text="{Binding Wu18,UpdateSourceTrigger=PropertyChanged}"
  331. Name="TextBox18"
  332. KeyDown="TextBox18_KeyDown" />
  333. </StackPanel>
  334. <StackPanel Orientation="Horizontal">
  335. <TextBlock Text="19"
  336. VerticalAlignment="Center"
  337. HorizontalAlignment="Center" />
  338. <hc:TextBox Width="400"
  339. Height="40"
  340. Margin="5"
  341. Text="{Binding Wu19,UpdateSourceTrigger=PropertyChanged}"
  342. Name="TextBox19"
  343. KeyDown="TextBox19_KeyDown" />
  344. </StackPanel>
  345. <StackPanel Orientation="Horizontal">
  346. <TextBlock Text="20"
  347. VerticalAlignment="Center"
  348. HorizontalAlignment="Center" />
  349. <hc:TextBox Width="400"
  350. Height="40"
  351. Margin="5"
  352. Text="{Binding Wu20,UpdateSourceTrigger=PropertyChanged}"
  353. Name="TextBox20" />
  354. </StackPanel>
  355. </StackPanel>
  356. </Grid>
  357. </GroupBox>
  358. <Button Content="确 认"
  359. VerticalAlignment="Center"
  360. Margin="15"
  361. Width="100"
  362. Height="40"
  363. FontSize="20"
  364. Grid.Row="3"
  365. Style="{StaticResource BtnStyle}"
  366. Command="{Binding NotarizeCommand}" />
  367. </Grid>
  368. <Grid Grid.Column="1">
  369. <Grid.RowDefinitions>
  370. <RowDefinition Height="auto"/>
  371. <RowDefinition />
  372. </Grid.RowDefinitions>
  373. <GroupBox Grid.Column="1"
  374. Grid.Row="0"
  375. Header="员工信息">
  376. <StackPanel Orientation="Vertical"
  377. VerticalAlignment="Center"
  378. HorizontalAlignment="Center">
  379. <TextBox Text="{Binding Person,UpdateSourceTrigger=PropertyChanged}"
  380. Height="30"
  381. Width="280" />
  382. <Button Content="上传"
  383. VerticalAlignment="Center"
  384. Margin="10"
  385. Width="80"
  386. Height="30"
  387. FontSize="18"
  388. Style="{StaticResource BtnStyle}"
  389. Command="{Binding UpCommand}" />
  390. </StackPanel>
  391. </GroupBox>
  392. <GroupBox Grid.Row="1"
  393. Header="日志">
  394. <ListBox x:Name="ListBoxMessage" />
  395. </GroupBox>
  396. </Grid>
  397. </Grid>
  398. </UserControl>