diff --git a/Correlator/Converter/StepButtonStateConverter.cs b/Correlator/Converter/StepButtonStateConverter.cs new file mode 100644 index 0000000..6ff4b5e --- /dev/null +++ b/Correlator/Converter/StepButtonStateConverter.cs @@ -0,0 +1,26 @@ +using System; +using System.Globalization; +using System.Windows.Data; + +namespace Correlator.Converter +{ + public class StepButtonStateConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + try + { + return (int)value == 3; + } + catch + { + return false; + } + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + } +} \ No newline at end of file diff --git a/Correlator/Converter/StepButtonStateConverter.cs b/Correlator/Converter/StepButtonStateConverter.cs new file mode 100644 index 0000000..6ff4b5e --- /dev/null +++ b/Correlator/Converter/StepButtonStateConverter.cs @@ -0,0 +1,26 @@ +using System; +using System.Globalization; +using System.Windows.Data; + +namespace Correlator.Converter +{ + public class StepButtonStateConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + try + { + return (int)value == 3; + } + catch + { + return false; + } + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + } +} \ No newline at end of file diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj index a82d912..95dd9f3 100644 --- a/Correlator/Correlator.csproj +++ b/Correlator/Correlator.csproj @@ -178,6 +178,7 @@ + AddSoundSpeedDialog.xaml diff --git a/Correlator/Converter/StepButtonStateConverter.cs b/Correlator/Converter/StepButtonStateConverter.cs new file mode 100644 index 0000000..6ff4b5e --- /dev/null +++ b/Correlator/Converter/StepButtonStateConverter.cs @@ -0,0 +1,26 @@ +using System; +using System.Globalization; +using System.Windows.Data; + +namespace Correlator.Converter +{ + public class StepButtonStateConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + try + { + return (int)value == 3; + } + catch + { + return false; + } + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + } +} \ No newline at end of file diff --git a/Correlator/Correlator.csproj b/Correlator/Correlator.csproj index a82d912..95dd9f3 100644 --- a/Correlator/Correlator.csproj +++ b/Correlator/Correlator.csproj @@ -178,6 +178,7 @@ + AddSoundSpeedDialog.xaml diff --git a/Correlator/Dialog/CheckResponseDialog.xaml b/Correlator/Dialog/CheckResponseDialog.xaml index 106b68c..c888f23 100644 --- a/Correlator/Dialog/CheckResponseDialog.xaml +++ b/Correlator/Dialog/CheckResponseDialog.xaml @@ -2,10 +2,12 @@ x:Class="Correlator.Dialog.CheckResponseDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:converter="clr-namespace:Correlator.Converter" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:hc="https://handyorg.github.io/handycontrol" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Width="780" - Height="560" + Height="660" AllowsTransparency="True" Background="Transparent" Closed="CheckResponseDialog_OnClosed" @@ -16,6 +18,11 @@ WindowStartupLocation="CenterOwner" WindowStyle="None" mc:Ignorable="d"> + + + + + - - + + + + + + + + - - - - - - + @@ -73,8 +93,8 @@ - - + + + + + + + + + + - - - - - - + @@ -73,8 +93,8 @@ - - + + + + + + + + + + - - - - - - + @@ -73,8 +93,8 @@ - - + + + + + + + + + + - - - - - - + @@ -73,8 +93,8 @@ - - + +