diff --git a/Correlator/ViewModels/MainWindowViewModel.cs b/Correlator/ViewModels/MainWindowViewModel.cs index 88f521e..50f7a55 100644 --- a/Correlator/ViewModels/MainWindowViewModel.cs +++ b/Correlator/ViewModels/MainWindowViewModel.cs @@ -394,7 +394,7 @@ } } - private string _lowFrequency = string.Empty; + private string _lowFrequency = "100"; public string LowFrequency { @@ -406,7 +406,7 @@ } } - private string _highFrequency = string.Empty; + private string _highFrequency = "3000"; public string HighFrequency { @@ -604,9 +604,19 @@ { _mainWindow = window; "MainWindowViewModel".WriteLog("加载"); - window.AccelerationRadioButton.Checked += delegate { RuntimeCache.IsHydrophone = false; }; + window.AccelerationRadioButton.Checked += delegate + { + RuntimeCache.IsHydrophone = false; + LowFrequency = "100"; + HighFrequency = "3000"; + }; - window.HydrophonesRadioButton.Checked += delegate { RuntimeCache.IsHydrophone = true; }; + window.HydrophonesRadioButton.Checked += delegate + { + RuntimeCache.IsHydrophone = true; + LowFrequency = "10"; + HighFrequency = "300"; + }; } private void CloseWindow(MainWindow window) @@ -1024,9 +1034,17 @@ { PipeDiameter = string.Empty; PipeLength = string.Empty; - LowFrequency = string.Empty; + if (RuntimeCache.IsHydrophone) + { + LowFrequency = "10"; + HighFrequency = "300"; + } + else + { + LowFrequency = "100"; + HighFrequency = "3000"; + } - HighFrequency = string.Empty; SoundSpeed = "0"; //复位之后可以再次开始 diff --git a/Correlator/ViewModels/MainWindowViewModel.cs b/Correlator/ViewModels/MainWindowViewModel.cs index 88f521e..50f7a55 100644 --- a/Correlator/ViewModels/MainWindowViewModel.cs +++ b/Correlator/ViewModels/MainWindowViewModel.cs @@ -394,7 +394,7 @@ } } - private string _lowFrequency = string.Empty; + private string _lowFrequency = "100"; public string LowFrequency { @@ -406,7 +406,7 @@ } } - private string _highFrequency = string.Empty; + private string _highFrequency = "3000"; public string HighFrequency { @@ -604,9 +604,19 @@ { _mainWindow = window; "MainWindowViewModel".WriteLog("加载"); - window.AccelerationRadioButton.Checked += delegate { RuntimeCache.IsHydrophone = false; }; + window.AccelerationRadioButton.Checked += delegate + { + RuntimeCache.IsHydrophone = false; + LowFrequency = "100"; + HighFrequency = "3000"; + }; - window.HydrophonesRadioButton.Checked += delegate { RuntimeCache.IsHydrophone = true; }; + window.HydrophonesRadioButton.Checked += delegate + { + RuntimeCache.IsHydrophone = true; + LowFrequency = "10"; + HighFrequency = "300"; + }; } private void CloseWindow(MainWindow window) @@ -1024,9 +1034,17 @@ { PipeDiameter = string.Empty; PipeLength = string.Empty; - LowFrequency = string.Empty; + if (RuntimeCache.IsHydrophone) + { + LowFrequency = "10"; + HighFrequency = "300"; + } + else + { + LowFrequency = "100"; + HighFrequency = "3000"; + } - HighFrequency = string.Empty; SoundSpeed = "0"; //复位之后可以再次开始 diff --git a/Correlator/Views/MainWindow.xaml b/Correlator/Views/MainWindow.xaml index b9c8a29..225abd6 100644 --- a/Correlator/Views/MainWindow.xaml +++ b/Correlator/Views/MainWindow.xaml @@ -1088,7 +1088,7 @@ VerticalAlignment="Center" FontSize="16" Foreground="{StaticResource MainThemeBrush}" - Text="频段区间" /> + Text="频段区间(单位:Hz)" />