diff --git a/Correlator/Dialog/SimplyAuditionDialog.xaml b/Correlator/Dialog/SimplyAuditionDialog.xaml
index 8c1f422..5d38906 100644
--- a/Correlator/Dialog/SimplyAuditionDialog.xaml
+++ b/Correlator/Dialog/SimplyAuditionDialog.xaml
@@ -2,6 +2,7 @@
x:Class="Correlator.Dialog.SimplyAuditionDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:cvt="clr-namespace:Correlator.Converter"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -32,19 +33,19 @@
-
+
+
-
@@ -73,39 +74,14 @@
HorizontalAlignment="Stretch"
Command="{Binding ListenRedSensorCommand}"
Content="听红色传感器"
- FontSize="14" />
+ FontSize="14"
+ Style="{StaticResource FunctionButtonStyle}" />
-
-
-
-
-
-
-
-
-
-
-
@@ -140,27 +116,67 @@
HorizontalAlignment="Stretch"
Command="{Binding ListenBlueSensorCommand}"
Content="听蓝色传感器"
- FontSize="14" />
+ FontSize="14"
+ Style="{StaticResource FunctionButtonStyle}" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+ BorderThickness="1">
+
+
+
+
+
+
+
+
diff --git a/Correlator/Dialog/SimplyAuditionDialog.xaml b/Correlator/Dialog/SimplyAuditionDialog.xaml
index 8c1f422..5d38906 100644
--- a/Correlator/Dialog/SimplyAuditionDialog.xaml
+++ b/Correlator/Dialog/SimplyAuditionDialog.xaml
@@ -2,6 +2,7 @@
x:Class="Correlator.Dialog.SimplyAuditionDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:cvt="clr-namespace:Correlator.Converter"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -32,19 +33,19 @@
-
+
+
-
@@ -73,39 +74,14 @@
HorizontalAlignment="Stretch"
Command="{Binding ListenRedSensorCommand}"
Content="听红色传感器"
- FontSize="14" />
+ FontSize="14"
+ Style="{StaticResource FunctionButtonStyle}" />
-
-
-
-
-
-
-
-
-
-
-
@@ -140,27 +116,67 @@
HorizontalAlignment="Stretch"
Command="{Binding ListenBlueSensorCommand}"
Content="听蓝色传感器"
- FontSize="14" />
+ FontSize="14"
+ Style="{StaticResource FunctionButtonStyle}" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+ BorderThickness="1">
+
+
+
+
+
+
+
+
diff --git a/Correlator/ViewModels/SimplyAuditionDialogViewModel.cs b/Correlator/ViewModels/SimplyAuditionDialogViewModel.cs
index 7ccb92f..56d4e65 100644
--- a/Correlator/ViewModels/SimplyAuditionDialogViewModel.cs
+++ b/Correlator/ViewModels/SimplyAuditionDialogViewModel.cs
@@ -1,5 +1,4 @@
using System;
-using System.Runtime.InteropServices;
using System.Windows;
using Correlator.DataService;
using Correlator.Util;
@@ -65,26 +64,7 @@
public DelegateCommand ListenRedSensorCommand { get; }
public DelegateCommand ListenBlueSensorCommand { get; }
public DelegateCommand SensorMuteCommand { get; }
-
- #endregion
-
- #region 静音
-
- //函数名不能改,否则会报找不到函数错误,dll里面定好了的
- [DllImport("user32.dll")]
- private static extern void keybd_event(byte bVk, byte bScan, uint dwFlags, uint dwExtraInfo);
-
- [DllImport("user32.dll")]
- private static extern byte MapVirtualKey(uint uCode, uint uMapType);
-
- private int GetCurrentMicVolume()
- {
- var enumerator = new MMDeviceEnumerator();
-
- //获取音频输入设备
- var device = enumerator.GetDefaultAudioEndpoint(DataFlow.Render, Role.Multimedia);
- return (int)(device.AudioEndpointVolume.MasterVolumeLevelScalar * 100);
- }
+ public DelegateCommand