26
|
1 <metro:Window x:Class="Server.UI.MainWindow"
|
|
2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
4 xmlns:c="clr-namespace:Common.Controls;assembly=Common"
|
|
5 xmlns:converters="clr-namespace:Server.Converters"
|
|
6 xmlns:metro="http://schemas.codeplex.com/elysium/theme"
|
27
|
7 xmlns:Xaml="clr-namespace:Common.Xaml;assembly=Common"
|
26
|
8 Title="Messaging Server"
|
|
9 Width="700"
|
|
10 Height="475"
|
|
11 MinWidth="700"
|
|
12 MinHeight="475"
|
|
13 DataContext="{Binding MainWindowViewModel,
|
|
14 Source={StaticResource Locator}}"
|
|
15 Icon="{StaticResource Mail}">
|
|
16
|
|
17 <TabControl Margin="{Binding Source={x:Static metro:Parameters.Instance}, Path=BoldPadding, Mode=OneWay}">
|
|
18 <TabItem Header="dashboard">
|
|
19 <Grid HorizontalAlignment="Center">
|
|
20 <Grid.ColumnDefinitions>
|
|
21 <ColumnDefinition Width="220" />
|
|
22 <ColumnDefinition Width="220" />
|
|
23 <ColumnDefinition Width="220" />
|
|
24 </Grid.ColumnDefinitions>
|
|
25 <Grid.RowDefinitions>
|
|
26 <RowDefinition Height="Auto" />
|
|
27 <RowDefinition Height="220" />
|
|
28 <RowDefinition Height="*" />
|
|
29 <RowDefinition Height="50" />
|
|
30 </Grid.RowDefinitions>
|
|
31
|
|
32 <ToggleButton Grid.Row="0"
|
|
33 Grid.Column="0"
|
|
34 Margin="10,10,10,0"
|
|
35 Content="{Binding SocketEndPoint.IsListening,
|
|
36 Converter={converters:ToggleButtonToTextConverter}}"
|
|
37 IsChecked="{Binding SocketEndPoint.IsListening}"
|
|
38 IsEnabled="True"
|
|
39 IsThreeState="False" />
|
|
40
|
|
41 <ToggleButton Grid.Row="0"
|
|
42 Grid.Column="1"
|
|
43 Margin="10,10,10,0"
|
27
|
44 Content="{Binding RabbitEndPoint.IsListening,
|
26
|
45 Converter={converters:ToggleButtonToTextConverter}}"
|
27
|
46 IsChecked="{Binding RabbitEndPoint.IsListening}"
|
26
|
47 IsEnabled="True" />
|
|
48
|
|
49 <ToggleButton Grid.Row="0"
|
|
50 Grid.Column="2"
|
|
51 Margin="10,10,10,0"
|
27
|
52 Content="{Binding RabbitProtoEndPoint.IsListening,
|
26
|
53 Converter={converters:ToggleButtonToTextConverter}}"
|
27
|
54 IsChecked="{Binding RabbitProtoEndPoint.IsListening}"
|
26
|
55 IsEnabled="True" />
|
|
56
|
|
57 <c:MessageTile Grid.Row="1"
|
|
58 Grid.Column="0"
|
|
59 Background="{StaticResource MetroPurpleBrush}"
|
27
|
60 DisplayCount="{Binding SocketEndPoint.DisplayCount,
|
|
61 Mode=TwoWay,
|
|
62 UpdateSourceTrigger=PropertyChanged}"
|
26
|
63 DisplayIcon="{StaticResource Mail}"
|
|
64 DisplayText="{Binding SocketEndPoint.DisplayText}"
|
|
65 Foreground="White"
|
|
66 ToolTip="{Binding SocketEndPoint.ToolTip}" />
|
|
67
|
|
68 <c:MessageTile Grid.Row="1"
|
|
69 Grid.Column="1"
|
|
70 Background="{StaticResource MetroGreenBrush}"
|
27
|
71 DisplayCount="{Binding RabbitEndPoint.DisplayCount}"
|
26
|
72 DisplayIcon="{StaticResource Mail}"
|
27
|
73 DisplayText="{Binding RabbitEndPoint.DisplayText}"
|
26
|
74 Foreground="White"
|
27
|
75 ToolTip="{Binding RabbitEndPoint.ToolTip}" />
|
26
|
76
|
|
77 <c:MessageTile Grid.Row="1"
|
|
78 Grid.Column="2"
|
|
79 Background="{StaticResource MetroOrangeBrush}"
|
27
|
80 DisplayCount="{Binding RabbitProtoEndPoint.DisplayCount}"
|
26
|
81 DisplayIcon="{StaticResource Mail}"
|
27
|
82 DisplayText="{Binding RabbitProtoEndPoint.DisplayText}"
|
26
|
83 Foreground="White"
|
27
|
84 ToolTip="{Binding RabbitProtoEndPoint.ToolTip}" />
|
|
85 <ScrollViewer Grid.Row="2"
|
|
86 Grid.Column="0"
|
|
87 Xaml:XamlHelper.AutoScroll="{Binding SocketEndPoint.IsLogChanged}">
|
|
88 <TextBlock Margin="10"
|
|
89 Background="{StaticResource MetroGrayBrush}"
|
|
90 Padding="10"
|
|
91 Text="{Binding SocketEndPoint.DisplayLog}"
|
|
92 TextWrapping="Wrap" />
|
|
93 </ScrollViewer>
|
|
94 <ScrollViewer Grid.Row="2"
|
|
95 Grid.Column="1"
|
|
96 Xaml:XamlHelper.AutoScroll="{Binding RabbitEndPoint.IsLogChanged}">
|
|
97 <TextBlock Margin="10"
|
|
98 Background="{StaticResource MetroGrayBrush}"
|
|
99 Padding="10"
|
|
100 Text="{Binding RabbitEndPoint.DisplayLog}"
|
|
101 TextWrapping="WrapWithOverflow" />
|
|
102 </ScrollViewer>
|
|
103 <ScrollViewer Grid.Row="2"
|
|
104 Grid.Column="2"
|
|
105 Xaml:XamlHelper.AutoScroll="{Binding RabbitProtoEndPoint.IsLogChanged}">
|
|
106 <TextBlock Grid.Row="2"
|
|
107 Grid.Column="2"
|
|
108 Margin="10"
|
|
109 Background="{StaticResource MetroGrayBrush}"
|
|
110 Padding="10"
|
|
111 Text="{Binding RabbitProtoEndPoint.DisplayLog}"
|
|
112 TextWrapping="WrapWithOverflow" />
|
|
113 </ScrollViewer>
|
26
|
114 <metro:ToggleSwitch Grid.Row="3"
|
|
115 Grid.Column="0"
|
|
116 Width="80"
|
|
117 Height="50"
|
|
118 Margin="10"
|
|
119 HorizontalAlignment="Left"
|
|
120 IsChecked="{Binding OverrideSwitch}"
|
|
121 IsEnabled="True" />
|
|
122 <Button Grid.Row="3"
|
|
123 Grid.Column="2"
|
|
124 Width="75"
|
|
125 Margin="10"
|
|
126 HorizontalAlignment="Right"
|
|
127 Command="{Binding CloseCommand}"
|
|
128 Content="Close" />
|
|
129 </Grid>
|
|
130 </TabItem>
|
|
131 </TabControl>
|
|
132 </metro:Window>
|