diff --git a/Correlator/Converter/FrequencyRangeConverter.cs b/Correlator/Converter/FrequencyRangeConverter.cs new file mode 100644 index 0000000..2ac570d --- /dev/null +++ b/Correlator/Converter/FrequencyRangeConverter.cs @@ -0,0 +1,26 @@ +using System; +using System.Globalization; +using System.Windows.Data; + +namespace Correlator.Converter +{ + public class FrequencyRangeConverter : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + try + { + return values[0] + " ~ " + values[1] + "Hz"; + } + catch (Exception) + { + return null; + } + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/Correlator/Converter/FrequencyRangeConverter.cs b/Correlator/Converter/FrequencyRangeConverter.cs new file mode 100644 index 0000000..2ac570d --- /dev/null +++ b/Correlator/Converter/FrequencyRangeConverter.cs @@ -0,0 +1,26 @@ +using System; +using System.Globalization; +using System.Windows.Data; + +namespace Correlator.Converter +{ + public class FrequencyRangeConverter : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + try + { + return values[0] + " ~ " + values[1] + "Hz"; + } + catch (Exception) + { + return null; + } + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/Correlator/Converter/MultiBindingValueConverter.cs b/Correlator/Converter/MultiBindingValueConverter.cs deleted file mode 100644 index d38105e..0000000 --- a/Correlator/Converter/MultiBindingValueConverter.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; - -namespace Correlator.Converter -{ - public class MultiBindingValueConverter : IMultiValueConverter - { - public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) - { - try - { - return values[0] + ",管径:" + values[1] + "mm,管段长度:" + values[2] + "m"; - } - catch (Exception) - { - return null; - } - } - - public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} \ No newline at end of file diff --git a/Correlator/Converter/FrequencyRangeConverter.cs b/Correlator/Converter/FrequencyRangeConverter.cs new file mode 100644 index 0000000..2ac570d --- /dev/null +++ b/Correlator/Converter/FrequencyRangeConverter.cs @@ -0,0 +1,26 @@ +using System; +using System.Globalization; +using System.Windows.Data; + +namespace Correlator.Converter +{ + public class FrequencyRangeConverter : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + try + { + return values[0] + " ~ " + values[1] + "Hz"; + } + catch (Exception) + { + return null; + } + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/Correlator/Converter/MultiBindingValueConverter.cs b/Correlator/Converter/MultiBindingValueConverter.cs deleted file mode 100644 index d38105e..0000000 --- a/Correlator/Converter/MultiBindingValueConverter.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; - -namespace Correlator.Converter -{ - public class MultiBindingValueConverter : IMultiValueConverter - { - public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) - { - try - { - return values[0] + ",管径:" + values[1] + "mm,管段长度:" + values[2] + "m"; - } - catch (Exception) - { - return null; - } - } - - public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} \ No newline at end of file diff --git a/Correlator/Converter/PipeLineValueConverter.cs b/Correlator/Converter/PipeLineValueConverter.cs new file mode 100644 index 0000000..1aa7cf5 --- /dev/null +++ b/Correlator/Converter/PipeLineValueConverter.cs @@ -0,0 +1,26 @@ +using System; +using System.Globalization; +using System.Windows.Data; + +namespace Correlator.Converter +{ + public class PipeLineValueConverter : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + try + { + return "管材:" + values[0] + ",管径:" + values[1] + "mm,管段长度:" + values[2] + "m"; + } + catch (Exception) + { + return null; + } + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/Correlator/Converter/FrequencyRangeConverter.cs b/Correlator/Converter/FrequencyRangeConverter.cs new file mode 100644 index 0000000..2ac570d --- /dev/null +++ b/Correlator/Converter/FrequencyRangeConverter.cs @@ -0,0 +1,26 @@ +using System; +using System.Globalization; +using System.Windows.Data; + +namespace Correlator.Converter +{ + public class FrequencyRangeConverter : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + try + { + return values[0] + " ~ " + values[1] + "Hz"; + } + catch (Exception) + { + return null; + } + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/Correlator/Converter/MultiBindingValueConverter.cs b/Correlator/Converter/MultiBindingValueConverter.cs deleted file mode 100644 index d38105e..0000000 --- a/Correlator/Converter/MultiBindingValueConverter.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; - -namespace Correlator.Converter -{ - public class MultiBindingValueConverter : IMultiValueConverter - { - public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) - { - try - { - return values[0] + ",管径:" + values[1] + "mm,管段长度:" + values[2] + "m"; - } - catch (Exception) - { - return null; - } - } - - public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} \ No newline at end of file diff --git a/Correlator/Converter/PipeLineValueConverter.cs b/Correlator/Converter/PipeLineValueConverter.cs new file mode 100644 index 0000000..1aa7cf5 --- /dev/null +++ b/Correlator/Converter/PipeLineValueConverter.cs @@ -0,0 +1,26 @@ +using System; +using System.Globalization; +using System.Windows.Data; + +namespace Correlator.Converter +{ + public class PipeLineValueConverter : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + try + { + return "管材:" + values[0] + ",管径:" + values[1] + "mm,管段长度:" + values[2] + "m"; + } + catch (Exception) + { + return null; + } + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj index 9ea28f6..2b75b84 100644 --- a/Correlator/Correlator.csproj +++ b/Correlator/Correlator.csproj @@ -174,7 +174,8 @@ - + + diff --git a/Correlator/Converter/FrequencyRangeConverter.cs b/Correlator/Converter/FrequencyRangeConverter.cs new file mode 100644 index 0000000..2ac570d --- /dev/null +++ b/Correlator/Converter/FrequencyRangeConverter.cs @@ -0,0 +1,26 @@ +using System; +using System.Globalization; +using System.Windows.Data; + +namespace Correlator.Converter +{ + public class FrequencyRangeConverter : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + try + { + return values[0] + " ~ " + values[1] + "Hz"; + } + catch (Exception) + { + return null; + } + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/Correlator/Converter/MultiBindingValueConverter.cs b/Correlator/Converter/MultiBindingValueConverter.cs deleted file mode 100644 index d38105e..0000000 --- a/Correlator/Converter/MultiBindingValueConverter.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Globalization; -using System.Windows.Data; - -namespace Correlator.Converter -{ - public class MultiBindingValueConverter : IMultiValueConverter - { - public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) - { - try - { - return values[0] + ",管径:" + values[1] + "mm,管段长度:" + values[2] + "m"; - } - catch (Exception) - { - return null; - } - } - - public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} \ No newline at end of file diff --git a/Correlator/Converter/PipeLineValueConverter.cs b/Correlator/Converter/PipeLineValueConverter.cs new file mode 100644 index 0000000..1aa7cf5 --- /dev/null +++ b/Correlator/Converter/PipeLineValueConverter.cs @@ -0,0 +1,26 @@ +using System; +using System.Globalization; +using System.Windows.Data; + +namespace Correlator.Converter +{ + public class PipeLineValueConverter : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + try + { + return "管材:" + values[0] + ",管径:" + values[1] + "mm,管段长度:" + values[2] + "m"; + } + catch (Exception) + { + return null; + } + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj index 9ea28f6..2b75b84 100644 --- a/Correlator/Correlator.csproj +++ b/Correlator/Correlator.csproj @@ -174,7 +174,8 @@ - + + diff --git a/Correlator/View/HomePageProWindow.xaml b/Correlator/View/HomePageProWindow.xaml index 67fe0d5..96a84af 100644 --- a/Correlator/View/HomePageProWindow.xaml +++ b/Correlator/View/HomePageProWindow.xaml @@ -33,7 +33,8 @@ - + + @@ -404,8 +405,14 @@ + Foreground="{StaticResource MainThemeColor}"> + + + + + + + - - + @@ -911,6 +913,7 @@ - + + diff --git a/Correlator/View/HomePageProWindow.xaml b/Correlator/View/HomePageProWindow.xaml index 67fe0d5..96a84af 100644 --- a/Correlator/View/HomePageProWindow.xaml +++ b/Correlator/View/HomePageProWindow.xaml @@ -33,7 +33,8 @@ - + + @@ -404,8 +405,14 @@ + Foreground="{StaticResource MainThemeColor}"> + + + + + + + - - + @@ -911,6 +913,7 @@ /// 绑定过滤器值 /// - private string _filterValue = "无"; + private string _filterValue = " ~ Hz"; public string FilterValue { @@ -503,7 +503,7 @@ FlowStatus.IsHydrophone = false; FrequencyInterval = "100 ~ 3000Hz"; }; - + it.HydrophonesRadioButton.Checked += delegate { FlowStatus.IsHydrophone = true; @@ -538,7 +538,7 @@ MessageBox.Show("还未开始采集数据,无法保存音频", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Error); } }); - + ResetParamCommand = new RelayCommand(ResetParam); SnapShotCommand = new RelayCommand(delegate @@ -631,10 +631,12 @@ { InterferenceFrequency = "无"; Snr = "无"; - FilterValue = "无"; + FilterValue = " ~ Hz"; PipeName = string.Empty; PipeDiameter = string.Empty; PipeLength = string.Empty; + LowFrequency = string.Empty; + HighFrequency = string.Empty; SoundSpeed = "0"; RedTransmitterDistance = 0; ElapseTime = "0";