diff Messaging/Server/UI/MainWindow.xaml @ 27:96fdf58e05b4

Server working with sockets and rabbitmq
author adminsh@apollo
date Wed, 21 Mar 2012 19:00:59 +0000
parents 045dac571339
children 9919ee227c93
line wrap: on
line diff
--- a/Messaging/Server/UI/MainWindow.xaml	Wed Mar 21 15:39:53 2012 +0000
+++ b/Messaging/Server/UI/MainWindow.xaml	Wed Mar 21 19:00:59 2012 +0000
@@ -4,6 +4,7 @@
               xmlns:c="clr-namespace:Common.Controls;assembly=Common"
               xmlns:converters="clr-namespace:Server.Converters"
               xmlns:metro="http://schemas.codeplex.com/elysium/theme"
+              xmlns:Xaml="clr-namespace:Common.Xaml;assembly=Common"
               Title="Messaging Server"
               Width="700"
               Height="475"
@@ -40,23 +41,25 @@
                 <ToggleButton Grid.Row="0"
                               Grid.Column="1"
                               Margin="10,10,10,0"
-                              Content="{Binding SocketEndPoint.IsListening,
+                              Content="{Binding RabbitEndPoint.IsListening,
                                                 Converter={converters:ToggleButtonToTextConverter}}"
-                              IsChecked="{Binding SocketEndPoint.IsListening}"
+                              IsChecked="{Binding RabbitEndPoint.IsListening}"
                               IsEnabled="True" />
 
                 <ToggleButton Grid.Row="0"
                               Grid.Column="2"
                               Margin="10,10,10,0"
-                              Content="{Binding SocketEndPoint.IsListening,
+                              Content="{Binding RabbitProtoEndPoint.IsListening,
                                                 Converter={converters:ToggleButtonToTextConverter}}"
-                              IsChecked="{Binding SocketEndPoint.IsListening}"
+                              IsChecked="{Binding RabbitProtoEndPoint.IsListening}"
                               IsEnabled="True" />
 
                 <c:MessageTile Grid.Row="1"
                                Grid.Column="0"
                                Background="{StaticResource MetroPurpleBrush}"
-                               DisplayCount="{Binding SocketEndPoint.DisplayCount, Mode= TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                               DisplayCount="{Binding SocketEndPoint.DisplayCount,
+                                                      Mode=TwoWay,
+                                                      UpdateSourceTrigger=PropertyChanged}"
                                DisplayIcon="{StaticResource Mail}"
                                DisplayText="{Binding SocketEndPoint.DisplayText}"
                                Foreground="White"
@@ -65,45 +68,49 @@
                 <c:MessageTile Grid.Row="1"
                                Grid.Column="1"
                                Background="{StaticResource MetroGreenBrush}"
-                               DisplayCount="{Binding SocketEndPoint.DisplayCount}"
+                               DisplayCount="{Binding RabbitEndPoint.DisplayCount}"
                                DisplayIcon="{StaticResource Mail}"
-                               DisplayText="{Binding DisplayText}"
+                               DisplayText="{Binding RabbitEndPoint.DisplayText}"
                                Foreground="White"
-                               ToolTip="{Binding SocketEndPoint.ToolTip}" />
+                               ToolTip="{Binding RabbitEndPoint.ToolTip}" />
 
                 <c:MessageTile Grid.Row="1"
                                Grid.Column="2"
                                Background="{StaticResource MetroOrangeBrush}"
-                               DisplayCount="{Binding SocketEndPoint.DisplayCount}"
+                               DisplayCount="{Binding RabbitProtoEndPoint.DisplayCount}"
                                DisplayIcon="{StaticResource Mail}"
-                               DisplayText="{Binding SocketEndPoint.DisplayText}"
+                               DisplayText="{Binding RabbitProtoEndPoint.DisplayText}"
                                Foreground="White"
-                               ToolTip="{Binding SocketEndPoint.ToolTip}" />
-
-                <TextBlock Grid.Row="2"
-                           Grid.Column="0"
-                           Margin="10"
-                           Background="{StaticResource MetroGrayBrush}"
-                           Padding="10"
-                           Text="{Binding SocketEndPoint.DisplayLog}"
-                           TextWrapping="Wrap" />
-
-                <TextBlock Grid.Row="2"
-                           Grid.Column="1"
-                           Margin="10"
-                           Background="{StaticResource MetroGrayBrush}"
-                           Padding="10"
-                           Text="{Binding SocketEndPoint.DisplayLog}"
-                           TextWrapping="WrapWithOverflow" />
-
-                <TextBlock Grid.Row="2"
-                           Grid.Column="2"
-                           Margin="10"
-                           Background="{StaticResource MetroGrayBrush}"
-                           Padding="10"
-                           Text="{Binding SocketEndPoint.DisplayLog}"
-                           TextWrapping="WrapWithOverflow" />
-
+                               ToolTip="{Binding RabbitProtoEndPoint.ToolTip}" />
+                <ScrollViewer Grid.Row="2"
+                              Grid.Column="0"
+                              Xaml:XamlHelper.AutoScroll="{Binding SocketEndPoint.IsLogChanged}">
+                    <TextBlock Margin="10"
+                               Background="{StaticResource MetroGrayBrush}"
+                               Padding="10"
+                               Text="{Binding SocketEndPoint.DisplayLog}"
+                               TextWrapping="Wrap" />
+                </ScrollViewer>
+                <ScrollViewer Grid.Row="2"
+                              Grid.Column="1"
+                              Xaml:XamlHelper.AutoScroll="{Binding RabbitEndPoint.IsLogChanged}">
+                    <TextBlock Margin="10"
+                               Background="{StaticResource MetroGrayBrush}"
+                               Padding="10"
+                               Text="{Binding RabbitEndPoint.DisplayLog}"
+                               TextWrapping="WrapWithOverflow" />
+                </ScrollViewer>
+                <ScrollViewer Grid.Row="2"
+                              Grid.Column="2"
+                              Xaml:XamlHelper.AutoScroll="{Binding RabbitProtoEndPoint.IsLogChanged}">
+                    <TextBlock Grid.Row="2"
+                               Grid.Column="2"
+                               Margin="10"
+                               Background="{StaticResource MetroGrayBrush}"
+                               Padding="10"
+                               Text="{Binding RabbitProtoEndPoint.DisplayLog}"
+                               TextWrapping="WrapWithOverflow" />
+                </ScrollViewer>
                 <metro:ToggleSwitch Grid.Row="3"
                                     Grid.Column="0"
                                     Width="80"