diff --git a/PettingZoo.Test/Tapeti/TypeToJObjectTest.cs b/PettingZoo.Test/Tapeti/TypeToJObjectTest.cs index a02dcb0..de554a0 100644 --- a/PettingZoo.Test/Tapeti/TypeToJObjectTest.cs +++ b/PettingZoo.Test/Tapeti/TypeToJObjectTest.cs @@ -34,7 +34,7 @@ namespace PettingZoo.Test.Tapeti objectValue.Should().HaveElement("RecursiveValue").Which.Type.Should().Be(JTokenType.Null); // Via type mapping - // TODO + // TODO test type mappings } } diff --git a/PettingZoo/UI/Tab/Subscriber/SameMessageVisibilityConverter.cs b/PettingZoo/UI/Tab/Subscriber/SameMessageVisibilityConverter.cs new file mode 100644 index 0000000..4f6df58 --- /dev/null +++ b/PettingZoo/UI/Tab/Subscriber/SameMessageVisibilityConverter.cs @@ -0,0 +1,23 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; + +namespace PettingZoo.UI.Tab.Subscriber +{ + public class SameMessageVisibilityConverter : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + return ReferenceEquals(values[0], values[1]) + ? Visibility.Visible + : Visibility.Collapsed; + } + + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + throw new NotSupportedException(); + } + } +} diff --git a/PettingZoo/UI/Tab/Subscriber/SubscriberView.xaml b/PettingZoo/UI/Tab/Subscriber/SubscriberView.xaml index 95a1f1b..5684e93 100644 --- a/PettingZoo/UI/Tab/Subscriber/SubscriberView.xaml +++ b/PettingZoo/UI/Tab/Subscriber/SubscriberView.xaml @@ -11,6 +11,9 @@ d:DesignWidth="800" d:DataContext="{d:DesignInstance res:DesignTimeSubscriberViewModel, IsDesignTimeCreatable=True}" Background="White"> + + + @@ -30,11 +33,37 @@ - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -66,6 +95,8 @@