ModeSetting.xaml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. <Window
  2. x:Class="SHJX.Service.Library.Views.ModeSetting"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:My="clr-namespace:CustomUI"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:prism="http://prismlibrary.com/"
  10. xmlns:pu="clr-namespace:Panuon.UI.Silver;assembly=Panuon.UI.Silver"
  11. xmlns:vc="clr-namespace:SHJX.Service.Common.ElementHelper;assembly=SHJX.Service.Common"
  12. Title="ModeSetting"
  13. Width="200"
  14. Height="220"
  15. prism:ViewModelLocator.AutoWireViewModel="True"
  16. vc:DialogCloseHelper.DialogResult="{Binding DialogResult}"
  17. AllowsTransparency="True"
  18. Background="Transparent"
  19. ResizeMode="NoResize"
  20. TabIndex="120"
  21. WindowStyle="None"
  22. mc:Ignorable="d">
  23. <i:Interaction.Triggers>
  24. <i:EventTrigger EventName="Loaded">
  25. <i:InvokeCommandAction Command="{Binding LoadingCommand}" />
  26. </i:EventTrigger>
  27. </i:Interaction.Triggers>
  28. <Window.Resources>
  29. <ResourceDictionary>
  30. <ResourceDictionary.MergedDictionaries>
  31. <ResourceDictionary Source="pack://application:,,,/Panuon.UI.Silver;component/Control.xaml" />
  32. </ResourceDictionary.MergedDictionaries>
  33. </ResourceDictionary>
  34. </Window.Resources>
  35. <Border
  36. Background="#F6FBFF"
  37. BorderBrush="#6452A4"
  38. BorderThickness="1"
  39. CornerRadius="10">
  40. <Grid
  41. Name="DetailBody"
  42. Background="Transparent"
  43. Tag="{Binding DetailKey, Mode=TwoWay}">
  44. <Grid.RowDefinitions>
  45. <RowDefinition Height="1*" />
  46. <RowDefinition Height="1*" />
  47. <RowDefinition Height="1*" />
  48. <RowDefinition Height="1*" />
  49. <RowDefinition Height="1*" />
  50. <RowDefinition Height="1*" />
  51. <RowDefinition Height="1*" />
  52. </Grid.RowDefinitions>
  53. <Grid Grid.Row="0">
  54. <StackPanel
  55. HorizontalAlignment="Center"
  56. VerticalAlignment="Center"
  57. Orientation="Horizontal">
  58. <TextBox
  59. x:Name="txt_ModeDetail"
  60. Width="180"
  61. Height="25"
  62. pu:TextBoxHelper.CornerRadius="10"
  63. pu:TextBoxHelper.FocusedBorderBrush="#6452A4"
  64. pu:TextBoxHelper.FocusedShadowColor="#6452A4"
  65. pu:TextBoxHelper.IsClearButtonVisible="True"
  66. Cursor="IBeam"
  67. Text="{Binding SampleDetail, Mode=TwoWay}" />
  68. </StackPanel>
  69. </Grid>
  70. <Grid Grid.Row="1">
  71. <Grid.ColumnDefinitions>
  72. <ColumnDefinition Width="2*" />
  73. <ColumnDefinition Width="3*" />
  74. </Grid.ColumnDefinitions>
  75. <Grid
  76. Grid.Row="0"
  77. Grid.Column="0"
  78. HorizontalAlignment="Center">
  79. <TextBlock
  80. HorizontalAlignment="Center"
  81. VerticalAlignment="Center"
  82. Text="取样体积:" />
  83. </Grid>
  84. <Grid Grid.Row="0" Grid.Column="1">
  85. <TextBox
  86. x:Name="txt_Volume"
  87. Width="110"
  88. Height="25"
  89. HorizontalAlignment="Left"
  90. VerticalAlignment="Center"
  91. pu:TextBoxHelper.CornerRadius="10"
  92. pu:TextBoxHelper.FocusedBorderBrush="#6452A4"
  93. pu:TextBoxHelper.FocusedShadowColor="#6452A4"
  94. Cursor="IBeam"
  95. Text="{Binding SampleVolume, Mode=TwoWay}">
  96. <i:Interaction.Triggers>
  97. <i:EventTrigger EventName="TextChanged">
  98. <i:InvokeCommandAction Command="{Binding SampleVolumeTextChangedCommand}" CommandParameter="{Binding ElementName=txt_Volume, Path=Text}" />
  99. </i:EventTrigger>
  100. </i:Interaction.Triggers>
  101. </TextBox>
  102. </Grid>
  103. </Grid>
  104. <Grid Grid.Row="2">
  105. <Grid.ColumnDefinitions>
  106. <ColumnDefinition Width="2*" />
  107. <ColumnDefinition Width="3*" />
  108. </Grid.ColumnDefinitions>
  109. <Grid
  110. Grid.Row="0"
  111. Grid.Column="0"
  112. HorizontalAlignment="Center">
  113. <TextBlock
  114. HorizontalAlignment="Center"
  115. VerticalAlignment="Center"
  116. Text="取样倍数:" />
  117. </Grid>
  118. <Grid Grid.Row="0" Grid.Column="1">
  119. <TextBox
  120. Width="110"
  121. Height="25"
  122. HorizontalAlignment="Left"
  123. VerticalAlignment="Center"
  124. pu:TextBoxHelper.CornerRadius="10"
  125. pu:TextBoxHelper.FocusedBorderBrush="#6452A4"
  126. pu:TextBoxHelper.FocusedShadowColor="#6452A4"
  127. Cursor="IBeam"
  128. IsEnabled="False"
  129. IsReadOnly="True"
  130. Text="{Binding SampleMultiple, Mode=TwoWay}" />
  131. </Grid>
  132. </Grid>
  133. <Grid Grid.Row="3">
  134. <Grid.ColumnDefinitions>
  135. <ColumnDefinition Width="1*" />
  136. <ColumnDefinition Width="2*" />
  137. </Grid.ColumnDefinitions>
  138. <Grid Grid.Column="0" Grid.ColumnSpan="2">
  139. <Grid>
  140. <Grid.ColumnDefinitions>
  141. <ColumnDefinition Width="2*" />
  142. <ColumnDefinition Width="1*" />
  143. </Grid.ColumnDefinitions>
  144. <My:SegmentControl
  145. x:Name="cb_Mode"
  146. Grid.Column="0"
  147. Width="95"
  148. Height="25"
  149. Margin="0,0,5,0"
  150. HorizontalAlignment="Right"
  151. BorderBrush="#6452A4"
  152. Cursor="Hand"
  153. SelectedIndex="{Binding SegmentIndex}"
  154. SelectedItem="{Binding SampleType}">
  155. <My:SegmentItem Content="样品" FontSize="8" />
  156. <My:SegmentItem Content="空白" FontSize="8" />
  157. <i:Interaction.Triggers>
  158. <i:EventTrigger EventName="SelectionChanged">
  159. <i:InvokeCommandAction Command="{Binding ModeSelectionChangedCommand}" />
  160. </i:EventTrigger>
  161. </i:Interaction.Triggers>
  162. </My:SegmentControl>
  163. <CheckBox
  164. Grid.Column="1"
  165. Width="45"
  166. Height="25"
  167. HorizontalAlignment="Left"
  168. pu:CheckBoxHelper.CheckBoxStyle="Button"
  169. pu:CheckBoxHelper.CheckedBackground="#6452A4"
  170. pu:CheckBoxHelper.CornerRadius="7"
  171. BorderBrush="#6452A4"
  172. BorderThickness="1"
  173. Content="标定"
  174. Cursor="Hand"
  175. FontSize="8"
  176. IsChecked="{Binding CalibrationChecked}"
  177. IsEnabled="{Binding CalibrationEnable}" />
  178. </Grid>
  179. </Grid>
  180. </Grid>
  181. <Grid Grid.Row="4">
  182. <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
  183. <RadioButton
  184. Height="30"
  185. Margin="0,0,5,0"
  186. pu:RadioButtonHelper.BoxHeight="16"
  187. pu:RadioButtonHelper.BoxWidth="16"
  188. pu:RadioButtonHelper.CheckedBackground="#6452A4"
  189. Background="#326452A4"
  190. Content="酸性"
  191. Cursor="Hand"
  192. IsChecked="{Binding AcidChecked}" />
  193. <RadioButton
  194. Height="30"
  195. Margin="5,0,0,0"
  196. pu:RadioButtonHelper.BoxHeight="16"
  197. pu:RadioButtonHelper.BoxWidth="16"
  198. pu:RadioButtonHelper.CheckedBackground="#6452A4"
  199. Background="#326452A4"
  200. Content="碱性"
  201. Cursor="Hand"
  202. IsChecked="{Binding AlkaliChecked}" />
  203. </StackPanel>
  204. </Grid>
  205. <Grid Grid.Row="5">
  206. <CheckBox
  207. x:Name="cb_send"
  208. Height="25"
  209. HorizontalAlignment="Center"
  210. pu:CheckBoxHelper.BoxHeight="16"
  211. pu:CheckBoxHelper.BoxWidth="24"
  212. pu:CheckBoxHelper.CheckBoxStyle="Switch"
  213. pu:CheckBoxHelper.CheckedBackground="#6452A4"
  214. Content="任务是否下发"
  215. Cursor="Hand"
  216. FontSize="12"
  217. IsChecked="{Binding IsSend}" />
  218. </Grid>
  219. <Grid Grid.Row="6">
  220. <UniformGrid Columns="2" Rows="1">
  221. <Button
  222. Width="60"
  223. Height="25"
  224. pu:ButtonHelper.ButtonStyle="Hollow"
  225. pu:ButtonHelper.ClickStyle="Sink"
  226. pu:ButtonHelper.CornerRadius="10"
  227. pu:ButtonHelper.HoverBrush="#556452A4"
  228. Background="#6452A4"
  229. BorderBrush="#6452A4"
  230. Command="{Binding ClickSureCommand}"
  231. Content="确定"
  232. Cursor="Hand"
  233. FontFamily="{StaticResource FontAwesome}"
  234. Foreground="#FFF" />
  235. <Button
  236. Width="60"
  237. Height="25"
  238. pu:ButtonHelper.ButtonStyle="Hollow"
  239. pu:ButtonHelper.ClickStyle="Sink"
  240. pu:ButtonHelper.CornerRadius="10"
  241. pu:ButtonHelper.HoverBrush="#556452A4"
  242. Background="#6452A4"
  243. BorderBrush="#6452A4"
  244. Command="{Binding CancelCommand}"
  245. Content="取消"
  246. Cursor="Hand"
  247. FontFamily="{StaticResource FontAwesome}"
  248. Foreground="#FFF" />
  249. </UniformGrid>
  250. </Grid>
  251. </Grid>
  252. </Border>
  253. </Window>