终端一体化运控平台
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

231 righe
11 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.CustomResource.UserControls.NumberTextBox"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:BPASmartClient.CustomResource.UserControls"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. d:DesignHeight="35"
  9. d:DesignWidth="150"
  10. mc:Ignorable="d">
  11. <UserControl.Resources>
  12. <ResourceDictionary>
  13. <ResourceDictionary.MergedDictionaries>
  14. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecButtonStyle.xaml" />
  15. <ResourceDictionary>
  16. <Style x:Key="TextBoxStyle" TargetType="TextBox">
  17. <Setter Property="FontFamily" Value="楷体" />
  18. <Setter Property="FontSize" Value="22" />
  19. <Setter Property="VerticalContentAlignment" Value="Center" />
  20. <Setter Property="Width" Value="188" />
  21. <Setter Property="Padding" Value="6,0,0,0" />
  22. <Setter Property="Height" Value="37" />
  23. <Setter Property="BorderThickness" Value="0" />
  24. <Setter Property="Foreground" Value="#009dff" />
  25. <Setter Property="BorderBrush" Value="#009dff" />
  26. <Setter Property="CaretBrush" Value="#009dff" />
  27. <Setter Property="VerticalAlignment" Value="Center" />
  28. <Setter Property="Background">
  29. <Setter.Value>
  30. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/textBox.png" Stretch="Fill" />
  31. </Setter.Value>
  32. </Setter>
  33. </Style>
  34. </ResourceDictionary>
  35. </ResourceDictionary.MergedDictionaries>
  36. </ResourceDictionary>
  37. </UserControl.Resources>
  38. <Grid>
  39. <Viewbox>
  40. <Grid>
  41. <TextBox
  42. Name="outLoc"
  43. Width="180"
  44. Height="35"
  45. FontSize="20"
  46. GotFocus="outLoc_GotFocus"
  47. Style="{StaticResource TextBoxStyle}" />
  48. <Popup
  49. Name="pp"
  50. AllowsTransparency="True"
  51. Focusable="False"
  52. Placement="Bottom"
  53. PlacementTarget="{Binding ElementName=outLoc}"
  54. StaysOpen="True">
  55. <Border
  56. Width="260"
  57. Height="300"
  58. Background="#081424"
  59. ClipToBounds="True">
  60. <Grid Margin="0">
  61. <Grid.RowDefinitions>
  62. <RowDefinition Height="35" />
  63. <RowDefinition />
  64. </Grid.RowDefinitions>
  65. <TextBox
  66. Name="input"
  67. Width="267"
  68. Height="36"
  69. Margin="-4,0,0,0"
  70. VerticalContentAlignment="Center"
  71. FontSize="18"
  72. GotFocus="input_GotFocus"
  73. Style="{StaticResource TextBoxStyle}" />
  74. <Grid Grid.Row="1">
  75. <Grid.RowDefinitions>
  76. <RowDefinition />
  77. <RowDefinition />
  78. <RowDefinition />
  79. <RowDefinition />
  80. </Grid.RowDefinitions>
  81. <Grid.ColumnDefinitions>
  82. <ColumnDefinition />
  83. <ColumnDefinition />
  84. <ColumnDefinition />
  85. <ColumnDefinition />
  86. </Grid.ColumnDefinitions>
  87. <Button
  88. Grid.Row="0"
  89. Grid.Column="0"
  90. Margin="2"
  91. Click="Button_Click"
  92. Content="1"
  93. FontSize="20"
  94. Style="{StaticResource ImageButtonStyle}" />
  95. <Button
  96. Grid.Row="0"
  97. Grid.Column="1"
  98. Margin="2"
  99. Click="Button_Click"
  100. Content="2"
  101. FontSize="20"
  102. Style="{StaticResource ImageButtonStyle}" />
  103. <Button
  104. Grid.Row="0"
  105. Grid.Column="2"
  106. Margin="2"
  107. Click="Button_Click"
  108. Content="3"
  109. FontSize="20"
  110. Style="{StaticResource ImageButtonStyle}" />
  111. <Button
  112. Grid.Row="0"
  113. Grid.Column="3"
  114. Margin="2"
  115. Click="Button_Click"
  116. Content="ESC"
  117. FontSize="20"
  118. Style="{StaticResource ImageButtonStyle}" />
  119. <Button
  120. Grid.Row="1"
  121. Grid.Column="0"
  122. Margin="2"
  123. Click="Button_Click"
  124. Content="4"
  125. FontSize="20"
  126. Style="{StaticResource ImageButtonStyle}" />
  127. <Button
  128. Grid.Row="1"
  129. Grid.Column="1"
  130. Margin="2"
  131. Click="Button_Click"
  132. Content="5"
  133. FontSize="20"
  134. Style="{StaticResource ImageButtonStyle}" />
  135. <Button
  136. Grid.Row="1"
  137. Grid.Column="2"
  138. Margin="2"
  139. Click="Button_Click"
  140. Content="6"
  141. FontSize="20"
  142. Style="{StaticResource ImageButtonStyle}" />
  143. <Button
  144. Grid.Row="1"
  145. Grid.Column="3"
  146. Margin="2"
  147. Click="Button_Click"
  148. Content="BR"
  149. FontSize="20"
  150. Style="{StaticResource ImageButtonStyle}" />
  151. <Button
  152. Grid.Row="2"
  153. Grid.Column="0"
  154. Margin="2"
  155. Click="Button_Click"
  156. Content="7"
  157. FontSize="20"
  158. Style="{StaticResource ImageButtonStyle}" />
  159. <Button
  160. Grid.Row="2"
  161. Grid.Column="1"
  162. Margin="2"
  163. Click="Button_Click"
  164. Content="8"
  165. FontSize="20"
  166. Style="{StaticResource ImageButtonStyle}" />
  167. <Button
  168. Grid.Row="2"
  169. Grid.Column="2"
  170. Margin="2"
  171. Click="Button_Click"
  172. Content="9"
  173. FontSize="20"
  174. Style="{StaticResource ImageButtonStyle}" />
  175. <Button
  176. Grid.Row="2"
  177. Grid.Column="3"
  178. Margin="2"
  179. Click="Button_Click"
  180. Content="Clear"
  181. FontSize="20"
  182. Style="{StaticResource ImageButtonStyle}" />
  183. <Button
  184. Grid.Row="3"
  185. Grid.Column="0"
  186. Margin="2"
  187. Click="Button_Click"
  188. Content="0"
  189. FontSize="20"
  190. Style="{StaticResource ImageButtonStyle}" />
  191. <Button
  192. Grid.Row="3"
  193. Grid.Column="1"
  194. Margin="2"
  195. Click="Button_Click"
  196. Content="."
  197. FontSize="20"
  198. Style="{StaticResource ImageButtonStyle}" />
  199. <Button
  200. Grid.Row="3"
  201. Grid.Column="2"
  202. Grid.ColumnSpan="2"
  203. Margin="2"
  204. Click="Button_Click"
  205. Content="Deter"
  206. FontSize="20"
  207. Style="{StaticResource ImageButtonStyle}" />
  208. </Grid>
  209. </Grid>
  210. </Border>
  211. </Popup>
  212. </Grid>
  213. </Viewbox>
  214. </Grid>
  215. </UserControl>