diff --git a/Correlator/App.xaml.cs b/Correlator/App.xaml.cs index 84de221..ec5c38b 100644 --- a/Correlator/App.xaml.cs +++ b/Correlator/App.xaml.cs @@ -50,6 +50,7 @@ containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); + containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); diff --git a/Correlator/App.xaml.cs b/Correlator/App.xaml.cs index 84de221..ec5c38b 100644 --- a/Correlator/App.xaml.cs +++ b/Correlator/App.xaml.cs @@ -50,6 +50,7 @@ containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); + containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj index 21ce7a9..53b113f 100644 --- a/Correlator/Correlator.csproj +++ b/Correlator/Correlator.csproj @@ -249,6 +249,9 @@ LoadingDialog.xaml + + NoiseWaveView.xaml + NumericKeypadDialog.xaml @@ -310,6 +313,7 @@ + @@ -341,6 +345,9 @@ MSBuild:Compile + + Designer + diff --git a/Correlator/App.xaml.cs b/Correlator/App.xaml.cs index 84de221..ec5c38b 100644 --- a/Correlator/App.xaml.cs +++ b/Correlator/App.xaml.cs @@ -50,6 +50,7 @@ containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); + containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj index 21ce7a9..53b113f 100644 --- a/Correlator/Correlator.csproj +++ b/Correlator/Correlator.csproj @@ -249,6 +249,9 @@ LoadingDialog.xaml + + NoiseWaveView.xaml + NumericKeypadDialog.xaml @@ -310,6 +313,7 @@ + @@ -341,6 +345,9 @@ MSBuild:Compile + + Designer + diff --git a/Correlator/ViewModels/MainWindowViewModel.cs b/Correlator/ViewModels/MainWindowViewModel.cs index 426b759..61c0f4b 100644 --- a/Correlator/ViewModels/MainWindowViewModel.cs +++ b/Correlator/ViewModels/MainWindowViewModel.cs @@ -448,6 +448,7 @@ public DelegateCommand OpenImageFileCommand { private set; get; } public DelegateCommand OpenAudioFileCommand { private set; get; } public DelegateCommand OpenListenAudioCommand { private set; get; } + public DelegateCommand ShowWaveCommand { private set; get; } public DelegateCommand OpenNumericKeypadCommand { private set; get; } public DelegateCommand PipeItemSelectedCommand { set; get; } public DelegateCommand DetectNoiseCommand { private set; get; } @@ -917,6 +918,18 @@ } }); + //打开Matlab波形 + ShowWaveCommand = new DelegateCommand(delegate + { + if (RuntimeCache.CorrelatorData == null) + { + ShowAlertMessageDialog(AlertType.Error, "温馨提示", "请先采集数据"); + return; + } + + _dialogService.ShowDialog("NoiseWaveView", null, delegate { }); + }); + //打开数字键盘 OpenNumericKeypadCommand = new DelegateCommand(delegate { diff --git a/Correlator/App.xaml.cs b/Correlator/App.xaml.cs index 84de221..ec5c38b 100644 --- a/Correlator/App.xaml.cs +++ b/Correlator/App.xaml.cs @@ -50,6 +50,7 @@ containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); + containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj index 21ce7a9..53b113f 100644 --- a/Correlator/Correlator.csproj +++ b/Correlator/Correlator.csproj @@ -249,6 +249,9 @@ LoadingDialog.xaml + + NoiseWaveView.xaml + NumericKeypadDialog.xaml @@ -310,6 +313,7 @@ + @@ -341,6 +345,9 @@ MSBuild:Compile + + Designer + diff --git a/Correlator/ViewModels/MainWindowViewModel.cs b/Correlator/ViewModels/MainWindowViewModel.cs index 426b759..61c0f4b 100644 --- a/Correlator/ViewModels/MainWindowViewModel.cs +++ b/Correlator/ViewModels/MainWindowViewModel.cs @@ -448,6 +448,7 @@ public DelegateCommand OpenImageFileCommand { private set; get; } public DelegateCommand OpenAudioFileCommand { private set; get; } public DelegateCommand OpenListenAudioCommand { private set; get; } + public DelegateCommand ShowWaveCommand { private set; get; } public DelegateCommand OpenNumericKeypadCommand { private set; get; } public DelegateCommand PipeItemSelectedCommand { set; get; } public DelegateCommand DetectNoiseCommand { private set; get; } @@ -917,6 +918,18 @@ } }); + //打开Matlab波形 + ShowWaveCommand = new DelegateCommand(delegate + { + if (RuntimeCache.CorrelatorData == null) + { + ShowAlertMessageDialog(AlertType.Error, "温馨提示", "请先采集数据"); + return; + } + + _dialogService.ShowDialog("NoiseWaveView", null, delegate { }); + }); + //打开数字键盘 OpenNumericKeypadCommand = new DelegateCommand(delegate { diff --git a/Correlator/ViewModels/NoiseWaveViewViewModel.cs b/Correlator/ViewModels/NoiseWaveViewViewModel.cs new file mode 100644 index 0000000..685f712 --- /dev/null +++ b/Correlator/ViewModels/NoiseWaveViewViewModel.cs @@ -0,0 +1,45 @@ +using System; +using Prism.Commands; +using Prism.Mvvm; +using Prism.Services.Dialogs; + +namespace Correlator.ViewModels +{ + public class NoiseWaveViewViewModel : BindableBase, IDialogAware + { + public event Action RequestClose; + + #region VM + + public string Title => "传感器原始数据波形"; + + #endregion + + #region DelegateCommand + + public DelegateCommand GoBackCommand { get; set; } + + #endregion + + public NoiseWaveViewViewModel() + { + GoBackCommand = new DelegateCommand(delegate + { + RequestClose?.Invoke(new DialogResult(ButtonResult.Cancel)); + }); + } + + public bool CanCloseDialog() + { + return true; + } + + public void OnDialogClosed() + { + } + + public void OnDialogOpened(IDialogParameters parameters) + { + } + } +} \ No newline at end of file diff --git a/Correlator/App.xaml.cs b/Correlator/App.xaml.cs index 84de221..ec5c38b 100644 --- a/Correlator/App.xaml.cs +++ b/Correlator/App.xaml.cs @@ -50,6 +50,7 @@ containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); + containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); containerRegistry.RegisterDialog(); diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj index 21ce7a9..53b113f 100644 --- a/Correlator/Correlator.csproj +++ b/Correlator/Correlator.csproj @@ -249,6 +249,9 @@ LoadingDialog.xaml + + NoiseWaveView.xaml + NumericKeypadDialog.xaml @@ -310,6 +313,7 @@ + @@ -341,6 +345,9 @@ MSBuild:Compile + + Designer + diff --git a/Correlator/ViewModels/MainWindowViewModel.cs b/Correlator/ViewModels/MainWindowViewModel.cs index 426b759..61c0f4b 100644 --- a/Correlator/ViewModels/MainWindowViewModel.cs +++ b/Correlator/ViewModels/MainWindowViewModel.cs @@ -448,6 +448,7 @@ public DelegateCommand OpenImageFileCommand { private set; get; } public DelegateCommand OpenAudioFileCommand { private set; get; } public DelegateCommand OpenListenAudioCommand { private set; get; } + public DelegateCommand ShowWaveCommand { private set; get; } public DelegateCommand OpenNumericKeypadCommand { private set; get; } public DelegateCommand PipeItemSelectedCommand { set; get; } public DelegateCommand DetectNoiseCommand { private set; get; } @@ -917,6 +918,18 @@ } }); + //打开Matlab波形 + ShowWaveCommand = new DelegateCommand(delegate + { + if (RuntimeCache.CorrelatorData == null) + { + ShowAlertMessageDialog(AlertType.Error, "温馨提示", "请先采集数据"); + return; + } + + _dialogService.ShowDialog("NoiseWaveView", null, delegate { }); + }); + //打开数字键盘 OpenNumericKeypadCommand = new DelegateCommand(delegate { diff --git a/Correlator/ViewModels/NoiseWaveViewViewModel.cs b/Correlator/ViewModels/NoiseWaveViewViewModel.cs new file mode 100644 index 0000000..685f712 --- /dev/null +++ b/Correlator/ViewModels/NoiseWaveViewViewModel.cs @@ -0,0 +1,45 @@ +using System; +using Prism.Commands; +using Prism.Mvvm; +using Prism.Services.Dialogs; + +namespace Correlator.ViewModels +{ + public class NoiseWaveViewViewModel : BindableBase, IDialogAware + { + public event Action RequestClose; + + #region VM + + public string Title => "传感器原始数据波形"; + + #endregion + + #region DelegateCommand + + public DelegateCommand GoBackCommand { get; set; } + + #endregion + + public NoiseWaveViewViewModel() + { + GoBackCommand = new DelegateCommand(delegate + { + RequestClose?.Invoke(new DialogResult(ButtonResult.Cancel)); + }); + } + + public bool CanCloseDialog() + { + return true; + } + + public void OnDialogClosed() + { + } + + public void OnDialogOpened(IDialogParameters parameters) + { + } + } +} \ No newline at end of file diff --git a/Correlator/Views/MainWindow.xaml b/Correlator/Views/MainWindow.xaml index 3e4a8ab..16ed6f0 100644 --- a/Correlator/Views/MainWindow.xaml +++ b/Correlator/Views/MainWindow.xaml @@ -451,32 +451,51 @@ BorderThickness="1"> - - - - + + + + - + + + + + + + + - + +