diff --git a/Correlator/Dialog/CheckResponseDialog.xaml b/Correlator/Dialog/CheckResponseDialog.xaml
index 498a4d9..a571920 100644
--- a/Correlator/Dialog/CheckResponseDialog.xaml
+++ b/Correlator/Dialog/CheckResponseDialog.xaml
@@ -8,19 +8,18 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:prism="http://prismlibrary.com/"
xmlns:vm="clr-namespace:Correlator.ViewModels"
- Width="800"
- Height="660"
+ Width="760"
+ Height="640"
d:DataContext="{d:DesignInstance Type=vm:CheckResponseDialogViewModel}"
+ Background="White"
mc:Ignorable="d">
@@ -28,172 +27,143 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
+
-
-
-
-
-
+
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+ FontSize="16" />
+
+
-
-
-
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Correlator/Dialog/CheckResponseDialog.xaml b/Correlator/Dialog/CheckResponseDialog.xaml
index 498a4d9..a571920 100644
--- a/Correlator/Dialog/CheckResponseDialog.xaml
+++ b/Correlator/Dialog/CheckResponseDialog.xaml
@@ -8,19 +8,18 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:prism="http://prismlibrary.com/"
xmlns:vm="clr-namespace:Correlator.ViewModels"
- Width="800"
- Height="660"
+ Width="760"
+ Height="640"
d:DataContext="{d:DesignInstance Type=vm:CheckResponseDialogViewModel}"
+ Background="White"
mc:Ignorable="d">
@@ -28,172 +27,143 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
+
-
-
-
-
-
+
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+ FontSize="16" />
+
+
-
-
-
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Correlator/Dialog/DetectNoiseDialog.xaml b/Correlator/Dialog/DetectNoiseDialog.xaml
index 56626ad..e1f3b34 100644
--- a/Correlator/Dialog/DetectNoiseDialog.xaml
+++ b/Correlator/Dialog/DetectNoiseDialog.xaml
@@ -9,179 +9,137 @@
Width="560"
Height="400"
d:DataContext="{d:DesignInstance Type=vm:DetectNoiseDialogViewModel}"
+ Background="White"
mc:Ignorable="d">
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/Dialog/CheckResponseDialog.xaml b/Correlator/Dialog/CheckResponseDialog.xaml
index 498a4d9..a571920 100644
--- a/Correlator/Dialog/CheckResponseDialog.xaml
+++ b/Correlator/Dialog/CheckResponseDialog.xaml
@@ -8,19 +8,18 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:prism="http://prismlibrary.com/"
xmlns:vm="clr-namespace:Correlator.ViewModels"
- Width="800"
- Height="660"
+ Width="760"
+ Height="640"
d:DataContext="{d:DesignInstance Type=vm:CheckResponseDialogViewModel}"
+ Background="White"
mc:Ignorable="d">
@@ -28,172 +27,143 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
+
-
-
-
-
-
+
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+ FontSize="16" />
+
+
-
-
-
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Correlator/Dialog/DetectNoiseDialog.xaml b/Correlator/Dialog/DetectNoiseDialog.xaml
index 56626ad..e1f3b34 100644
--- a/Correlator/Dialog/DetectNoiseDialog.xaml
+++ b/Correlator/Dialog/DetectNoiseDialog.xaml
@@ -9,179 +9,137 @@
Width="560"
Height="400"
d:DataContext="{d:DesignInstance Type=vm:DetectNoiseDialogViewModel}"
+ Background="White"
mc:Ignorable="d">
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/Dialog/SimplyAuditionDialog.xaml b/Correlator/Dialog/SimplyAuditionDialog.xaml
index 14eb385..8c1f422 100644
--- a/Correlator/Dialog/SimplyAuditionDialog.xaml
+++ b/Correlator/Dialog/SimplyAuditionDialog.xaml
@@ -10,6 +10,7 @@
Width="600"
Height="500"
d:DataContext="{d:DesignInstance Type=vm:SimplyAuditionDialogViewModel}"
+ Background="White"
Loaded="SimplyAuditionDialog_OnLoaded"
Unloaded="SimplyAuditionDialog_OnUnloaded"
mc:Ignorable="d">
@@ -18,10 +19,8 @@
@@ -30,188 +29,138 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+
-
+ Width="125"
+ Source="/Correlator;component/Image/tyl_icon6.png" />
+
+
+ Grid.Row="2"
+ Margin="10"
+ HorizontalAlignment="Stretch"
+ Command="{Binding ListenRedSensorCommand}"
+ Content="听红色传感器"
+ FontSize="14" />
+
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
-
-
-
-
-
+
-
+ BorderThickness="1"
+ CornerRadius="5">
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/Dialog/CheckResponseDialog.xaml b/Correlator/Dialog/CheckResponseDialog.xaml
index 498a4d9..a571920 100644
--- a/Correlator/Dialog/CheckResponseDialog.xaml
+++ b/Correlator/Dialog/CheckResponseDialog.xaml
@@ -8,19 +8,18 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:prism="http://prismlibrary.com/"
xmlns:vm="clr-namespace:Correlator.ViewModels"
- Width="800"
- Height="660"
+ Width="760"
+ Height="640"
d:DataContext="{d:DesignInstance Type=vm:CheckResponseDialogViewModel}"
+ Background="White"
mc:Ignorable="d">
@@ -28,172 +27,143 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
+
-
-
-
-
-
+
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+ FontSize="16" />
+
+
-
-
-
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Correlator/Dialog/DetectNoiseDialog.xaml b/Correlator/Dialog/DetectNoiseDialog.xaml
index 56626ad..e1f3b34 100644
--- a/Correlator/Dialog/DetectNoiseDialog.xaml
+++ b/Correlator/Dialog/DetectNoiseDialog.xaml
@@ -9,179 +9,137 @@
Width="560"
Height="400"
d:DataContext="{d:DesignInstance Type=vm:DetectNoiseDialogViewModel}"
+ Background="White"
mc:Ignorable="d">
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/Dialog/SimplyAuditionDialog.xaml b/Correlator/Dialog/SimplyAuditionDialog.xaml
index 14eb385..8c1f422 100644
--- a/Correlator/Dialog/SimplyAuditionDialog.xaml
+++ b/Correlator/Dialog/SimplyAuditionDialog.xaml
@@ -10,6 +10,7 @@
Width="600"
Height="500"
d:DataContext="{d:DesignInstance Type=vm:SimplyAuditionDialogViewModel}"
+ Background="White"
Loaded="SimplyAuditionDialog_OnLoaded"
Unloaded="SimplyAuditionDialog_OnUnloaded"
mc:Ignorable="d">
@@ -18,10 +19,8 @@
@@ -30,188 +29,138 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+
-
+ Width="125"
+ Source="/Correlator;component/Image/tyl_icon6.png" />
+
+
+ Grid.Row="2"
+ Margin="10"
+ HorizontalAlignment="Stretch"
+ Command="{Binding ListenRedSensorCommand}"
+ Content="听红色传感器"
+ FontSize="14" />
+
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
-
-
-
-
-
+
-
+ BorderThickness="1"
+ CornerRadius="5">
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/ViewModels/AudioFileDialogViewModel.cs b/Correlator/ViewModels/AudioFileDialogViewModel.cs
index 7fe47ae..b5efbd8 100644
--- a/Correlator/ViewModels/AudioFileDialogViewModel.cs
+++ b/Correlator/ViewModels/AudioFileDialogViewModel.cs
@@ -22,7 +22,12 @@
#region 属性绑定
public string Title => "音频文件列表";
- public event Action RequestClose;
+
+ public event Action RequestClose
+ {
+ add { }
+ remove { }
+ }
private List _audioFiles;
diff --git a/Correlator/Dialog/CheckResponseDialog.xaml b/Correlator/Dialog/CheckResponseDialog.xaml
index 498a4d9..a571920 100644
--- a/Correlator/Dialog/CheckResponseDialog.xaml
+++ b/Correlator/Dialog/CheckResponseDialog.xaml
@@ -8,19 +8,18 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:prism="http://prismlibrary.com/"
xmlns:vm="clr-namespace:Correlator.ViewModels"
- Width="800"
- Height="660"
+ Width="760"
+ Height="640"
d:DataContext="{d:DesignInstance Type=vm:CheckResponseDialogViewModel}"
+ Background="White"
mc:Ignorable="d">
@@ -28,172 +27,143 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
+
-
-
-
-
-
+
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+ FontSize="16" />
+
+
-
-
-
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Correlator/Dialog/DetectNoiseDialog.xaml b/Correlator/Dialog/DetectNoiseDialog.xaml
index 56626ad..e1f3b34 100644
--- a/Correlator/Dialog/DetectNoiseDialog.xaml
+++ b/Correlator/Dialog/DetectNoiseDialog.xaml
@@ -9,179 +9,137 @@
Width="560"
Height="400"
d:DataContext="{d:DesignInstance Type=vm:DetectNoiseDialogViewModel}"
+ Background="White"
mc:Ignorable="d">
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/Dialog/SimplyAuditionDialog.xaml b/Correlator/Dialog/SimplyAuditionDialog.xaml
index 14eb385..8c1f422 100644
--- a/Correlator/Dialog/SimplyAuditionDialog.xaml
+++ b/Correlator/Dialog/SimplyAuditionDialog.xaml
@@ -10,6 +10,7 @@
Width="600"
Height="500"
d:DataContext="{d:DesignInstance Type=vm:SimplyAuditionDialogViewModel}"
+ Background="White"
Loaded="SimplyAuditionDialog_OnLoaded"
Unloaded="SimplyAuditionDialog_OnUnloaded"
mc:Ignorable="d">
@@ -18,10 +19,8 @@
@@ -30,188 +29,138 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+
-
+ Width="125"
+ Source="/Correlator;component/Image/tyl_icon6.png" />
+
+
+ Grid.Row="2"
+ Margin="10"
+ HorizontalAlignment="Stretch"
+ Command="{Binding ListenRedSensorCommand}"
+ Content="听红色传感器"
+ FontSize="14" />
+
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
-
-
-
-
-
+
-
+ BorderThickness="1"
+ CornerRadius="5">
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/ViewModels/AudioFileDialogViewModel.cs b/Correlator/ViewModels/AudioFileDialogViewModel.cs
index 7fe47ae..b5efbd8 100644
--- a/Correlator/ViewModels/AudioFileDialogViewModel.cs
+++ b/Correlator/ViewModels/AudioFileDialogViewModel.cs
@@ -22,7 +22,12 @@
#region 属性绑定
public string Title => "音频文件列表";
- public event Action RequestClose;
+
+ public event Action RequestClose
+ {
+ add { }
+ remove { }
+ }
private List _audioFiles;
diff --git a/Correlator/ViewModels/CheckResponseDialogViewModel.cs b/Correlator/ViewModels/CheckResponseDialogViewModel.cs
index acfd65e..22fa6a3 100644
--- a/Correlator/ViewModels/CheckResponseDialogViewModel.cs
+++ b/Correlator/ViewModels/CheckResponseDialogViewModel.cs
@@ -9,7 +9,7 @@
{
public event Action RequestClose;
- public string Title { get; set; } = string.Empty;
+ public string Title => "水听器信号清点";
public CheckResponseDialogViewModel(IEventAggregator eventAggregator)
{
diff --git a/Correlator/Dialog/CheckResponseDialog.xaml b/Correlator/Dialog/CheckResponseDialog.xaml
index 498a4d9..a571920 100644
--- a/Correlator/Dialog/CheckResponseDialog.xaml
+++ b/Correlator/Dialog/CheckResponseDialog.xaml
@@ -8,19 +8,18 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:prism="http://prismlibrary.com/"
xmlns:vm="clr-namespace:Correlator.ViewModels"
- Width="800"
- Height="660"
+ Width="760"
+ Height="640"
d:DataContext="{d:DesignInstance Type=vm:CheckResponseDialogViewModel}"
+ Background="White"
mc:Ignorable="d">
@@ -28,172 +27,143 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
+
-
-
-
-
-
+
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+ FontSize="16" />
+
+
-
-
-
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Correlator/Dialog/DetectNoiseDialog.xaml b/Correlator/Dialog/DetectNoiseDialog.xaml
index 56626ad..e1f3b34 100644
--- a/Correlator/Dialog/DetectNoiseDialog.xaml
+++ b/Correlator/Dialog/DetectNoiseDialog.xaml
@@ -9,179 +9,137 @@
Width="560"
Height="400"
d:DataContext="{d:DesignInstance Type=vm:DetectNoiseDialogViewModel}"
+ Background="White"
mc:Ignorable="d">
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/Dialog/SimplyAuditionDialog.xaml b/Correlator/Dialog/SimplyAuditionDialog.xaml
index 14eb385..8c1f422 100644
--- a/Correlator/Dialog/SimplyAuditionDialog.xaml
+++ b/Correlator/Dialog/SimplyAuditionDialog.xaml
@@ -10,6 +10,7 @@
Width="600"
Height="500"
d:DataContext="{d:DesignInstance Type=vm:SimplyAuditionDialogViewModel}"
+ Background="White"
Loaded="SimplyAuditionDialog_OnLoaded"
Unloaded="SimplyAuditionDialog_OnUnloaded"
mc:Ignorable="d">
@@ -18,10 +19,8 @@
@@ -30,188 +29,138 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+
-
+ Width="125"
+ Source="/Correlator;component/Image/tyl_icon6.png" />
+
+
+ Grid.Row="2"
+ Margin="10"
+ HorizontalAlignment="Stretch"
+ Command="{Binding ListenRedSensorCommand}"
+ Content="听红色传感器"
+ FontSize="14" />
+
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
-
-
-
-
-
+
-
+ BorderThickness="1"
+ CornerRadius="5">
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/ViewModels/AudioFileDialogViewModel.cs b/Correlator/ViewModels/AudioFileDialogViewModel.cs
index 7fe47ae..b5efbd8 100644
--- a/Correlator/ViewModels/AudioFileDialogViewModel.cs
+++ b/Correlator/ViewModels/AudioFileDialogViewModel.cs
@@ -22,7 +22,12 @@
#region 属性绑定
public string Title => "音频文件列表";
- public event Action RequestClose;
+
+ public event Action RequestClose
+ {
+ add { }
+ remove { }
+ }
private List _audioFiles;
diff --git a/Correlator/ViewModels/CheckResponseDialogViewModel.cs b/Correlator/ViewModels/CheckResponseDialogViewModel.cs
index acfd65e..22fa6a3 100644
--- a/Correlator/ViewModels/CheckResponseDialogViewModel.cs
+++ b/Correlator/ViewModels/CheckResponseDialogViewModel.cs
@@ -9,7 +9,7 @@
{
public event Action RequestClose;
- public string Title { get; set; } = string.Empty;
+ public string Title => "水听器信号清点";
public CheckResponseDialogViewModel(IEventAggregator eventAggregator)
{
diff --git a/Correlator/ViewModels/DetectNoiseDialogViewModel.cs b/Correlator/ViewModels/DetectNoiseDialogViewModel.cs
index b02d5d6..78b0730 100644
--- a/Correlator/ViewModels/DetectNoiseDialogViewModel.cs
+++ b/Correlator/ViewModels/DetectNoiseDialogViewModel.cs
@@ -13,11 +13,15 @@
{
public class DetectNoiseDialogViewModel : BindableBase, IDialogAware
{
- public event Action RequestClose;
+ public event Action RequestClose
+ {
+ add { }
+ remove { }
+ }
#region VM
- public string Title { get; private set; } = string.Empty;
+ public string Title => "管道噪声调查";
private double _leftNoiseValue;
@@ -59,7 +63,6 @@
#region DelegateCommand
- public DelegateCommand GoBackCommand { get; }
public DelegateCommand DetectNoiseCommand { get; }
#endregion
@@ -86,21 +89,9 @@
RightNoiseValue = model.RightNoiseSumValue;
});
- GoBackCommand = new DelegateCommand(GoBack);
DetectNoiseCommand = new DelegateCommand(DetectNoise);
}
- private void GoBack()
- {
- if (_detectTimer.IsEnabled)
- {
- _detectTimer.Stop();
- DetectState = "开始调查";
- }
-
- RequestClose?.Invoke(new DialogResult(ButtonResult.Cancel));
- }
-
private void DetectNoise()
{
if (_detectTimer.IsEnabled)
@@ -131,6 +122,10 @@
public void OnDialogClosed()
{
+ if (_detectTimer.IsEnabled)
+ {
+ _detectTimer.Stop();
+ }
}
public void OnDialogOpened(IDialogParameters parameters)
diff --git a/Correlator/Dialog/CheckResponseDialog.xaml b/Correlator/Dialog/CheckResponseDialog.xaml
index 498a4d9..a571920 100644
--- a/Correlator/Dialog/CheckResponseDialog.xaml
+++ b/Correlator/Dialog/CheckResponseDialog.xaml
@@ -8,19 +8,18 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:prism="http://prismlibrary.com/"
xmlns:vm="clr-namespace:Correlator.ViewModels"
- Width="800"
- Height="660"
+ Width="760"
+ Height="640"
d:DataContext="{d:DesignInstance Type=vm:CheckResponseDialogViewModel}"
+ Background="White"
mc:Ignorable="d">
@@ -28,172 +27,143 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
+
-
-
-
-
-
+
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+ FontSize="16" />
+
+
-
-
-
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Correlator/Dialog/DetectNoiseDialog.xaml b/Correlator/Dialog/DetectNoiseDialog.xaml
index 56626ad..e1f3b34 100644
--- a/Correlator/Dialog/DetectNoiseDialog.xaml
+++ b/Correlator/Dialog/DetectNoiseDialog.xaml
@@ -9,179 +9,137 @@
Width="560"
Height="400"
d:DataContext="{d:DesignInstance Type=vm:DetectNoiseDialogViewModel}"
+ Background="White"
mc:Ignorable="d">
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/Dialog/SimplyAuditionDialog.xaml b/Correlator/Dialog/SimplyAuditionDialog.xaml
index 14eb385..8c1f422 100644
--- a/Correlator/Dialog/SimplyAuditionDialog.xaml
+++ b/Correlator/Dialog/SimplyAuditionDialog.xaml
@@ -10,6 +10,7 @@
Width="600"
Height="500"
d:DataContext="{d:DesignInstance Type=vm:SimplyAuditionDialogViewModel}"
+ Background="White"
Loaded="SimplyAuditionDialog_OnLoaded"
Unloaded="SimplyAuditionDialog_OnUnloaded"
mc:Ignorable="d">
@@ -18,10 +19,8 @@
@@ -30,188 +29,138 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+
-
+ Width="125"
+ Source="/Correlator;component/Image/tyl_icon6.png" />
+
+
+ Grid.Row="2"
+ Margin="10"
+ HorizontalAlignment="Stretch"
+ Command="{Binding ListenRedSensorCommand}"
+ Content="听红色传感器"
+ FontSize="14" />
+
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
-
-
-
-
-
+
-
+ BorderThickness="1"
+ CornerRadius="5">
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/ViewModels/AudioFileDialogViewModel.cs b/Correlator/ViewModels/AudioFileDialogViewModel.cs
index 7fe47ae..b5efbd8 100644
--- a/Correlator/ViewModels/AudioFileDialogViewModel.cs
+++ b/Correlator/ViewModels/AudioFileDialogViewModel.cs
@@ -22,7 +22,12 @@
#region 属性绑定
public string Title => "音频文件列表";
- public event Action RequestClose;
+
+ public event Action RequestClose
+ {
+ add { }
+ remove { }
+ }
private List _audioFiles;
diff --git a/Correlator/ViewModels/CheckResponseDialogViewModel.cs b/Correlator/ViewModels/CheckResponseDialogViewModel.cs
index acfd65e..22fa6a3 100644
--- a/Correlator/ViewModels/CheckResponseDialogViewModel.cs
+++ b/Correlator/ViewModels/CheckResponseDialogViewModel.cs
@@ -9,7 +9,7 @@
{
public event Action RequestClose;
- public string Title { get; set; } = string.Empty;
+ public string Title => "水听器信号清点";
public CheckResponseDialogViewModel(IEventAggregator eventAggregator)
{
diff --git a/Correlator/ViewModels/DetectNoiseDialogViewModel.cs b/Correlator/ViewModels/DetectNoiseDialogViewModel.cs
index b02d5d6..78b0730 100644
--- a/Correlator/ViewModels/DetectNoiseDialogViewModel.cs
+++ b/Correlator/ViewModels/DetectNoiseDialogViewModel.cs
@@ -13,11 +13,15 @@
{
public class DetectNoiseDialogViewModel : BindableBase, IDialogAware
{
- public event Action RequestClose;
+ public event Action RequestClose
+ {
+ add { }
+ remove { }
+ }
#region VM
- public string Title { get; private set; } = string.Empty;
+ public string Title => "管道噪声调查";
private double _leftNoiseValue;
@@ -59,7 +63,6 @@
#region DelegateCommand
- public DelegateCommand GoBackCommand { get; }
public DelegateCommand DetectNoiseCommand { get; }
#endregion
@@ -86,21 +89,9 @@
RightNoiseValue = model.RightNoiseSumValue;
});
- GoBackCommand = new DelegateCommand(GoBack);
DetectNoiseCommand = new DelegateCommand(DetectNoise);
}
- private void GoBack()
- {
- if (_detectTimer.IsEnabled)
- {
- _detectTimer.Stop();
- DetectState = "开始调查";
- }
-
- RequestClose?.Invoke(new DialogResult(ButtonResult.Cancel));
- }
-
private void DetectNoise()
{
if (_detectTimer.IsEnabled)
@@ -131,6 +122,10 @@
public void OnDialogClosed()
{
+ if (_detectTimer.IsEnabled)
+ {
+ _detectTimer.Stop();
+ }
}
public void OnDialogOpened(IDialogParameters parameters)
diff --git a/Correlator/ViewModels/PictureFileDialogViewModel.cs b/Correlator/ViewModels/PictureFileDialogViewModel.cs
index 895a20e..a2e1364 100644
--- a/Correlator/ViewModels/PictureFileDialogViewModel.cs
+++ b/Correlator/ViewModels/PictureFileDialogViewModel.cs
@@ -19,7 +19,13 @@
#region 属性绑定
public string Title => "图片文件列表";
- public event Action RequestClose;
+
+ public event Action RequestClose
+ {
+ add { }
+ remove { }
+ }
+
private List _pictureFiles;
public List PictureFiles
diff --git a/Correlator/Dialog/CheckResponseDialog.xaml b/Correlator/Dialog/CheckResponseDialog.xaml
index 498a4d9..a571920 100644
--- a/Correlator/Dialog/CheckResponseDialog.xaml
+++ b/Correlator/Dialog/CheckResponseDialog.xaml
@@ -8,19 +8,18 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:prism="http://prismlibrary.com/"
xmlns:vm="clr-namespace:Correlator.ViewModels"
- Width="800"
- Height="660"
+ Width="760"
+ Height="640"
d:DataContext="{d:DesignInstance Type=vm:CheckResponseDialogViewModel}"
+ Background="White"
mc:Ignorable="d">
@@ -28,172 +27,143 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
+
-
-
-
-
-
+
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+ FontSize="16" />
+
+
-
-
-
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Correlator/Dialog/DetectNoiseDialog.xaml b/Correlator/Dialog/DetectNoiseDialog.xaml
index 56626ad..e1f3b34 100644
--- a/Correlator/Dialog/DetectNoiseDialog.xaml
+++ b/Correlator/Dialog/DetectNoiseDialog.xaml
@@ -9,179 +9,137 @@
Width="560"
Height="400"
d:DataContext="{d:DesignInstance Type=vm:DetectNoiseDialogViewModel}"
+ Background="White"
mc:Ignorable="d">
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/Dialog/SimplyAuditionDialog.xaml b/Correlator/Dialog/SimplyAuditionDialog.xaml
index 14eb385..8c1f422 100644
--- a/Correlator/Dialog/SimplyAuditionDialog.xaml
+++ b/Correlator/Dialog/SimplyAuditionDialog.xaml
@@ -10,6 +10,7 @@
Width="600"
Height="500"
d:DataContext="{d:DesignInstance Type=vm:SimplyAuditionDialogViewModel}"
+ Background="White"
Loaded="SimplyAuditionDialog_OnLoaded"
Unloaded="SimplyAuditionDialog_OnUnloaded"
mc:Ignorable="d">
@@ -18,10 +19,8 @@
@@ -30,188 +29,138 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+
-
+ Width="125"
+ Source="/Correlator;component/Image/tyl_icon6.png" />
+
+
+ Grid.Row="2"
+ Margin="10"
+ HorizontalAlignment="Stretch"
+ Command="{Binding ListenRedSensorCommand}"
+ Content="听红色传感器"
+ FontSize="14" />
+
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
-
-
-
-
-
+
-
+ BorderThickness="1"
+ CornerRadius="5">
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/ViewModels/AudioFileDialogViewModel.cs b/Correlator/ViewModels/AudioFileDialogViewModel.cs
index 7fe47ae..b5efbd8 100644
--- a/Correlator/ViewModels/AudioFileDialogViewModel.cs
+++ b/Correlator/ViewModels/AudioFileDialogViewModel.cs
@@ -22,7 +22,12 @@
#region 属性绑定
public string Title => "音频文件列表";
- public event Action RequestClose;
+
+ public event Action RequestClose
+ {
+ add { }
+ remove { }
+ }
private List _audioFiles;
diff --git a/Correlator/ViewModels/CheckResponseDialogViewModel.cs b/Correlator/ViewModels/CheckResponseDialogViewModel.cs
index acfd65e..22fa6a3 100644
--- a/Correlator/ViewModels/CheckResponseDialogViewModel.cs
+++ b/Correlator/ViewModels/CheckResponseDialogViewModel.cs
@@ -9,7 +9,7 @@
{
public event Action RequestClose;
- public string Title { get; set; } = string.Empty;
+ public string Title => "水听器信号清点";
public CheckResponseDialogViewModel(IEventAggregator eventAggregator)
{
diff --git a/Correlator/ViewModels/DetectNoiseDialogViewModel.cs b/Correlator/ViewModels/DetectNoiseDialogViewModel.cs
index b02d5d6..78b0730 100644
--- a/Correlator/ViewModels/DetectNoiseDialogViewModel.cs
+++ b/Correlator/ViewModels/DetectNoiseDialogViewModel.cs
@@ -13,11 +13,15 @@
{
public class DetectNoiseDialogViewModel : BindableBase, IDialogAware
{
- public event Action RequestClose;
+ public event Action RequestClose
+ {
+ add { }
+ remove { }
+ }
#region VM
- public string Title { get; private set; } = string.Empty;
+ public string Title => "管道噪声调查";
private double _leftNoiseValue;
@@ -59,7 +63,6 @@
#region DelegateCommand
- public DelegateCommand GoBackCommand { get; }
public DelegateCommand DetectNoiseCommand { get; }
#endregion
@@ -86,21 +89,9 @@
RightNoiseValue = model.RightNoiseSumValue;
});
- GoBackCommand = new DelegateCommand(GoBack);
DetectNoiseCommand = new DelegateCommand(DetectNoise);
}
- private void GoBack()
- {
- if (_detectTimer.IsEnabled)
- {
- _detectTimer.Stop();
- DetectState = "开始调查";
- }
-
- RequestClose?.Invoke(new DialogResult(ButtonResult.Cancel));
- }
-
private void DetectNoise()
{
if (_detectTimer.IsEnabled)
@@ -131,6 +122,10 @@
public void OnDialogClosed()
{
+ if (_detectTimer.IsEnabled)
+ {
+ _detectTimer.Stop();
+ }
}
public void OnDialogOpened(IDialogParameters parameters)
diff --git a/Correlator/ViewModels/PictureFileDialogViewModel.cs b/Correlator/ViewModels/PictureFileDialogViewModel.cs
index 895a20e..a2e1364 100644
--- a/Correlator/ViewModels/PictureFileDialogViewModel.cs
+++ b/Correlator/ViewModels/PictureFileDialogViewModel.cs
@@ -19,7 +19,13 @@
#region 属性绑定
public string Title => "图片文件列表";
- public event Action RequestClose;
+
+ public event Action RequestClose
+ {
+ add { }
+ remove { }
+ }
+
private List _pictureFiles;
public List PictureFiles
diff --git a/Correlator/ViewModels/SimplyAuditionDialogViewModel.cs b/Correlator/ViewModels/SimplyAuditionDialogViewModel.cs
index 0f9c192..451eda6 100644
--- a/Correlator/ViewModels/SimplyAuditionDialogViewModel.cs
+++ b/Correlator/ViewModels/SimplyAuditionDialogViewModel.cs
@@ -16,7 +16,7 @@
#region VM
- public string Title { get; private set; } = string.Empty;
+ public string Title => "管道听音判断";
private int _currentVolume;
@@ -58,8 +58,6 @@
#region DelegateCommand
- public DelegateCommand GoBackCommand { get; }
-
public DelegateCommand ListenRedSensorCommand { get; }
public DelegateCommand ListenBlueSensorCommand { get; }
public DelegateCommand SensorMuteCommand { get; }
@@ -101,27 +99,11 @@
_sampleRate = dataService.GetSampleRateByWorkMode(RuntimeCache.WorkMode);
CurrentVolume = GetCurrentMicVolume();
- GoBackCommand = new DelegateCommand(DismissDialog);
ListenRedSensorCommand = new DelegateCommand(ListenRedSensor);
SensorMuteCommand = new DelegateCommand(SensorMute);
ListenBlueSensorCommand = new DelegateCommand(ListenBlueSensor);
}
- private void DismissDialog()
- {
- if (_isRedRecording)
- {
- StopRedSensor(_serialPortService, _audioService);
- }
-
- if (_isBlueRecording)
- {
- StopBlueSensor(_serialPortService, _audioService);
- }
-
- RequestClose?.Invoke(new DialogResult(ButtonResult.Cancel));
- }
-
private void ListenRedSensor()
{
if (_isBlueRecording)
@@ -215,6 +197,15 @@
public void OnDialogClosed()
{
+ if (_isRedRecording)
+ {
+ StopRedSensor(_serialPortService, _audioService);
+ }
+
+ if (_isBlueRecording)
+ {
+ StopBlueSensor(_serialPortService, _audioService);
+ }
}
public void OnDialogOpened(IDialogParameters parameters)
diff --git a/Correlator/Dialog/CheckResponseDialog.xaml b/Correlator/Dialog/CheckResponseDialog.xaml
index 498a4d9..a571920 100644
--- a/Correlator/Dialog/CheckResponseDialog.xaml
+++ b/Correlator/Dialog/CheckResponseDialog.xaml
@@ -8,19 +8,18 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:prism="http://prismlibrary.com/"
xmlns:vm="clr-namespace:Correlator.ViewModels"
- Width="800"
- Height="660"
+ Width="760"
+ Height="640"
d:DataContext="{d:DesignInstance Type=vm:CheckResponseDialogViewModel}"
+ Background="White"
mc:Ignorable="d">
@@ -28,172 +27,143 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
+
-
-
-
-
-
+
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+ FontSize="16" />
+
+
-
-
-
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Correlator/Dialog/DetectNoiseDialog.xaml b/Correlator/Dialog/DetectNoiseDialog.xaml
index 56626ad..e1f3b34 100644
--- a/Correlator/Dialog/DetectNoiseDialog.xaml
+++ b/Correlator/Dialog/DetectNoiseDialog.xaml
@@ -9,179 +9,137 @@
Width="560"
Height="400"
d:DataContext="{d:DesignInstance Type=vm:DetectNoiseDialogViewModel}"
+ Background="White"
mc:Ignorable="d">
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/Dialog/SimplyAuditionDialog.xaml b/Correlator/Dialog/SimplyAuditionDialog.xaml
index 14eb385..8c1f422 100644
--- a/Correlator/Dialog/SimplyAuditionDialog.xaml
+++ b/Correlator/Dialog/SimplyAuditionDialog.xaml
@@ -10,6 +10,7 @@
Width="600"
Height="500"
d:DataContext="{d:DesignInstance Type=vm:SimplyAuditionDialogViewModel}"
+ Background="White"
Loaded="SimplyAuditionDialog_OnLoaded"
Unloaded="SimplyAuditionDialog_OnUnloaded"
mc:Ignorable="d">
@@ -18,10 +19,8 @@
@@ -30,188 +29,138 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+
-
+ Width="125"
+ Source="/Correlator;component/Image/tyl_icon6.png" />
+
+
+ Grid.Row="2"
+ Margin="10"
+ HorizontalAlignment="Stretch"
+ Command="{Binding ListenRedSensorCommand}"
+ Content="听红色传感器"
+ FontSize="14" />
+
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
-
-
-
-
-
+
-
+ BorderThickness="1"
+ CornerRadius="5">
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Correlator/ViewModels/AudioFileDialogViewModel.cs b/Correlator/ViewModels/AudioFileDialogViewModel.cs
index 7fe47ae..b5efbd8 100644
--- a/Correlator/ViewModels/AudioFileDialogViewModel.cs
+++ b/Correlator/ViewModels/AudioFileDialogViewModel.cs
@@ -22,7 +22,12 @@
#region 属性绑定
public string Title => "音频文件列表";
- public event Action RequestClose;
+
+ public event Action RequestClose
+ {
+ add { }
+ remove { }
+ }
private List _audioFiles;
diff --git a/Correlator/ViewModels/CheckResponseDialogViewModel.cs b/Correlator/ViewModels/CheckResponseDialogViewModel.cs
index acfd65e..22fa6a3 100644
--- a/Correlator/ViewModels/CheckResponseDialogViewModel.cs
+++ b/Correlator/ViewModels/CheckResponseDialogViewModel.cs
@@ -9,7 +9,7 @@
{
public event Action RequestClose;
- public string Title { get; set; } = string.Empty;
+ public string Title => "水听器信号清点";
public CheckResponseDialogViewModel(IEventAggregator eventAggregator)
{
diff --git a/Correlator/ViewModels/DetectNoiseDialogViewModel.cs b/Correlator/ViewModels/DetectNoiseDialogViewModel.cs
index b02d5d6..78b0730 100644
--- a/Correlator/ViewModels/DetectNoiseDialogViewModel.cs
+++ b/Correlator/ViewModels/DetectNoiseDialogViewModel.cs
@@ -13,11 +13,15 @@
{
public class DetectNoiseDialogViewModel : BindableBase, IDialogAware
{
- public event Action RequestClose;
+ public event Action RequestClose
+ {
+ add { }
+ remove { }
+ }
#region VM
- public string Title { get; private set; } = string.Empty;
+ public string Title => "管道噪声调查";
private double _leftNoiseValue;
@@ -59,7 +63,6 @@
#region DelegateCommand
- public DelegateCommand GoBackCommand { get; }
public DelegateCommand DetectNoiseCommand { get; }
#endregion
@@ -86,21 +89,9 @@
RightNoiseValue = model.RightNoiseSumValue;
});
- GoBackCommand = new DelegateCommand(GoBack);
DetectNoiseCommand = new DelegateCommand(DetectNoise);
}
- private void GoBack()
- {
- if (_detectTimer.IsEnabled)
- {
- _detectTimer.Stop();
- DetectState = "开始调查";
- }
-
- RequestClose?.Invoke(new DialogResult(ButtonResult.Cancel));
- }
-
private void DetectNoise()
{
if (_detectTimer.IsEnabled)
@@ -131,6 +122,10 @@
public void OnDialogClosed()
{
+ if (_detectTimer.IsEnabled)
+ {
+ _detectTimer.Stop();
+ }
}
public void OnDialogOpened(IDialogParameters parameters)
diff --git a/Correlator/ViewModels/PictureFileDialogViewModel.cs b/Correlator/ViewModels/PictureFileDialogViewModel.cs
index 895a20e..a2e1364 100644
--- a/Correlator/ViewModels/PictureFileDialogViewModel.cs
+++ b/Correlator/ViewModels/PictureFileDialogViewModel.cs
@@ -19,7 +19,13 @@
#region 属性绑定
public string Title => "图片文件列表";
- public event Action RequestClose;
+
+ public event Action RequestClose
+ {
+ add { }
+ remove { }
+ }
+
private List _pictureFiles;
public List PictureFiles
diff --git a/Correlator/ViewModels/SimplyAuditionDialogViewModel.cs b/Correlator/ViewModels/SimplyAuditionDialogViewModel.cs
index 0f9c192..451eda6 100644
--- a/Correlator/ViewModels/SimplyAuditionDialogViewModel.cs
+++ b/Correlator/ViewModels/SimplyAuditionDialogViewModel.cs
@@ -16,7 +16,7 @@
#region VM
- public string Title { get; private set; } = string.Empty;
+ public string Title => "管道听音判断";
private int _currentVolume;
@@ -58,8 +58,6 @@
#region DelegateCommand
- public DelegateCommand GoBackCommand { get; }
-
public DelegateCommand ListenRedSensorCommand { get; }
public DelegateCommand ListenBlueSensorCommand { get; }
public DelegateCommand SensorMuteCommand { get; }
@@ -101,27 +99,11 @@
_sampleRate = dataService.GetSampleRateByWorkMode(RuntimeCache.WorkMode);
CurrentVolume = GetCurrentMicVolume();
- GoBackCommand = new DelegateCommand(DismissDialog);
ListenRedSensorCommand = new DelegateCommand(ListenRedSensor);
SensorMuteCommand = new DelegateCommand(SensorMute);
ListenBlueSensorCommand = new DelegateCommand(ListenBlueSensor);
}
- private void DismissDialog()
- {
- if (_isRedRecording)
- {
- StopRedSensor(_serialPortService, _audioService);
- }
-
- if (_isBlueRecording)
- {
- StopBlueSensor(_serialPortService, _audioService);
- }
-
- RequestClose?.Invoke(new DialogResult(ButtonResult.Cancel));
- }
-
private void ListenRedSensor()
{
if (_isBlueRecording)
@@ -215,6 +197,15 @@
public void OnDialogClosed()
{
+ if (_isRedRecording)
+ {
+ StopRedSensor(_serialPortService, _audioService);
+ }
+
+ if (_isBlueRecording)
+ {
+ StopBlueSensor(_serialPortService, _audioService);
+ }
}
public void OnDialogOpened(IDialogParameters parameters)
diff --git a/Correlator/Views/ApplicationLogView.xaml b/Correlator/Views/ApplicationLogView.xaml
index 55b969f..a286d86 100644
--- a/Correlator/Views/ApplicationLogView.xaml
+++ b/Correlator/Views/ApplicationLogView.xaml
@@ -6,9 +6,9 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:prism="http://prismlibrary.com/"
xmlns:vm="clr-namespace:Correlator.ViewModels"
+ MinWidth="800"
+ MinHeight="600"
d:DataContext="{d:DesignInstance Type=vm:ApplicationLogViewModel}"
- d:DesignHeight="900"
- d:DesignWidth="1400"
mc:Ignorable="d">
@@ -16,7 +16,6 @@
-