AddScrew.xaml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <UserControl x:Class="TeamAAS_VP.Views.Home.AddScrew"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:prism="http://prismlibrary.com/"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
  8. xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
  9. xmlns:sys="clr-namespace:System;assembly=mscorlib"
  10. xmlns:enums="clr-namespace:TeamAAS_VP.Enums"
  11. xmlns:valRules="clr-namespace:TeamAAS_VP.Identity"
  12. xmlns:ext="clr-namespace:TeamAAS_VP.Extension"
  13. xmlns:c="clr-namespace:TeamAAS_VP.ValueConverter"
  14. xmlns:lex="http://wpflocalizeextension.codeplex.com"
  15. xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels.Home"
  16. lex:LocalizeDictionary.DesignCulture="zh-CN"
  17. lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
  18. lex:ResxLocalizationProvider.DefaultDictionary="Lang"
  19. mc:Ignorable="d"
  20. d:Background="White"
  21. prism:ViewModelLocator.AutoWireViewModel="True"
  22. FontFamily="{DynamicResource DefaultFont}">
  23. <prism:Dialog.WindowStyle>
  24. <Style TargetType="Window">
  25. <Setter Property="prism:Dialog.WindowStartupLocation"
  26. Value="CenterScreen" />
  27. <!--<Setter Property="WindowChrome.WindowChrome">
  28. <Setter.Value>
  29. <WindowChrome CaptionHeight="0"
  30. ResizeBorderThickness="1" />
  31. </Setter.Value>
  32. </Setter>-->
  33. <Setter Property="WindowStyle"
  34. Value="None" />
  35. <Setter Property="AllowDrop"
  36. Value="True" />
  37. <Setter Property="BorderThickness"
  38. Value="0" />
  39. <Setter Property="ShowInTaskbar"
  40. Value="False" />
  41. <Setter Property="SizeToContent"
  42. Value="WidthAndHeight" />
  43. <Setter Property="WindowState"
  44. Value="Normal" />
  45. <Setter Property="Topmost"
  46. Value="True" />
  47. </Style>
  48. </prism:Dialog.WindowStyle>
  49. <Grid Margin="16">
  50. <Grid.RowDefinitions>
  51. <RowDefinition Height="Auto" />
  52. <RowDefinition Height="Auto" />
  53. <RowDefinition Height="Auto" />
  54. <RowDefinition Height="Auto" />
  55. <RowDefinition Height="Auto" />
  56. <RowDefinition Height="Auto" />
  57. </Grid.RowDefinitions>
  58. <Grid.ColumnDefinitions>
  59. <ColumnDefinition Width="Auto" />
  60. <ColumnDefinition Width="*" />
  61. </Grid.ColumnDefinitions>
  62. <TextBlock Grid.Row="0"
  63. Grid.Column="0"
  64. Text="选择供料器:"
  65. VerticalAlignment="Center"
  66. Margin="4" />
  67. <ComboBox Grid.Row="0"
  68. Grid.Column="1"
  69. ItemsSource="{Binding ScrewFeeders}"
  70. SelectedItem="{Binding SelectedFeeder}"
  71. DisplayMemberPath="Name"
  72. Margin="4">
  73. <b:Interaction.Triggers>
  74. <b:EventTrigger EventName="SelectionChanged">
  75. <b:InvokeCommandAction Command="{Binding FeederSelectedCommand}" />
  76. </b:EventTrigger>
  77. </b:Interaction.Triggers>
  78. </ComboBox>
  79. <TextBlock Grid.Row="1"
  80. Grid.Column="0"
  81. Text="当前批号:"
  82. VerticalAlignment="Center"
  83. Margin="4" />
  84. <TextBlock Grid.Row="1"
  85. Grid.Column="1"
  86. Text="{Binding CurrentBatchNumber}"
  87. VerticalAlignment="Center"
  88. Margin="4" />
  89. <TextBlock Grid.Row="2"
  90. Grid.Column="0"
  91. Text="剩余数量:"
  92. VerticalAlignment="Center"
  93. Margin="4" />
  94. <TextBlock Grid.Row="2"
  95. Grid.Column="1"
  96. Text="{Binding RemainingCount}"
  97. VerticalAlignment="Center"
  98. Margin="4" />
  99. <TextBlock Grid.Row="3"
  100. Grid.Column="0"
  101. Text="上次添加时间:"
  102. VerticalAlignment="Center"
  103. Margin="4" />
  104. <TextBlock Grid.Row="3"
  105. Grid.Column="1"
  106. Text="{Binding LastAddTime}"
  107. VerticalAlignment="Center"
  108. Margin="4" />
  109. <TextBlock Grid.Row="4"
  110. Grid.Column="0"
  111. Text="添加批号:"
  112. VerticalAlignment="Center"
  113. Margin="4" />
  114. <TextBox Grid.Row="4"
  115. Grid.Column="1"
  116. Text="{Binding NewBatchNumber,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
  117. Margin="4" />
  118. <StackPanel Grid.Row="5"
  119. Grid.ColumnSpan="2"
  120. Orientation="Horizontal"
  121. HorizontalAlignment="Right"
  122. Margin="4">
  123. <Button Style="{StaticResource MaterialDesignRaisedButton}"
  124. Content="清零"
  125. Command="{Binding ClearCommand}"
  126. Margin="4" />
  127. <Button Style="{StaticResource MaterialDesignRaisedButton}"
  128. Content="添加"
  129. Command="{Binding AddCommand}"
  130. Margin="4" />
  131. <Button Style="{StaticResource MaterialDesignRaisedButton}"
  132. Content="关闭"
  133. Command="{Binding CloseCommand}"
  134. Margin="4" />
  135. </StackPanel>
  136. </Grid>
  137. </UserControl>