FeederSystemParam.xaml 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <UserControl x:Class="TeamAAS_VP.Controls.FeederSystemParam"
  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:TeamAAS_VP.Controls"
  7. xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
  8. xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
  9. xmlns:behavior="http://schemas.microsoft.com/xaml/behaviors"
  10. xmlns:sys="clr-namespace:System;assembly=mscorlib"
  11. xmlns:lex="http://wpflocalizeextension.codeplex.com"
  12. lex:LocalizeDictionary.DesignCulture="zh-CN"
  13. lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
  14. lex:ResxLocalizationProvider.DefaultDictionary="Lang"
  15. mc:Ignorable="d"
  16. d:DesignHeight="250"
  17. d:DesignWidth="400"
  18. d:Background="White"
  19. FontFamily="{DynamicResource DefaultFont}">
  20. <Viewbox Stretch="None">
  21. <Grid Margin="10">
  22. <StackPanel Margin="0,20">
  23. <DockPanel Margin="0,5"
  24. HorizontalAlignment="Center"
  25. LastChildFill="False">
  26. <TextBlock Width="125"
  27. Margin="5,0"
  28. VerticalAlignment="Bottom"
  29. Text="{lex:Loc 背光超时时间,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
  30. <local:myNumericUpDowm x:Name="lighttimeout"
  31. MinWidth="100"
  32. Margin="5,0"
  33. Maximum="65535"
  34. Minimum="1"
  35. StringFormat="{}{0:N0} ms"
  36. Value="{Binding LightTimeOutValue,Mode=TwoWay}">
  37. <behavior:Interaction.Triggers>
  38. <behavior:EventTrigger EventName="ValueChanged">
  39. <behavior:InvokeCommandAction Command="{Binding LightTimeOutValueChangedCommand}"
  40. CommandParameter="{Binding ElementName=lighttimeout, Path=Value}" />
  41. </behavior:EventTrigger>
  42. </behavior:Interaction.Triggers>
  43. </local:myNumericUpDowm>
  44. </DockPanel>
  45. <DockPanel Margin="0,5"
  46. HorizontalAlignment="Center"
  47. LastChildFill="False">
  48. <TextBlock Width="125"
  49. Margin="5,0"
  50. VerticalAlignment="Bottom"
  51. Text="{lex:Loc 光源亮度设定,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
  52. <local:myNumericUpDowm x:Name="lightValue"
  53. MinWidth="100"
  54. Margin="5,0"
  55. Maximum="100"
  56. Minimum="1"
  57. Interval="1"
  58. StringFormat="{}{0:N0} %"
  59. Value="{Binding LightValue,Mode=TwoWay}">
  60. <behavior:Interaction.Triggers>
  61. <behavior:EventTrigger EventName="ValueChanged">
  62. <behavior:InvokeCommandAction Command="{Binding LightValueChangedCommand}"
  63. CommandParameter="{Binding ElementName=lightValue, Path=Value}" />
  64. </behavior:EventTrigger>
  65. </behavior:Interaction.Triggers>
  66. </local:myNumericUpDowm>
  67. </DockPanel>
  68. <DockPanel Margin="0,5"
  69. HorizontalAlignment="Center"
  70. LastChildFill="False">
  71. <TextBlock Width="125"
  72. Margin="5,0"
  73. VerticalAlignment="Bottom"
  74. Text="{lex:Loc 闪烁时间,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
  75. <local:myNumericUpDowm x:Name="LightFlashTime"
  76. MinWidth="100"
  77. Margin="5,0"
  78. Maximum="65535"
  79. Minimum="1"
  80. Interval="100"
  81. StringFormat="{}{0:N0} ms"
  82. Value="{Binding BackLightFlashTime,Mode=TwoWay}">
  83. <behavior:Interaction.Triggers>
  84. <behavior:EventTrigger EventName="ValueChanged">
  85. <behavior:InvokeCommandAction Command="{Binding LightFlashTimeChangedCommand}"
  86. CommandParameter="{Binding ElementName=LightFlashTime, Path=Value}" />
  87. </behavior:EventTrigger>
  88. </behavior:Interaction.Triggers>
  89. </local:myNumericUpDowm>
  90. </DockPanel>
  91. <DockPanel Margin="0,5"
  92. HorizontalAlignment="Center"
  93. LastChildFill="False">
  94. <TextBlock Width="125"
  95. Margin="5,0"
  96. VerticalAlignment="Bottom"
  97. Text="{lex:Loc 平台振动超时,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
  98. <local:myNumericUpDowm x:Name="platShakeTimeout"
  99. MinWidth="100"
  100. Margin="5,0"
  101. Maximum="65535"
  102. Minimum="1"
  103. Interval="100"
  104. StringFormat="{}{0:N0} ms"
  105. Value="{Binding PlatShakeTimeout ,Mode=TwoWay}">
  106. <behavior:Interaction.Triggers>
  107. <behavior:EventTrigger EventName="ValueChanged">
  108. <behavior:InvokeCommandAction Command="{Binding PlatShakeTimeoutChangedCommand}"
  109. CommandParameter="{Binding ElementName=platShakeTimeout, Path=Value}" />
  110. </behavior:EventTrigger>
  111. </behavior:Interaction.Triggers>
  112. </local:myNumericUpDowm>
  113. </DockPanel>
  114. <DockPanel Margin="0,5"
  115. HorizontalAlignment="Center"
  116. LastChildFill="False">
  117. <TextBlock Width="125"
  118. Margin="5,0"
  119. VerticalAlignment="Bottom"
  120. Text="{lex:Loc 料斗振动超时,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
  121. <local:myNumericUpDowm x:Name="UpperFeeder"
  122. MinWidth="100"
  123. Margin="5,0"
  124. Maximum="65535"
  125. Minimum="1"
  126. StringFormat="{}{0:N0} ms"
  127. Value="{Binding UpperFeederShakeTimeout,Mode=TwoWay}">
  128. <behavior:Interaction.Triggers>
  129. <behavior:EventTrigger EventName="ValueChanged">
  130. <behavior:InvokeCommandAction Command="{Binding UpperFeederShakeTimeoutChangedCommand}"
  131. CommandParameter="{Binding ElementName=UpperFeeder, Path=Value}" />
  132. </behavior:EventTrigger>
  133. </behavior:Interaction.Triggers>
  134. </local:myNumericUpDowm>
  135. </DockPanel>
  136. <Button Margin="10,10"
  137. MaxWidth="200"
  138. VerticalAlignment="Bottom"
  139. materialDesign:ButtonAssist.CornerRadius="10"
  140. Command="{Binding WriteCommand}"
  141. Content="{lex:Loc 保存}" />
  142. </StackPanel>
  143. </Grid>
  144. </Viewbox>
  145. </UserControl>