123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857 |
- <Window
- x:Class="XHWK.WKTool.DeviceWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:gif="http://wpfanimatedgif.codeplex.com"
- xmlns:local="clr-namespace:XHWK.WKTool"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- Title="设备检测"
- Width="650"
- Height="450"
- AllowsTransparency="True"
- BorderBrush="#FFE9E9E9"
- BorderThickness="1"
- ShowInTaskbar="False"
- WindowStartupLocation="CenterOwner"
- WindowStyle="None"
- mc:Ignorable="d">
-
- <Window.Resources>
- <!-- 摄像头样式 -->
- <Style x:Key="stlToggleButton" TargetType="ToggleButton">
- <Setter Property="Foreground" Value="White" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate>
- <Border
- x:Name="Back"
- Background="#FFFFFFFF"
- BorderBrush="Transparent"
- BorderThickness="0">
- <Path
- Name="PathFill"
- Width="8"
- Height="6"
- Data="M5,0 L10,10 L0,10 z"
- Fill="Black"
- RenderTransformOrigin="0.5,0.5"
- Stretch="Fill"
- StrokeThickness="0">
- <Path.RenderTransform>
- <TransformGroup>
- <ScaleTransform />
- <SkewTransform />
- <RotateTransform Angle="180" />
- <TranslateTransform />
- </TransformGroup>
- </Path.RenderTransform>
- </Path>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="PathFill" Property="Fill" Value="White" />
- <Setter TargetName="Back" Property="Background" Value="#FFDCDCDC" />
- <Setter TargetName="Back" Property="BorderBrush" Value="#FFDCDCDC" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="stlComboBox" TargetType="ComboBox">
- <Setter Property="SnapsToDevicePixels" Value="True" />
- <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
- <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
- <Setter Property="ScrollViewer.CanContentScroll" Value="True" />
- <Setter Property="HorizontalAlignment" Value="Left" />
- <Setter Property="Foreground" Value="Black" />
- <Setter Property="Height" Value="30" />
- <Setter Property="Margin" Value="0,0,0,0" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="ComboBox">
- <Grid Background="#F7FDF7">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="0.8*" />
- <ColumnDefinition Width="0.2*" MaxWidth="20" />
- </Grid.ColumnDefinitions>
- <TextBox
- Grid.Column="0"
- VerticalContentAlignment="Center"
- IsReadOnly="True"
- Text="{TemplateBinding Text}" />
- <Border
- Grid.Column="0"
- BorderBrush="#FFDCDCDC"
- BorderThickness="1,1,1,1"
- CornerRadius="1,0,0,1" />
- <Border
- Grid.Column="1"
- BorderBrush="#FFDCDCDC"
- BorderThickness="0,1,1,1"
- CornerRadius="0,1,1,0">
- <ToggleButton
- ClickMode="Press"
- IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
- Style="{StaticResource stlToggleButton}" />
- </Border>
- <Popup
- x:Name="Popup"
- AllowsTransparency="True"
- Focusable="False"
- IsOpen="{TemplateBinding IsDropDownOpen}"
- Placement="Bottom"
- PopupAnimation="Slide">
- <Border
- x:Name="DropDown"
- MinWidth="{TemplateBinding ActualWidth}"
- MaxHeight="{TemplateBinding MaxDropDownHeight}"
- CornerRadius="1"
- SnapsToDevicePixels="True">
- <Border.Effect>
- <DropShadowEffect
- BlurRadius="2"
- Opacity="0.5"
- ShadowDepth="0"
- Color="Black" />
- </Border.Effect>
- <ScrollViewer
- MaxHeight="{TemplateBinding MaxDropDownHeight}"
- Margin="4,6,4,6"
- CanContentScroll="True"
- HorizontalScrollBarVisibility="Auto"
- SnapsToDevicePixels="True"
- Style="{DynamicResource ScrollViewerStyle}"
- VerticalScrollBarVisibility="Auto">
- <!-- StackPanel 用于显示子级,方法是将 IsItemsHost 设置为 True -->
- <StackPanel
- Background="White"
- IsItemsHost="True"
- KeyboardNavigation.DirectionalNavigation="Contained" />
- </ScrollViewer>
- </Border>
- </Popup>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </Window.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="46" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <Grid
- x:Name="GridTitle_Black"
- Grid.Row="0"
- Margin="0,0"
- Background="#FFF1F2F8"
- MouseLeftButtonDown="Window_MouseLeftButtonDown">
- <TextBlock
- Grid.RowSpan="2"
- Padding="10,13,0,0"
- FontSize="16"
- Foreground="#FF333333"
- Text="设备检测" />
- <Button
- x:Name="btnDown_Black"
- Grid.Row="0"
- Width="46"
- HorizontalAlignment="Right"
- VerticalAlignment="Top"
- Click="BtnDown_Click"
- Content="×"
- Cursor="Hand"
- FontSize="30"
- Foreground="#FF333333"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
- </Grid>
- <Grid Grid.Row="1">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="100*" />
- <ColumnDefinition Width="300*" />
- </Grid.ColumnDefinitions>
- <Grid Grid.Column="0">
- <Border BorderBrush="#FFE9E9E9" BorderThickness="0,0,1,0">
- <StackPanel Margin="0,10" VerticalAlignment="Top">
- <Button
- x:Name="BtnCamera"
- Margin="0,10,0,10"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- Click="BtnCamera_Click"
- Cursor="Hand"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
- <StackPanel Orientation="Horizontal">
- <Image
- Height="18"
- Margin="6,0"
- HorizontalAlignment="Left"
- Source="/BlackImages/Device_Camera.png" />
- <TextBlock
- Width="100"
- Padding="0,0,0,0"
- HorizontalAlignment="Center"
- FontSize="18"
- Text="摄像头" />
- </StackPanel>
- </Button>
- <Button
- x:Name="BtnSpeaker"
- Margin="0,10,0,10"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- Click="BtnSpeaker_Click"
- Cursor="Hand"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
- <StackPanel Orientation="Horizontal">
- <Image
- Height="18"
- Margin="6,0"
- HorizontalAlignment="Left"
- Source="/BlackImages/Device_Voice.png" />
- <TextBlock
- Width="100"
- Padding="0,0,0,0"
- HorizontalAlignment="Center"
- FontSize="18"
- Text="扬声器" />
- </StackPanel>
- </Button>
- <Button
- x:Name="BtnMicrophone"
- Margin="0,10,0,10"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- Click="BtnMicrophone_Click"
- Cursor="Hand"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
- <StackPanel Orientation="Horizontal">
- <Image
- Height="18"
- Margin="6,0"
- HorizontalAlignment="Left"
- Source="/BlackImages/Device_Microphone.png" />
- <TextBlock
- Width="100"
- Padding="0,0,0,0"
- HorizontalAlignment="Center"
- FontSize="18"
- Text="麦克风" />
- </StackPanel>
- </Button>
- <Button
- x:Name="BtnDetectionPage"
- Margin="0,10,0,10"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- Click="BtnDetectionPage_Click"
- Cursor="Hand"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
- <StackPanel Orientation="Horizontal">
- <Image
- Height="18"
- Margin="6,0"
- HorizontalAlignment="Left"
- Source="/BlackImages/Device_JC.png" />
- <TextBlock
- Width="100"
- Padding="0,0,0,0"
- HorizontalAlignment="Center"
- FontSize="18"
- Text="设备检测" />
- </StackPanel>
- </Button>
- </StackPanel>
- </Border>
- </Grid>
- <Grid
- x:Name="GridDetection"
- Grid.Column="1"
- Margin="25,15"
- Visibility="Visible">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="50*" />
- <ColumnDefinition Width="50*" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="50*" />
- <RowDefinition Height="50*" />
- <RowDefinition Height="50*" />
- <RowDefinition Height="50*" />
- <RowDefinition Height="50*" />
- <RowDefinition Height="50*" />
- <RowDefinition Height="50*" />
- </Grid.RowDefinitions>
- <Grid Grid.Row="0" Grid.Column="0">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="18"
- Foreground="#FF999999"
- Text="设备名称" />
- </Grid>
- <Grid Grid.Row="0" Grid.Column="1">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="18"
- Foreground="#FF999999"
- Text="检测结果" />
- </Grid>
- <!-- 摄像头 -->
- <Grid Grid.Row="1" Grid.Column="0">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="17"
- Foreground="#FF000000"
- Text="摄像头" />
- </Grid>
- <Grid Grid.Row="1" Grid.Column="1">
- <TextBlock
- x:Name="TxbCamera"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="17"
- Foreground="#FF000000"
- Text="" />
- </Grid>
- <!-- 扬声器 -->
- <Grid Grid.Row="2" Grid.Column="0">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="17"
- Foreground="#FF000000"
- Text="扬声器" />
- </Grid>
- <Grid Grid.Row="2" Grid.Column="1">
- <TextBlock
- x:Name="TxbSpeaker"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="17"
- Foreground="#FF000000"
- Text="" />
- </Grid>
- <!-- 麦克风 -->
- <Grid Grid.Row="3" Grid.Column="0">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="17"
- Foreground="#FF000000"
- Text="麦克风" />
- </Grid>
- <Grid Grid.Row="3" Grid.Column="1">
- <TextBlock
- x:Name="TxbMicrophone"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="17"
- Foreground="#FF000000"
- Text="" />
- </Grid>
-
- <Grid Grid.Row="6" Grid.Column="1">
- <Button
- x:Name="BtnDetection"
- Grid.Row="2"
- Width="116"
- Height="46"
- Margin="0"
- HorizontalAlignment="Right"
- VerticalAlignment="Stretch"
- Click="BtnDetection_Click"
- Content="开始检测"
- Cursor="Hand"
- FontSize="17"
- Foreground="White"
- IsDefault="True"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
- <Button.Template>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="1"
- CornerRadius="23">
- <Border.Background>
- <Brush>#2E8CF0</Brush>
- </Border.Background>
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding Content}" />
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </Grid>
- </Grid>
- <Grid
- x:Name="GridCamera"
- Grid.Column="1"
- Visibility="Collapsed">
- <Grid.RowDefinitions>
- <RowDefinition Height="66*" />
- <RowDefinition Height="250*" />
- <RowDefinition Height="70*" />
- </Grid.RowDefinitions>
- <StackPanel
- Grid.Row="0"
- Margin="30,20,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- Orientation="Horizontal">
- <TextBlock
- Margin="0,5,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- FontSize="17"
- Foreground="#FF000000"
- Text="摄像头:" />
- <ComboBox
- x:Name="CmbCameraList"
- Width="210"
- Padding="30,0,10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- HorizontalContentAlignment="Center"
- VerticalContentAlignment="Center"
- Background="White"
- BorderThickness="0"
- Cursor="Hand"
- DisplayMemberPath="Value"
- FontSize="14"
- SelectedValuePath="Key"
- Style="{StaticResource stlComboBox}"
- Text="请选择" />
- </StackPanel>
- <Grid
- Grid.Row="1"
- Width="300"
- Height="250"
- Margin="30,0,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- Background="#FFF1F2F8">
- <Image
- x:Name="imgPlayer"
- RenderTransformOrigin="0.5,0.5"
- Visibility="Visible">
- <Image.RenderTransform>
- <ScaleTransform ScaleX="-1" />
- </Image.RenderTransform>
- </Image>
- </Grid>
- <StackPanel
- Grid.Row="2"
- Margin="30,15,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- Orientation="Horizontal">
- <Button
- x:Name="BtnCameraStat"
- Width="70"
- Height="30"
- Margin="0,0,0,0"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- Click="BtnCameraStat_Click"
- Content="播放"
- Cursor="Hand"
- FontSize="15"
- Foreground="White"
- IsDefault="True"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
- <Button.Template>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="1"
- CornerRadius="7">
- <Border.Background>
- <Brush>#2E8CF0</Brush>
- </Border.Background>
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding Content}" />
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- <Button
- x:Name="BtnCameraStop"
- Width="70"
- Height="30"
- Margin="10,0,0,0"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- Click="BtnCameraStop_Click"
- Content="停止"
- Cursor="Hand"
- FontSize="15"
- Foreground="White"
- IsDefault="True"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
- <Button.Template>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="1"
- CornerRadius="7">
- <Border.Background>
- <Brush>#CCCCCC</Brush>
- </Border.Background>
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding Content}" />
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- <Button
- x:Name="BtnCameraSave"
- Width="70"
- Height="30"
- Margin="80,0,0,0"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- Click="BtnCameraSave_Click"
- Content="设置"
- Cursor="Hand"
- FontSize="15"
- Foreground="White"
- IsDefault="True"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
- <Button.Template>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="1"
- CornerRadius="7">
- <Border.Background>
- <Brush>#2E8CF0</Brush>
- </Border.Background>
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding Content}" />
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </StackPanel>
- </Grid>
- <Grid
- x:Name="GridSpeaker"
- Grid.Column="1"
- Visibility="Collapsed">
- <Grid.RowDefinitions>
- <RowDefinition Height="56*" />
- <RowDefinition Height="180*" />
- <RowDefinition Height="150*" />
- </Grid.RowDefinitions>
- <Grid Grid.Row="0">
- <StackPanel
- Margin="30,20,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- Orientation="Horizontal">
- <Button
- x:Name="BtnSpeakerDetection"
- Grid.Row="2"
- Width="100"
- Height="30"
- Margin="0"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- Click="BtnSpeakerDetection_Click"
- Content="播放音频"
- Cursor="Hand"
- FontSize="15"
- Foreground="White"
- IsDefault="True"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
- <Button.Template>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="1"
- CornerRadius="7">
- <Border.Background>
- <Brush>#2E8CF0</Brush>
- </Border.Background>
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding Content}" />
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
-
- <MediaElement
- x:Name="MediaAudio"
- Width="0"
- LoadedBehavior="Manual"
- MediaEnded="MediaAudio_MediaEnded"
- MediaOpened="MediaAudio_MediaOpened"
- Stretch="Fill"
- Visibility="Hidden"
- Volume="1" />
- <!--<Slider x:Name="timelineSlider" Minimum="0" VerticalAlignment="Center" BorderThickness="0,5,0,0" Width="150" Height="30" />-->
- </StackPanel>
- </Grid>
- <Grid Grid.Row="1">
- <!--<MediaElement Source="/SkinImages/Other/Dev_AcousticWave2.gif" OpacityMask="#FF000000" HorizontalAlignment="Left" Margin="10,0,0,0" LoadedBehavior="{Binding ElementName=MediaAudio,Path=LoadedBehavior}"/>-->
- <Grid Margin="30,0,127,0" Background="#FFF1F2F8">
- <Image
- x:Name="ImgAcousticWave"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- gif:ImageBehavior.AnimatedSource="/SkinImages/Other/Dev_AcousticWave2.gif"
- gif:ImageBehavior.AutoStart="True"
- gif:ImageBehavior.RepeatBehavior="Forever"
- Visibility="Hidden" />
- </Grid>
- </Grid>
- <Grid Grid.Row="2">
- <StackPanel
- Margin="30,0,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- Orientation="Horizontal">
- <TextBlock
- Margin="0,5,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- FontSize="17"
- Foreground="#FF000000"
- Text="声音采集:" />
- <TextBlock
- x:Name="TbxSpeakerDetection"
- Margin="0,5,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- FontSize="17"
- Foreground="#FF000000"
- Text="待检测" />
- </StackPanel>
- </Grid>
- </Grid>
- <Grid
- x:Name="GridMicrophone"
- Grid.Column="1"
- Visibility="Collapsed">
- <Grid.RowDefinitions>
- <RowDefinition Height="50*" />
- <RowDefinition Height="45*" />
- <RowDefinition Height="196*" />
- <RowDefinition Height="95*" />
- </Grid.RowDefinitions>
- <StackPanel
- Grid.Row="0"
- Margin="30,0,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <TextBlock
- Margin="0,5,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- FontSize="17"
- Foreground="#FF000000"
- Text="麦克风:" />
- <ComboBox
- x:Name="CmbMicrophoneList"
- Width="210"
- Padding="30,0,10,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- HorizontalContentAlignment="Center"
- VerticalContentAlignment="Center"
- Background="White"
- BorderThickness="0"
- Cursor="Hand"
- DisplayMemberPath="Value"
- FontSize="14"
- SelectedValuePath="Key"
- Style="{StaticResource stlComboBox}"
- Text="请选择" />
- <Button
- x:Name="BtnMicrophoneSave"
- Grid.Row="2"
- Width="70"
- Height="30"
- Margin="10,0,0,0"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- Click="BtnMicrophoneSave_Click"
- Content="设置"
- Cursor="Hand"
- FontSize="15"
- Foreground="White"
- IsDefault="True"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
- <Button.Template>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="1"
- CornerRadius="7">
- <Border.Background>
- <Brush>#2E8CF0</Brush>
- </Border.Background>
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding Content}" />
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </StackPanel>
- <StackPanel
- Grid.Row="1"
- Margin="30,0,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <Button
- x:Name="BtnMicrophoneDetection"
- Width="100"
- Height="30"
- Margin="0"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- Click="BtnMicrophoneDetection_Click"
- Content="开始录音"
- Cursor="Hand"
- FontSize="15"
- Foreground="White"
- IsDefault="True"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
- <Button.Template>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="1"
- CornerRadius="7">
- <Border.Background>
- <Brush>#2E8CF0</Brush>
- </Border.Background>
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding Content}" />
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
-
- <Button
- x:Name="BtnMicrophoneDetectionPlay"
- Width="100"
- Height="30"
- Margin="10,0,0,0"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- Click="BtnMicrophoneDetectionPlay_Click"
- Content="播放"
- Cursor="Hand"
- FontSize="15"
- Foreground="White"
- IsDefault="True"
- Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
- <Button.Template>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="1"
- CornerRadius="7">
- <Border.Background>
- <Brush>#2E8CF0</Brush>
- </Border.Background>
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding Content}" />
- </Border>
- </ControlTemplate>
- </Button.Template>
- </Button>
- <MediaElement
- x:Name="MediaAudioMicPlay"
- Width="0"
- LoadedBehavior="Manual"
- MediaEnded="MediaAudioMicPlay_MediaEnded"
- Stretch="Fill"
- Visibility="Hidden"
- Volume="1" />
- </StackPanel>
- <Grid Grid.Row="3">
- <StackPanel
- Margin="30,0,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- Orientation="Horizontal">
- <TextBlock
- Margin="0,5,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- FontSize="17"
- Foreground="#FF000000"
- Text="麦克风采集:" />
- <TextBlock
- x:Name="TbxMicrophoneDetection"
- Margin="0,5,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- FontSize="17"
- Foreground="#FF000000"
- Text="待检测" />
- </StackPanel>
- <CheckBox
- x:Name="CbxRecordingMicrophone"
- Margin="30,40,0,0"
- Padding="5,0,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- VerticalContentAlignment="Center"
- Click="CbxRecordingMicrophone_Click"
- Content="录制麦克风"
- FontSize="16"
- IsChecked="True" />
-
- </Grid>
- <!--<StackPanel Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="30,0,0,0">
- </StackPanel>-->
- <Grid Grid.Row="2">
- <Grid
- x:Name="GridMicImg"
- Width="320"
- Height="180"
- Margin="30,0,0,0"
- HorizontalAlignment="Left"
- Background="#FFF1F2F8"
- Visibility="Visible">
- <Image
- x:Name="ImgMicAcousticWave"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- gif:ImageBehavior.AnimatedSource="/SkinImages/Other/Dev_AcousticWave2.gif"
- gif:ImageBehavior.AutoStart="True"
- gif:ImageBehavior.RepeatBehavior="Forever"
- Visibility="Hidden" />
- </Grid>
- </Grid>
- </Grid>
- </Grid>
- </Grid>
- </Window>
|