diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj index 7ad9570..21ce7a9 100644 --- a/Correlator/Correlator.csproj +++ b/Correlator/Correlator.csproj @@ -262,7 +262,6 @@ - diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj index 7ad9570..21ce7a9 100644 --- a/Correlator/Correlator.csproj +++ b/Correlator/Correlator.csproj @@ -262,7 +262,6 @@ - diff --git a/Correlator/DataService/SerialPortServiceImpl.cs b/Correlator/DataService/SerialPortServiceImpl.cs index 0107b9c..423d7d5 100644 --- a/Correlator/DataService/SerialPortServiceImpl.cs +++ b/Correlator/DataService/SerialPortServiceImpl.cs @@ -284,10 +284,6 @@ realData[i] = dStr.HexToDouble(); } - var noiseValue = 0.0; - Array.ForEach(realData, i => noiseValue += Math.Abs(i)); - _eventAggregator.GetEvent().Publish(noiseValue); - //PCM数据 var pcm = new byte[7500 * 3]; //每个采样点2字节 diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj index 7ad9570..21ce7a9 100644 --- a/Correlator/Correlator.csproj +++ b/Correlator/Correlator.csproj @@ -262,7 +262,6 @@ - diff --git a/Correlator/DataService/SerialPortServiceImpl.cs b/Correlator/DataService/SerialPortServiceImpl.cs index 0107b9c..423d7d5 100644 --- a/Correlator/DataService/SerialPortServiceImpl.cs +++ b/Correlator/DataService/SerialPortServiceImpl.cs @@ -284,10 +284,6 @@ realData[i] = dStr.HexToDouble(); } - var noiseValue = 0.0; - Array.ForEach(realData, i => noiseValue += Math.Abs(i)); - _eventAggregator.GetEvent().Publish(noiseValue); - //PCM数据 var pcm = new byte[7500 * 3]; //每个采样点2字节 diff --git a/Correlator/Dialog/SimplyAuditionDialog.xaml b/Correlator/Dialog/SimplyAuditionDialog.xaml index 7cb37f2..5ae471a 100644 --- a/Correlator/Dialog/SimplyAuditionDialog.xaml +++ b/Correlator/Dialog/SimplyAuditionDialog.xaml @@ -83,25 +83,6 @@ Foreground="#cecece" Text="Judgment By Pipe Listening" /> - - - - - - - - - - - diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj index 7ad9570..21ce7a9 100644 --- a/Correlator/Correlator.csproj +++ b/Correlator/Correlator.csproj @@ -262,7 +262,6 @@ - diff --git a/Correlator/DataService/SerialPortServiceImpl.cs b/Correlator/DataService/SerialPortServiceImpl.cs index 0107b9c..423d7d5 100644 --- a/Correlator/DataService/SerialPortServiceImpl.cs +++ b/Correlator/DataService/SerialPortServiceImpl.cs @@ -284,10 +284,6 @@ realData[i] = dStr.HexToDouble(); } - var noiseValue = 0.0; - Array.ForEach(realData, i => noiseValue += Math.Abs(i)); - _eventAggregator.GetEvent().Publish(noiseValue); - //PCM数据 var pcm = new byte[7500 * 3]; //每个采样点2字节 diff --git a/Correlator/Dialog/SimplyAuditionDialog.xaml b/Correlator/Dialog/SimplyAuditionDialog.xaml index 7cb37f2..5ae471a 100644 --- a/Correlator/Dialog/SimplyAuditionDialog.xaml +++ b/Correlator/Dialog/SimplyAuditionDialog.xaml @@ -83,25 +83,6 @@ Foreground="#cecece" Text="Judgment By Pipe Listening" /> - - - - - - - - - - - diff --git a/Correlator/Events/NoiseValueEvent.cs b/Correlator/Events/NoiseValueEvent.cs deleted file mode 100644 index e5ec8fd..0000000 --- a/Correlator/Events/NoiseValueEvent.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Prism.Events; - -namespace Correlator.Events -{ - public class NoiseValueEvent : PubSubEvent - { - } -} \ No newline at end of file diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj index 7ad9570..21ce7a9 100644 --- a/Correlator/Correlator.csproj +++ b/Correlator/Correlator.csproj @@ -262,7 +262,6 @@ - diff --git a/Correlator/DataService/SerialPortServiceImpl.cs b/Correlator/DataService/SerialPortServiceImpl.cs index 0107b9c..423d7d5 100644 --- a/Correlator/DataService/SerialPortServiceImpl.cs +++ b/Correlator/DataService/SerialPortServiceImpl.cs @@ -284,10 +284,6 @@ realData[i] = dStr.HexToDouble(); } - var noiseValue = 0.0; - Array.ForEach(realData, i => noiseValue += Math.Abs(i)); - _eventAggregator.GetEvent().Publish(noiseValue); - //PCM数据 var pcm = new byte[7500 * 3]; //每个采样点2字节 diff --git a/Correlator/Dialog/SimplyAuditionDialog.xaml b/Correlator/Dialog/SimplyAuditionDialog.xaml index 7cb37f2..5ae471a 100644 --- a/Correlator/Dialog/SimplyAuditionDialog.xaml +++ b/Correlator/Dialog/SimplyAuditionDialog.xaml @@ -83,25 +83,6 @@ Foreground="#cecece" Text="Judgment By Pipe Listening" /> - - - - - - - - - - - diff --git a/Correlator/Events/NoiseValueEvent.cs b/Correlator/Events/NoiseValueEvent.cs deleted file mode 100644 index e5ec8fd..0000000 --- a/Correlator/Events/NoiseValueEvent.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Prism.Events; - -namespace Correlator.Events -{ - public class NoiseValueEvent : PubSubEvent - { - } -} \ No newline at end of file diff --git a/Correlator/ViewModels/SimplyAuditionDialogViewModel.cs b/Correlator/ViewModels/SimplyAuditionDialogViewModel.cs index 62a098e..c1ed2d0 100644 --- a/Correlator/ViewModels/SimplyAuditionDialogViewModel.cs +++ b/Correlator/ViewModels/SimplyAuditionDialogViewModel.cs @@ -1,7 +1,6 @@ using System; using System.Runtime.InteropServices; using Correlator.DataService; -using Correlator.Events; using Correlator.Util; using NAudio.CoreAudioApi; using Prism.Commands; @@ -55,18 +54,6 @@ } } - private double _noiseValue; - - public double NoiseValue - { - get => _noiseValue; - set - { - _noiseValue = value; - RaisePropertyChanged(); - } - } - #endregion #region DelegateCommand @@ -192,9 +179,6 @@ IsBlueRecording = true; } }); - - //实时显示噪声值 - eventAggregator.GetEvent().Subscribe(delegate(double value) { NoiseValue = value; }); } /// diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj index 7ad9570..21ce7a9 100644 --- a/Correlator/Correlator.csproj +++ b/Correlator/Correlator.csproj @@ -262,7 +262,6 @@ - diff --git a/Correlator/DataService/SerialPortServiceImpl.cs b/Correlator/DataService/SerialPortServiceImpl.cs index 0107b9c..423d7d5 100644 --- a/Correlator/DataService/SerialPortServiceImpl.cs +++ b/Correlator/DataService/SerialPortServiceImpl.cs @@ -284,10 +284,6 @@ realData[i] = dStr.HexToDouble(); } - var noiseValue = 0.0; - Array.ForEach(realData, i => noiseValue += Math.Abs(i)); - _eventAggregator.GetEvent().Publish(noiseValue); - //PCM数据 var pcm = new byte[7500 * 3]; //每个采样点2字节 diff --git a/Correlator/Dialog/SimplyAuditionDialog.xaml b/Correlator/Dialog/SimplyAuditionDialog.xaml index 7cb37f2..5ae471a 100644 --- a/Correlator/Dialog/SimplyAuditionDialog.xaml +++ b/Correlator/Dialog/SimplyAuditionDialog.xaml @@ -83,25 +83,6 @@ Foreground="#cecece" Text="Judgment By Pipe Listening" /> - - - - - - - - - - - diff --git a/Correlator/Events/NoiseValueEvent.cs b/Correlator/Events/NoiseValueEvent.cs deleted file mode 100644 index e5ec8fd..0000000 --- a/Correlator/Events/NoiseValueEvent.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Prism.Events; - -namespace Correlator.Events -{ - public class NoiseValueEvent : PubSubEvent - { - } -} \ No newline at end of file diff --git a/Correlator/ViewModels/SimplyAuditionDialogViewModel.cs b/Correlator/ViewModels/SimplyAuditionDialogViewModel.cs index 62a098e..c1ed2d0 100644 --- a/Correlator/ViewModels/SimplyAuditionDialogViewModel.cs +++ b/Correlator/ViewModels/SimplyAuditionDialogViewModel.cs @@ -1,7 +1,6 @@ using System; using System.Runtime.InteropServices; using Correlator.DataService; -using Correlator.Events; using Correlator.Util; using NAudio.CoreAudioApi; using Prism.Commands; @@ -55,18 +54,6 @@ } } - private double _noiseValue; - - public double NoiseValue - { - get => _noiseValue; - set - { - _noiseValue = value; - RaisePropertyChanged(); - } - } - #endregion #region DelegateCommand @@ -192,9 +179,6 @@ IsBlueRecording = true; } }); - - //实时显示噪声值 - eventAggregator.GetEvent().Subscribe(delegate(double value) { NoiseValue = value; }); } /// diff --git a/Correlator/Views/MainWindow.xaml b/Correlator/Views/MainWindow.xaml index daa6db7..3e4a8ab 100644 --- a/Correlator/Views/MainWindow.xaml +++ b/Correlator/Views/MainWindow.xaml @@ -14,8 +14,8 @@ MinWidth="1366" MinHeight="768" d:DataContext="{d:DesignInstance Type=vm:MainWindowViewModel}" - d:DesignHeight="1080" - d:DesignWidth="1920" + d:DesignHeight="768" + d:DesignWidth="1366" Background="#EBECF0" WindowStartupLocation="CenterScreen" WindowState="Maximized" @@ -37,7 +37,7 @@ - + @@ -941,6 +941,7 @@ - + - +