星火微课系统客户端
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
3 лет назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726
  1. <Window
  2. x:Class="XHWK.WKTool.DeviceWindow"
  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:gif="http://wpfanimatedgif.codeplex.com"
  7. xmlns:local="clr-namespace:XHWK.WKTool"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. Title="设备检测"
  10. Width="569"
  11. Height="367"
  12. AllowsTransparency="True"
  13. BorderBrush="#FFE9E9E9"
  14. BorderThickness="1"
  15. ShowInTaskbar="True"
  16. WindowStartupLocation="CenterScreen"
  17. WindowStyle="None"
  18. mc:Ignorable="d">
  19. <Window.Resources>
  20. <!-- 摄像头样式 -->
  21. <Style x:Key="stlToggleButton" TargetType="ToggleButton">
  22. <Setter Property="Foreground" Value="White" />
  23. <Setter Property="Template">
  24. <Setter.Value>
  25. <ControlTemplate>
  26. <Border
  27. x:Name="Back"
  28. Background="#FFFFFFFF"
  29. BorderBrush="Transparent"
  30. BorderThickness="0">
  31. <Path
  32. Name="PathFill"
  33. Width="8"
  34. Height="6"
  35. Data="M5,0 L10,10 L0,10 z"
  36. Fill="Black"
  37. RenderTransformOrigin="0.5,0.5"
  38. Stretch="Fill"
  39. StrokeThickness="0">
  40. <Path.RenderTransform>
  41. <TransformGroup>
  42. <ScaleTransform />
  43. <SkewTransform />
  44. <RotateTransform Angle="180" />
  45. <TranslateTransform />
  46. </TransformGroup>
  47. </Path.RenderTransform>
  48. </Path>
  49. </Border>
  50. <ControlTemplate.Triggers>
  51. <Trigger Property="IsMouseOver" Value="True">
  52. <Setter TargetName="PathFill" Property="Fill" Value="White" />
  53. <Setter TargetName="Back" Property="Background" Value="#FFDCDCDC" />
  54. <Setter TargetName="Back" Property="BorderBrush" Value="#FFDCDCDC" />
  55. </Trigger>
  56. </ControlTemplate.Triggers>
  57. </ControlTemplate>
  58. </Setter.Value>
  59. </Setter>
  60. </Style>
  61. <Style x:Key="stlComboBox" TargetType="ComboBox">
  62. <Setter Property="SnapsToDevicePixels" Value="True" />
  63. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
  64. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
  65. <Setter Property="ScrollViewer.CanContentScroll" Value="True" />
  66. <Setter Property="HorizontalAlignment" Value="Left" />
  67. <Setter Property="Foreground" Value="Black" />
  68. <Setter Property="Height" Value="30" />
  69. <Setter Property="Margin" Value="0,0,0,0" />
  70. <Setter Property="Template">
  71. <Setter.Value>
  72. <ControlTemplate TargetType="ComboBox">
  73. <Grid Background="#F7FDF7">
  74. <Grid.ColumnDefinitions>
  75. <ColumnDefinition Width="0.8*" />
  76. <ColumnDefinition Width="0.2*" MaxWidth="20" />
  77. </Grid.ColumnDefinitions>
  78. <TextBox
  79. Grid.Column="0"
  80. VerticalContentAlignment="Center"
  81. IsReadOnly="True"
  82. Text="{TemplateBinding Text}" />
  83. <Border
  84. Grid.Column="0"
  85. BorderBrush="#FFDCDCDC"
  86. BorderThickness="1,1,1,1"
  87. CornerRadius="1,0,0,1" />
  88. <Border
  89. Grid.Column="1"
  90. BorderBrush="#FFDCDCDC"
  91. BorderThickness="0,1,1,1"
  92. CornerRadius="0,1,1,0">
  93. <ToggleButton
  94. ClickMode="Press"
  95. IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  96. Style="{StaticResource stlToggleButton}" />
  97. </Border>
  98. <Popup
  99. x:Name="Popup"
  100. AllowsTransparency="True"
  101. Focusable="False"
  102. IsOpen="{TemplateBinding IsDropDownOpen}"
  103. Placement="Bottom"
  104. PopupAnimation="Slide">
  105. <Border
  106. x:Name="DropDown"
  107. MinWidth="{TemplateBinding ActualWidth}"
  108. MaxHeight="{TemplateBinding MaxDropDownHeight}"
  109. CornerRadius="1"
  110. SnapsToDevicePixels="True">
  111. <Border.Effect>
  112. <DropShadowEffect
  113. BlurRadius="2"
  114. Opacity="0.5"
  115. ShadowDepth="0"
  116. Color="Black" />
  117. </Border.Effect>
  118. <ScrollViewer
  119. MaxHeight="{TemplateBinding MaxDropDownHeight}"
  120. Margin="4,6,4,6"
  121. CanContentScroll="True"
  122. HorizontalScrollBarVisibility="Auto"
  123. SnapsToDevicePixels="True"
  124. Style="{DynamicResource ScrollViewerStyle}"
  125. VerticalScrollBarVisibility="Auto">
  126. <!-- StackPanel 用于显示子级,方法是将 IsItemsHost 设置为 True -->
  127. <StackPanel
  128. Background="White"
  129. IsItemsHost="True"
  130. KeyboardNavigation.DirectionalNavigation="Contained" />
  131. </ScrollViewer>
  132. </Border>
  133. </Popup>
  134. </Grid>
  135. </ControlTemplate>
  136. </Setter.Value>
  137. </Setter>
  138. </Style>
  139. </Window.Resources>
  140. <Grid>
  141. <Grid.RowDefinitions>
  142. <RowDefinition Height="42" />
  143. <RowDefinition Height="*" />
  144. </Grid.RowDefinitions>
  145. <Grid
  146. x:Name="GridTitle_Black"
  147. Grid.Row="0"
  148. Margin="0,0"
  149. Background="#3f6fff"
  150. MouseLeftButtonDown="Window_MouseLeftButtonDown">
  151. <TextBlock
  152. Grid.RowSpan="2"
  153. Padding="10,13,0,0"
  154. FontSize="16"
  155. Foreground="White"
  156. Text="设备检测" />
  157. <Button
  158. x:Name="btnDown_Black"
  159. Grid.Row="0"
  160. Width="46"
  161. HorizontalAlignment="Right"
  162. Click="BtnDown_Click"
  163. Content="×"
  164. Cursor="Hand"
  165. FontSize="30"
  166. Foreground="White" />
  167. </Grid>
  168. <Grid Grid.Row="1">
  169. <Grid.ColumnDefinitions>
  170. <ColumnDefinition Width="140" />
  171. <ColumnDefinition Width="*" />
  172. </Grid.ColumnDefinitions>
  173. <Grid Grid.Column="0">
  174. <Border BorderBrush="#FFE9E9E9" BorderThickness="0,0,1,0">
  175. <StackPanel Margin="0,10" VerticalAlignment="Top">
  176. <Button
  177. x:Name="BtnCamera"
  178. Height="40"
  179. Margin="0,0,0,0"
  180. HorizontalAlignment="Stretch"
  181. VerticalAlignment="Stretch"
  182. IsEnabled="False"
  183. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
  184. <StackPanel Orientation="Horizontal">
  185. <Image
  186. Height="18"
  187. Margin="6,0"
  188. HorizontalAlignment="Left"
  189. Source="/BlackImages/Device_Camera.png" />
  190. <TextBlock
  191. Width="100"
  192. Padding="0,0,0,0"
  193. HorizontalAlignment="Center"
  194. FontSize="16"
  195. Text="摄像头" />
  196. </StackPanel>
  197. </Button>
  198. <Button
  199. x:Name="BtnSpeaker"
  200. Height="40"
  201. Margin="0,0,0,0"
  202. HorizontalAlignment="Stretch"
  203. VerticalAlignment="Stretch"
  204. IsEnabled="False"
  205. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
  206. <StackPanel Orientation="Horizontal">
  207. <Image
  208. Height="18"
  209. Margin="6,0"
  210. HorizontalAlignment="Left"
  211. Source="/BlackImages/Device_Voice.png" />
  212. <TextBlock
  213. Width="100"
  214. Padding="0,0,0,0"
  215. HorizontalAlignment="Center"
  216. FontSize="16"
  217. Text="扬声器" />
  218. </StackPanel>
  219. </Button>
  220. <Button
  221. x:Name="BtnMicrophone"
  222. Height="40"
  223. Margin="0,0,0,0"
  224. HorizontalAlignment="Stretch"
  225. VerticalAlignment="Stretch"
  226. Cursor="Hand"
  227. IsEnabled="False"
  228. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
  229. <StackPanel Orientation="Horizontal">
  230. <Image
  231. Height="18"
  232. Margin="6,0"
  233. HorizontalAlignment="Left"
  234. Source="/BlackImages/Device_Microphone.png" />
  235. <TextBlock
  236. Width="100"
  237. Padding="0,0,0,0"
  238. HorizontalAlignment="Center"
  239. FontSize="16"
  240. Text="麦克风" />
  241. </StackPanel>
  242. </Button>
  243. <Button
  244. x:Name="BtnDetectionPage"
  245. Height="40"
  246. Margin="0,0,0,0"
  247. HorizontalAlignment="Stretch"
  248. VerticalAlignment="Stretch"
  249. IsEnabled="False"
  250. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
  251. <StackPanel Orientation="Horizontal">
  252. <Image
  253. Height="18"
  254. Margin="6,0"
  255. HorizontalAlignment="Left"
  256. Source="/BlackImages/Device_JC.png" />
  257. <TextBlock
  258. Width="100"
  259. Padding="0,0,0,0"
  260. HorizontalAlignment="Center"
  261. FontSize="16"
  262. Text="检测结果" />
  263. </StackPanel>
  264. </Button>
  265. </StackPanel>
  266. </Border>
  267. </Grid>
  268. <Grid
  269. x:Name="GridCamera"
  270. Grid.Column="1"
  271. Visibility="Visible">
  272. <Grid.RowDefinitions>
  273. <RowDefinition Height="64" />
  274. <RowDefinition Height="*" />
  275. <RowDefinition Height="64" />
  276. </Grid.RowDefinitions>
  277. <StackPanel
  278. Grid.Row="0"
  279. Margin="30,0,0,0"
  280. Orientation="Horizontal">
  281. <TextBlock
  282. Margin="0,5,0,0"
  283. HorizontalAlignment="Left"
  284. VerticalAlignment="Center"
  285. FontSize="16"
  286. Foreground="#FF000000"
  287. Text="摄像头" />
  288. <ComboBox
  289. x:Name="CmbCameraList"
  290. Width="236"
  291. Margin="16,0,0,0"
  292. Padding="30,0,0,0"
  293. HorizontalAlignment="Left"
  294. VerticalAlignment="Center"
  295. HorizontalContentAlignment="Center"
  296. VerticalContentAlignment="Center"
  297. Background="White"
  298. BorderThickness="0"
  299. Cursor="Hand"
  300. DisplayMemberPath="Name"
  301. FontSize="14"
  302. SelectionChanged="CmbCameraList_SelectionChanged"
  303. Style="{StaticResource stlComboBox}"
  304. Text="请选择" />
  305. </StackPanel>
  306. <Grid
  307. Grid.Row="1"
  308. Width="300"
  309. Height="160"
  310. Margin="30,0,0,0"
  311. HorizontalAlignment="Left"
  312. VerticalAlignment="Top">
  313. <Image
  314. x:Name="imgPlayer"
  315. RenderTransformOrigin="0.5,0.5"
  316. Stretch="Fill"
  317. Visibility="Visible">
  318. <Image.RenderTransform>
  319. <ScaleTransform ScaleX="-1" />
  320. </Image.RenderTransform>
  321. </Image>
  322. </Grid>
  323. <StackPanel
  324. Grid.Row="2"
  325. Margin="30,0,0,0"
  326. HorizontalAlignment="Right"
  327. Orientation="Horizontal">
  328. <Button
  329. x:Name="btn_camera_good"
  330. Width="100"
  331. Height="30"
  332. Margin="0,0,10,0"
  333. HorizontalAlignment="Right"
  334. VerticalAlignment="Center"
  335. Background="#3f6fff"
  336. Click="btn_camera_good_Click"
  337. Content="可以看见"
  338. Cursor="Hand"
  339. FontSize="15"
  340. Foreground="White"
  341. IsDefault="True" />
  342. <Button
  343. x:Name="btn_camera_bad"
  344. Width="100"
  345. Height="30"
  346. Margin="0,0,10,0"
  347. HorizontalAlignment="Right"
  348. VerticalAlignment="Center"
  349. Background="#F1F2F3"
  350. Click="btn_camera_bad_Click"
  351. Content="看不见"
  352. Cursor="Hand"
  353. FontSize="15"
  354. Foreground="#333333"
  355. IsDefault="True" />
  356. </StackPanel>
  357. </Grid>
  358. <Grid
  359. x:Name="GridSpeaker"
  360. Grid.Column="1"
  361. Visibility="Collapsed">
  362. <Grid.RowDefinitions>
  363. <RowDefinition Height="64" />
  364. <RowDefinition Height="*" />
  365. <RowDefinition Height="64" />
  366. </Grid.RowDefinitions>
  367. <Grid Grid.Row="0">
  368. <StackPanel
  369. Margin="30,20,0,0"
  370. HorizontalAlignment="Left"
  371. VerticalAlignment="Top"
  372. Orientation="Horizontal">
  373. <Button
  374. x:Name="BtnSpeakerDetection"
  375. Grid.Row="2"
  376. Width="100"
  377. Height="30"
  378. Margin="0"
  379. HorizontalAlignment="Stretch"
  380. VerticalAlignment="Stretch"
  381. Click="BtnSpeakerDetection_Click"
  382. Content="播放音频"
  383. Cursor="Hand"
  384. FontSize="15"
  385. Foreground="White"
  386. IsDefault="True"
  387. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
  388. <Button.Template>
  389. <ControlTemplate TargetType="{x:Type Button}">
  390. <Border
  391. BorderBrush="{TemplateBinding BorderBrush}"
  392. BorderThickness="1"
  393. CornerRadius="7">
  394. <Border.Background>
  395. <Brush>#3f6fff</Brush>
  396. </Border.Background>
  397. <ContentPresenter
  398. HorizontalAlignment="Center"
  399. VerticalAlignment="Center"
  400. Content="{TemplateBinding Content}" />
  401. </Border>
  402. </ControlTemplate>
  403. </Button.Template>
  404. </Button>
  405. <MediaElement
  406. x:Name="MediaAudio"
  407. Width="0"
  408. LoadedBehavior="Manual"
  409. MediaEnded="MediaAudio_MediaEnded"
  410. MediaOpened="MediaAudio_MediaOpened"
  411. Stretch="Fill"
  412. Visibility="Hidden"
  413. Volume="1" />
  414. </StackPanel>
  415. </Grid>
  416. <Grid Grid.Row="1">
  417. <!--<MediaElement Source="/SkinImages/Other/Dev_AcousticWave2.gif" OpacityMask="#FF000000" HorizontalAlignment="Left" Margin="10,0,0,0" LoadedBehavior="{Binding ElementName=MediaAudio,Path=LoadedBehavior}" />-->
  418. <Grid
  419. Width="300"
  420. Height="100"
  421. Margin="30,0,0,0"
  422. HorizontalAlignment="Left"
  423. VerticalAlignment="Top"
  424. Background="#FFF1F2F8">
  425. <Image
  426. x:Name="ImgAcousticWave"
  427. HorizontalAlignment="Center"
  428. VerticalAlignment="Center"
  429. gif:ImageBehavior.AnimatedSource="/SkinImages/Other/Dev_AcousticWave2.gif"
  430. gif:ImageBehavior.AutoStart="True"
  431. gif:ImageBehavior.RepeatBehavior="Forever"
  432. Visibility="Hidden" />
  433. </Grid>
  434. </Grid>
  435. <Grid Grid.Row="2">
  436. <StackPanel
  437. Grid.Row="2"
  438. Margin="30,0,0,0"
  439. HorizontalAlignment="Right"
  440. Orientation="Horizontal">
  441. <Button
  442. x:Name="btn_speaker_good"
  443. Width="100"
  444. Height="30"
  445. Margin="0,0,10,0"
  446. HorizontalAlignment="Right"
  447. VerticalAlignment="Center"
  448. Background="#3f6fff"
  449. Click="btn_speaker_good_Click"
  450. Content="可以听见"
  451. Cursor="Hand"
  452. FontSize="15"
  453. Foreground="White"
  454. IsDefault="True" />
  455. <Button
  456. x:Name="btn_speaker_bad"
  457. Width="100"
  458. Height="30"
  459. Margin="0,0,10,0"
  460. HorizontalAlignment="Right"
  461. VerticalAlignment="Center"
  462. Background="#F1F2F3"
  463. Click="btn_speaker_bad_Click"
  464. Content="听不见"
  465. Cursor="Hand"
  466. FontSize="15"
  467. Foreground="#333333"
  468. IsDefault="True" />
  469. </StackPanel>
  470. </Grid>
  471. </Grid>
  472. <Grid
  473. x:Name="GridMicrophone"
  474. Grid.Column="1"
  475. Visibility="Collapsed">
  476. <Grid.RowDefinitions>
  477. <RowDefinition Height="64" />
  478. <RowDefinition Height="*" />
  479. <RowDefinition Height="64" />
  480. </Grid.RowDefinitions>
  481. <StackPanel
  482. Grid.Row="0"
  483. Margin="30,0,0,0"
  484. HorizontalAlignment="Left"
  485. VerticalAlignment="Center"
  486. Orientation="Horizontal">
  487. <TextBlock
  488. Margin="0,5,0,0"
  489. HorizontalAlignment="Left"
  490. VerticalAlignment="Top"
  491. FontSize="16"
  492. Foreground="#FF000000"
  493. Text="麦克风" />
  494. <ComboBox
  495. x:Name="CmbMicrophoneList"
  496. Width="236"
  497. Margin="16,0,0,0"
  498. Padding="30,0,0,0"
  499. HorizontalAlignment="Left"
  500. VerticalAlignment="Top"
  501. HorizontalContentAlignment="Center"
  502. VerticalContentAlignment="Center"
  503. Background="White"
  504. BorderThickness="0"
  505. Cursor="Hand"
  506. DisplayMemberPath="Value"
  507. FontSize="14"
  508. SelectedValuePath="Key"
  509. Style="{StaticResource stlComboBox}"
  510. Text="请选择" />
  511. </StackPanel>
  512. <Grid Grid.Row="1">
  513. <Grid.RowDefinitions>
  514. <RowDefinition Height="Auto" />
  515. <RowDefinition Height="64" />
  516. </Grid.RowDefinitions>
  517. <Grid
  518. x:Name="GridMicImg"
  519. Width="300"
  520. Height="100"
  521. Margin="30,0,0,0"
  522. HorizontalAlignment="Left"
  523. VerticalAlignment="Top"
  524. Background="#FFF1F2F8"
  525. Visibility="Visible">
  526. <Image
  527. x:Name="ImgMicAcousticWave"
  528. gif:ImageBehavior.AnimatedSource="/SkinImages/Other/Dev_AcousticWave2.gif"
  529. gif:ImageBehavior.AutoStart="True"
  530. gif:ImageBehavior.RepeatBehavior="Forever"
  531. Visibility="Hidden" />
  532. </Grid>
  533. <StackPanel
  534. Grid.Row="1"
  535. Margin="30,0,0,0"
  536. HorizontalAlignment="Left"
  537. VerticalAlignment="Center"
  538. Orientation="Horizontal">
  539. <Button
  540. x:Name="BtnMicrophoneDetection"
  541. Width="100"
  542. Height="30"
  543. Margin="0"
  544. HorizontalAlignment="Stretch"
  545. VerticalAlignment="Stretch"
  546. Background="#3f6fff"
  547. Click="BtnMicrophoneDetection_Click"
  548. Content="回响测试"
  549. Cursor="Hand"
  550. FontSize="15"
  551. Foreground="White"
  552. IsDefault="True" />
  553. <TextBlock
  554. x:Name="TbxMicrophoneDetection"
  555. Margin="10,0,0,0"
  556. HorizontalAlignment="Left"
  557. VerticalAlignment="Center"
  558. FontSize="16"
  559. Foreground="#FF000000"
  560. Text="待检测" />
  561. <MediaElement
  562. x:Name="MediaAudioMicPlay"
  563. Width="0"
  564. LoadedBehavior="Manual"
  565. MediaEnded="MediaAudioMicPlay_MediaEnded"
  566. Stretch="Fill"
  567. Visibility="Hidden"
  568. Volume="1" />
  569. </StackPanel>
  570. </Grid>
  571. <Grid Grid.Row="2">
  572. <StackPanel
  573. Grid.Row="2"
  574. Margin="30,0,0,0"
  575. HorizontalAlignment="Right"
  576. Orientation="Horizontal">
  577. <Button
  578. x:Name="btn_microphone_good"
  579. Width="100"
  580. Height="30"
  581. Margin="0,0,10,0"
  582. HorizontalAlignment="Right"
  583. VerticalAlignment="Center"
  584. Background="#3f6fff"
  585. Click="btn_microphone_good_Click"
  586. Content="可以听见"
  587. Cursor="Hand"
  588. FontSize="15"
  589. Foreground="White"
  590. IsDefault="True" />
  591. <Button
  592. x:Name="btn_microphone_bad"
  593. Width="100"
  594. Height="30"
  595. Margin="0,0,10,0"
  596. HorizontalAlignment="Right"
  597. VerticalAlignment="Center"
  598. Background="#F1F2F3"
  599. Click="btn_microphone_bad_Click"
  600. Content="听不见"
  601. Cursor="Hand"
  602. FontSize="15"
  603. Foreground="#333333"
  604. IsDefault="True" />
  605. </StackPanel>
  606. </Grid>
  607. </Grid>
  608. <Grid
  609. x:Name="GridDetection"
  610. Grid.Column="1"
  611. Margin="25,15"
  612. Visibility="Collapsed">
  613. <Grid.ColumnDefinitions>
  614. <ColumnDefinition Width="50*" />
  615. <ColumnDefinition Width="50*" />
  616. </Grid.ColumnDefinitions>
  617. <Grid.RowDefinitions>
  618. <RowDefinition Height="50*" />
  619. <RowDefinition Height="50*" />
  620. <RowDefinition Height="50*" />
  621. <RowDefinition Height="50*" />
  622. <RowDefinition Height="50*" />
  623. <RowDefinition Height="50*" />
  624. <RowDefinition Height="50*" />
  625. </Grid.RowDefinitions>
  626. <Grid Grid.Row="0" Grid.Column="0">
  627. <TextBlock
  628. HorizontalAlignment="Center"
  629. VerticalAlignment="Center"
  630. FontSize="16"
  631. Foreground="#FF999999"
  632. Text="设备名称" />
  633. </Grid>
  634. <Grid Grid.Row="0" Grid.Column="1">
  635. <TextBlock
  636. HorizontalAlignment="Center"
  637. VerticalAlignment="Center"
  638. FontSize="16"
  639. Foreground="#FF999999"
  640. Text="检测结果" />
  641. </Grid>
  642. <!-- 摄像头 -->
  643. <Grid Grid.Row="1" Grid.Column="0">
  644. <TextBlock
  645. HorizontalAlignment="Center"
  646. VerticalAlignment="Center"
  647. FontSize="16"
  648. Foreground="#FF000000"
  649. Text="摄像头" />
  650. </Grid>
  651. <Grid Grid.Row="1" Grid.Column="1">
  652. <TextBlock
  653. x:Name="TxbCamera"
  654. HorizontalAlignment="Center"
  655. VerticalAlignment="Center"
  656. FontSize="16"
  657. Foreground="#FF000000"
  658. Text="" />
  659. </Grid>
  660. <!-- 扬声器 -->
  661. <Grid Grid.Row="2" Grid.Column="0">
  662. <TextBlock
  663. HorizontalAlignment="Center"
  664. VerticalAlignment="Center"
  665. FontSize="16"
  666. Foreground="#FF000000"
  667. Text="扬声器" />
  668. </Grid>
  669. <Grid Grid.Row="2" Grid.Column="1">
  670. <TextBlock
  671. x:Name="TxbSpeaker"
  672. HorizontalAlignment="Center"
  673. VerticalAlignment="Center"
  674. FontSize="16"
  675. Foreground="#FF000000"
  676. Text="" />
  677. </Grid>
  678. <!-- 麦克风 -->
  679. <Grid Grid.Row="3" Grid.Column="0">
  680. <TextBlock
  681. HorizontalAlignment="Center"
  682. VerticalAlignment="Center"
  683. FontSize="16"
  684. Foreground="#FF000000"
  685. Text="麦克风" />
  686. </Grid>
  687. <Grid Grid.Row="3" Grid.Column="1">
  688. <TextBlock
  689. x:Name="TxbMicrophone"
  690. HorizontalAlignment="Center"
  691. VerticalAlignment="Center"
  692. FontSize="16"
  693. Foreground="#FF000000"
  694. Text="" />
  695. </Grid>
  696. <Grid Grid.Row="6" Grid.Column="1">
  697. <Button
  698. x:Name="BtnDetection"
  699. Grid.Row="2"
  700. Width="116"
  701. Height="30"
  702. Margin="0"
  703. HorizontalAlignment="Right"
  704. VerticalAlignment="Stretch"
  705. Background="#3f6fff"
  706. Click="BtnDetection_Click"
  707. Content="重新检测"
  708. Cursor="Hand"
  709. FontSize="14"
  710. Foreground="White"
  711. IsDefault="True" />
  712. </Grid>
  713. </Grid>
  714. </Grid>
  715. </Grid>
  716. </Window>