blob: 9f93ac91c25ae386852d06793535c053963cc4bd [file] [log] [blame]
Nicolas Jager998fbd72016-08-08 11:41:28 -04001<!-- **********************************************************************
2* Copyright (C) 2016 by Savoir-faire Linux *
3* Author: Jäger Nicolas<nicolas.jager@savoirfairelinux.com> *
atraczyke87716f2016-09-20 13:46:22 -04004* Author: Traczyk Andreas<andreas.traczyk@savoirfairelinux.com> *
Nicolas Jager998fbd72016-08-08 11:41:28 -04005* *
6* This program is free software; you can redistribute it and/or modify *
7* it under the terms of the GNU General Public License as published by *
8* the Free Software Foundation; either version 3 of the License, or *
9* (at your option) any later version. *
10* *
11* This program is distributed in the hope that it will be useful, *
12* but WITHOUT ANY WARRANTY; without even the implied warranty of *
13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14* GNU General Public License for more details. *
15* *
16* You should have received a copy of the GNU General Public License *
17* along with this program. If not, see <http://www.gnu.org/licenses/> . *
18*********************************************************************** -->
19<Page x:Class="RingClientUWP.Views.SmartPanel"
20 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
21 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
22 xmlns:local="using:RingClientUWP"
Nicolas Jager7c409f32016-09-08 09:35:16 -040023 xmlns:controls="using:RingClientUWP.Controls"
Nicolas Jagerc551c362016-10-01 19:24:50 -040024 xmlns:views="using:RingClientUWP.Views"
Nicolas Jager998fbd72016-08-08 11:41:28 -040025 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
26 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
27 mc:Ignorable="d">
28
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -040029 <Page.Resources>
Nicolas Jagerc551c362016-10-01 19:24:50 -040030 <!-- converters -->
31 <views:NewMessageBubleNotification x:Key="_NewMessageBubleNotification_" />
32 <views:IncomingVisibility x:Key="_IncomingVisibility_" />
33 <views:OutGoingVisibility x:Key="_OutGoingVisibility_" />
34 <views:HasAnActiveCall x:Key="_HasAnActiveCall_" />
35
atraczyke87716f2016-09-20 13:46:22 -040036 <Style x:Key="addContactTextBoxStyle"
37 TargetType="TextBox">
38 <Setter Property="MinWidth" Value="{ThemeResource TextControlThemeMinWidth}"/>
39 <Setter Property="MinHeight" Value="{ThemeResource TextControlThemeMinHeight}"/>
40 <Setter Property="Foreground" Value="Black"/>
41 <Setter Property="Background" Value="white"/>
42 <Setter Property="BorderBrush" Value="Red"/>
43 <Setter Property="BorderThickness" Value="0"/>
44 <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}"/>
45 <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}"/>
46 <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Auto"/>
47 <Setter Property="ScrollViewer.VerticalScrollMode" Value="Auto"/>
48 <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden"/>
49 <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden"/>
50 <Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False"/>
51 <Setter Property="Padding" Value="4,4"/>
52 <Setter Property="Template">
53 <Setter.Value>
54 <ControlTemplate TargetType="TextBox">
55 <Grid>
56 <Grid.Resources>
57 <Style x:Name="DeleteButtonStyle" TargetType="Button">
58 <Setter Property="Template">
59 <Setter.Value>
60 <ControlTemplate TargetType="Button">
61 <Grid x:Name="ButtonLayoutGrid"
62 BorderThickness="5"
63 Background="Yellow">
64 </Grid>
65 </ControlTemplate>
66 </Setter.Value>
67 </Setter>
68 </Style>
69 </Grid.Resources>
70 <Grid.ColumnDefinitions>
71 <ColumnDefinition Width="*"/>
72 <ColumnDefinition Width="Auto"/>
73 </Grid.ColumnDefinitions>
74 <Grid.RowDefinitions>
75 <RowDefinition Height="Auto"/>
76 <RowDefinition Height="*"/>
77 </Grid.RowDefinitions>
78 <Border x:Name="BackgroundElement"
79 Grid.Row="1"
80 Background="{TemplateBinding Background}"
81 Margin="5"
82 Opacity="1"
83 Grid.ColumnSpan="2"
84 Grid.RowSpan="1"/>
85 <ScrollViewer x:Name="ContentElement"
86 Grid.Row="1"
87 HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
88 HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
89 VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}"
90 VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
91 IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}"
92 IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}"
93 IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
94 Margin="5"
95 Padding="{TemplateBinding Padding}"
96 IsTabStop="False"
97 AutomationProperties.AccessibilityView="Raw"
98 ZoomMode="Disabled"/>
99
100 <Button x:Name="DeleteButton"
101 Background="Transparent"
102 Grid.Row="1"
103 FontFamily="Segoe MDL2 Assets"
104 Foreground="LightBlue"
105 Content="&#xE1E2;"
106 Click="_ringTxtBx__Click"
107 BorderThickness="{TemplateBinding BorderThickness}"
108 Margin="{ThemeResource HelperButtonThemePadding}"
109 IsTabStop="False"
110 Grid.Column="1"
111 Visibility="Visible"
112 FontSize="20"
113 MinWidth="34"
114 VerticalAlignment="Stretch"/>
115 </Grid>
116 </ControlTemplate>
117 </Setter.Value>
118 </Setter>
119 </Style>
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400120 <!-- template for contacts. -->
121 <DataTemplate x:Key="ContactTemplate"
122 x:DataType="local:Contact">
123 <Grid>
atraczyke87716f2016-09-20 13:46:22 -0400124 <Grid.ColumnDefinitions>
125 <ColumnDefinition Width="310"/>
126 </Grid.ColumnDefinitions>
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400127 <Grid.RowDefinitions>
128 <RowDefinition Height="60"/>
129 <!-- use the height of _contactBar_ to make it visible or collapsed. -->
130 <RowDefinition x:Name="_contactBar_"
Nicolas Jagerf6a10322016-09-06 08:17:49 -0400131 Height="{x:Bind _contactBarHeight, Mode=OneWay}"/>
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400132 </Grid.RowDefinitions>
133 <Grid Grid.Row="0">
134 <Grid.ColumnDefinitions>
135 <ColumnDefinition Width="60"/>
136 <ColumnDefinition Width="*"
137 MinWidth="200"/>
138 </Grid.ColumnDefinitions>
139 <Image x:Name="_contactAvatar_"
140 VerticalAlignment="Center"
141 HorizontalAlignment="Center"
142 Grid.Column="0"
143 Width="55"
144 Height="55"
145 Source="Assets\TESTS\contactAvatar.png"/>
146 <!-- visual notifications. -->
147 <Border x:Name="_visualNotificationVideoChat_"
148 Visibility="Collapsed"
149 Style="{StaticResource BorderStyle1}">
150 <TextBlock Text="&#xE8AA;"
151 Style="{StaticResource TextSegoeStyle1}"/>
152 <Border.RenderTransform>
153 <TranslateTransform X="17" Y="-14"/>
154 </Border.RenderTransform>
155 </Border>
Nicolas Jagerd76940f2016-08-31 14:44:04 -0400156 <Grid Grid.Column="1">
157 <Grid.RowDefinitions>
158 <RowDefinition Height="30"/>
159 <RowDefinition Height="30"/>
160 </Grid.RowDefinitions>
161 <!-- name of the contact. -->
atraczyke87716f2016-09-20 13:46:22 -0400162 <TextBlock x:Name="_contactName_"
163 Grid.Row="0"
164 Text="{x:Bind name_}"
165 TextTrimming="CharacterEllipsis">
Nicolas Jagerd76940f2016-08-31 14:44:04 -0400166 </TextBlock>
Nicolas Jagerd76940f2016-08-31 14:44:04 -0400167 </Grid>
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400168 </Grid>
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400169 </Grid>
170 </DataTemplate>
171 <!-- template for accounts. -->
172 <DataTemplate x:Key="AccountTemplate"
173 x:DataType="local:Account">
174 <Grid>
175 <Grid.ColumnDefinitions>
atraczyk2425ddd2016-09-01 13:16:22 -0400176 <ColumnDefinition Width="260"/>
atraczyk8ce1dee2016-08-25 18:15:07 -0400177 <ColumnDefinition Width="60"/>
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400178 </Grid.ColumnDefinitions>
atraczyk8ce1dee2016-08-25 18:15:07 -0400179 <Grid.RowDefinitions>
180 <RowDefinition Height="30"/>
181 <RowDefinition Height="30"/>
182 </Grid.RowDefinitions>
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400183 <TextBlock x:Name="_accountName_"
atraczyk2425ddd2016-09-01 13:16:22 -0400184 Grid.Column="0"
atraczyk8ce1dee2016-08-25 18:15:07 -0400185 Grid.Row="0"
atraczyk2425ddd2016-09-01 13:16:22 -0400186 Margin="10,5,10,0"
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400187 Text="{x:Bind name_}"/>
atraczyk8ce1dee2016-08-25 18:15:07 -0400188 <TextBlock x:Name="_accountType_"
atraczyk2425ddd2016-09-01 13:16:22 -0400189 Grid.Column="1"
atraczyk8ce1dee2016-08-25 18:15:07 -0400190 Grid.Row="0"
191 TextAlignment="Right"
atraczyk196936e2016-09-02 15:31:53 -0400192 Margin="0,5,18,0"
atraczyk8ce1dee2016-08-25 18:15:07 -0400193 Foreground="ForestGreen"
194 Text="{x:Bind accountType_}"/>
195 <TextBlock x:Name="_ringID_"
atraczyk2425ddd2016-09-01 13:16:22 -0400196 Grid.Column="0"
atraczyk8ce1dee2016-08-25 18:15:07 -0400197 Grid.ColumnSpan="2"
198 Grid.Row="1"
199 Foreground="Crimson"
atraczyk2425ddd2016-09-01 13:16:22 -0400200 Margin="10,5,10,0"
201 FontSize="14"
atraczyk8ce1dee2016-08-25 18:15:07 -0400202 TextTrimming="CharacterEllipsis"
203 Text="{x:Bind ringID_}"/>
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400204 </Grid>
205 </DataTemplate>
Nicolas Jager7c409f32016-09-08 09:35:16 -0400206 <!-- template for smartpanelitems. -->
207 <DataTemplate x:Key="SmartPanelItemsTemplate"
208 x:DataType="controls:SmartPanelItem">
Nicolas Jager5750df02016-09-13 11:20:33 -0400209 <Grid PointerEntered="Grid_PointerEntered" PointerExited="Grid_PointerExited">
Nicolas Jager7c409f32016-09-08 09:35:16 -0400210 <Grid.RowDefinitions>
Nicolas Jagerc551c362016-10-01 19:24:50 -0400211 <!-- row definition for the contact. -->
Nicolas Jager7c409f32016-09-08 09:35:16 -0400212 <RowDefinition Height="auto"/>
Nicolas Jagerc551c362016-10-01 19:24:50 -0400213 <!-- row definition for the incoming call bar. -->
214 <RowDefinition Height="auto"/>
215 <!-- row definition for the outgoing call bar. -->
Nicolas Jager7c409f32016-09-08 09:35:16 -0400216 <RowDefinition Height="auto"/>
217 </Grid.RowDefinitions>
Nicolas Jagerc551c362016-10-01 19:24:50 -0400218 <!--helper to detect mouse overing-->
219 <Rectangle Fill="Transparent" Grid.Row="0"/>
220 <!-- contact. -->
221 <Grid Grid.Row="0">
222 <Grid.ColumnDefinitions>
223 <ColumnDefinition Width="310"/>
224 </Grid.ColumnDefinitions>
225 <Grid.RowDefinitions>
226 <RowDefinition Height="60"/>
227 <!-- use the height of _contactBar_ to make it visible or collapsed. -->
228 <RowDefinition x:Name="_contactBar_"
229 Height="{x:Bind _contact._contactBarHeight, Mode=OneWay}"/>
230 </Grid.RowDefinitions>
231 <Grid Grid.Row="0">
232 <Grid.ColumnDefinitions>
233 <ColumnDefinition Width="60"/>
234 <ColumnDefinition Width="*"
235 MinWidth="200"/>
236 </Grid.ColumnDefinitions>
237 <Image x:Name="_contactAvatar_"
238 VerticalAlignment="Center"
239 HorizontalAlignment="Center"
240 Grid.Column="0"
241 Width="55"
242 Height="55"
243 Source="Assets\TESTS\contactAvatar.png"/>
244 <!-- visual notifications. -->
245 <Border x:Name="_visualNotificationVideoChat_"
246 Visibility="Collapsed"
247 Style="{StaticResource BorderStyle1}">
248 <TextBlock Text="&#xE8AA;"
249 Style="{StaticResource TextSegoeStyle1}"/>
250 <Border.RenderTransform>
251 <TranslateTransform X="17" Y="-14"/>
252 </Border.RenderTransform>
253 </Border>
254 <Border x:Name="_visualNotificationNewMessage_"
255 Visibility="{x:Bind _contact._unreadMessages, Converter={StaticResource _NewMessageBubleNotification_}, Mode=OneWay}"
256 Style="{StaticResource BorderStyle2}">
257 <TextBlock Text="{x:Bind _contact._unreadMessages, Mode=OneWay}"
258 Style="{StaticResource TextStyle3}"/>
259 <Border.RenderTransform>
260 <TranslateTransform X="-17" Y="-14"/>
261 </Border.RenderTransform>
262 </Border>
263
264 <Grid Grid.Column="1">
265 <Grid.RowDefinitions>
266 <RowDefinition Height="30"/>
267 <RowDefinition Height="30"/>
268 </Grid.RowDefinitions>
269 <!-- name of the contact. -->
270 <TextBlock x:Name="_contactName_"
271 Grid.Row="0"
272 Text="{x:Bind _contact.name_}"
273 TextTrimming="CharacterEllipsis">
274 </TextBlock>
275 <!-- call button. -->
276 <Button Grid.Row="0"
277 Visibility="{x:Bind _hovered, Mode=OneWay}"
278 Click="_callContact__Click"
279 VerticalAlignment="Bottom"
280 HorizontalAlignment="Left"
281 Margin="10,0"
282 Style="{StaticResource roundButtonTemplate}"
283 FontFamily="Segoe MDL2 Assets"
284 Content="&#xE116;">
285 <Button.RenderTransform>
286 <TranslateTransform X="90" Y="25"/>
287 </Button.RenderTransform>
288 </Button>
289 </Grid>
290 </Grid>
291 </Grid>
Nicolas Jager083b3ae2016-10-04 08:46:19 -0400292 <!-- call bar. -->
Nicolas Jagerc551c362016-10-01 19:24:50 -0400293 <Grid Width="320"
294 Grid.Row="1"
295 HorizontalAlignment="Left"
296 Background="DarkGray">
297 <Grid.RowDefinitions>
298 <RowDefinition Height="auto"/>
299 <RowDefinition Height="auto"/>
300 </Grid.RowDefinitions>
Nicolas Jager083b3ae2016-10-04 08:46:19 -0400301 <TextBlock x:Name="_CallStatus_"
Nicolas Jagerc551c362016-10-01 19:24:50 -0400302 Grid.Row="0"
303 Foreground="White"
Nicolas Jager083b3ae2016-10-04 08:46:19 -0400304 Text="{x:Bind _callStatus, Mode=OneWay}"
305 Visibility="{x:Bind _callStatus, Converter={StaticResource _HasAnActiveCall_}, Mode=OneWay}"
Nicolas Jagerc551c362016-10-01 19:24:50 -0400306 HorizontalAlignment="Center">
307 </TextBlock>
308 <StackPanel Orientation="Horizontal"
309 Visibility="Visible"
310 Grid.Row="1"
311 HorizontalAlignment="Center">
312 <Button x:Name="_acceptIncomingCallBtn_"
313 Click="_acceptIncomingCallBtn__Click"
Nicolas Jager083b3ae2016-10-04 08:46:19 -0400314 Visibility="{x:Bind _callStatus, Converter={StaticResource _IncomingVisibility_}, Mode=OneWay}"
Nicolas Jagerc551c362016-10-01 19:24:50 -0400315 VerticalAlignment="Center"
316 HorizontalAlignment="Center"
317 Content="Accept"/>
318 <Button x:Name="_rejectIncomingCallBtn_"
319 Click="_rejectIncomingCallBtn__Click"
Nicolas Jager083b3ae2016-10-04 08:46:19 -0400320 Visibility="{x:Bind _callStatus, Converter={StaticResource _IncomingVisibility_}, Mode=OneWay}"
Nicolas Jagerc551c362016-10-01 19:24:50 -0400321 VerticalAlignment="Center"
322 HorizontalAlignment="Center"
323 Content="Reject"/>
324 <Button x:Name="_cancelCallBtn_"
325 Click="_cancelCallBtn__Click"
Nicolas Jager083b3ae2016-10-04 08:46:19 -0400326 Visibility="{x:Bind _callStatus, Converter={StaticResource _OutGoingVisibility_}, Mode=OneWay}"
Nicolas Jagerc551c362016-10-01 19:24:50 -0400327 VerticalAlignment="Center"
328 HorizontalAlignment="Center"
329 Content="Cancel"/>
330 </StackPanel>
331 </Grid>
Nicolas Jager7c409f32016-09-08 09:35:16 -0400332 </Grid>
333 </DataTemplate>
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400334 </Page.Resources>
335
Nicolas Jager998fbd72016-08-08 11:41:28 -0400336 <Grid>
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400337 <Grid.RowDefinitions>
338 <!-- where accounts and share menu drop down are. -->
339 <RowDefinition Height="auto"/>
340 <!-- where contacts and settings are. -->
341 <RowDefinition Height="*"/>
342 </Grid.RowDefinitions>
343 <!-- drop down menus. -->
344 <Grid Background="LightBlue">
345 <Grid.RowDefinitions>
346 <!-- where the selected account is shown. -->
347 <RowDefinition x:Name="_selectedAccountRow_"
348 Height="90"/>
349 <!-- where the drop down menus are shown. -->
350 <RowDefinition Height="auto"/>
351 </Grid.RowDefinitions>
352 <!-- selected account. -->
353 <Grid Grid.Row="0">
354 <Grid.ColumnDefinitions>
355 <ColumnDefinition x:Name="_selectedAccountAvatarColumn_"
356 Width="90"/>
357 <ColumnDefinition Width="*"/>
358 <ColumnDefinition Width="50"/>
359 </Grid.ColumnDefinitions>
atraczyk2425ddd2016-09-01 13:16:22 -0400360 <Ellipse
361 x:Name="_selectedAccountAvatarContainer_"
362 Height="80"
363 Width="80"
364 Grid.Column="0"
365 Margin="5">
366 <Ellipse.Fill>
367 <ImageBrush
368 x:Name="_selectedAccountAvatar_"
369 ImageSource="Assets\TESTS\contactAvatar.png"/>
370 </Ellipse.Fill>
371 </Ellipse>
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400372 <StackPanel Grid.Column="1"
373 VerticalAlignment="Bottom">
atraczyk4a8cffc2016-08-25 20:01:25 -0400374 <TextBlock x:Name="_selectedAccountName_"
atraczyk5c395ea2016-09-20 17:28:09 -0400375 Text="[TEXT MISSING]"
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400376 Margin="10"
377 Style="{StaticResource TextStyle2}"/>
378 <StackPanel Orientation="Horizontal">
379 <!--Content="&#xE0A1;-->
380 <ToggleButton x:Name="_accountsMenuButton_"
381 VerticalAlignment="Bottom"
382 Content="&#xE168;"
383 Checked="_accountsMenuButton__Checked"
384 Unchecked="_accountsMenuButton__Unchecked"
385 Style="{StaticResource ToggleButtonStyle1}"/>
Nicolas Jagerd0830772016-10-07 08:45:33 -0400386 <!-- _shareMenuButton_ collapsed on purpose -->
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400387 <ToggleButton x:Name="_shareMenuButton_"
388 VerticalAlignment="Bottom"
Nicolas Jagerd0830772016-10-07 08:45:33 -0400389 Visibility="Collapsed"
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400390 Content="&#xE72D;"
391 Checked="_shareMenuButton__Checked"
392 Unchecked="_shareMenuButton__Unchecked"
393 Style="{StaticResource ToggleButtonStyle1}"/>
Nicolas Jagere4eb5132016-10-04 14:25:15 -0400394 <ToggleButton x:Name="_devicesMenuButton_"
395 VerticalAlignment="Bottom"
Nicolas Jagerd0830772016-10-07 08:45:33 -0400396 Content="&#xE836;"
Nicolas Jagere4eb5132016-10-04 14:25:15 -0400397 Checked="_devicesMenuButton__Checked"
Nicolas Jagerd0830772016-10-07 08:45:33 -0400398 Unchecked="_devicesMenuButton__Unchecked"
399 Style="{StaticResource ToggleButtonStyle1}"/>
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400400 </StackPanel>
401 </StackPanel>
402 <ToggleButton x:Name="_settingsTBtn_"
403 Grid.Column="2"
404 VerticalAlignment="Bottom"
405 Content="&#xE115;"
406 Checked="_settings__Checked"
407 Unchecked="_settings__Unchecked"
408 Style="{StaticResource ToggleButtonStyle1}"/>
409 </Grid>
410
411 <!--sub menus like the accounts list or the share menu are just below, technicaly they are nested inside the
Nicolas Jagerc551c362016-10-01 19:24:50 -0400412 same row. To summon them we use the visibility of their own grid, by linking it to a toggle button-->
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400413
414 <!-- accounts menu. -->
415 <Grid x:Name="_accountsMenuGrid_"
416 MaxHeight="350"
417 Grid.Row="1"
418 Visibility="Collapsed"
419 Background="LightBlue">
420 <Grid.RowDefinitions>
421 <RowDefinition Height="*"/>
422 <RowDefinition Height="30"/>
423 </Grid.RowDefinitions>
atraczyk196936e2016-09-02 15:31:53 -0400424 <ScrollViewer x:Name="_accountsListScrollView_"
425 ScrollViewer.VerticalScrollBarVisibility="Auto"
426 ScrollViewer.VerticalScrollMode="Enabled">
427 <ListBox x:Name="_accountsList_"
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400428 Grid.Row="0"
atraczyk4a8cffc2016-08-25 20:01:25 -0400429 SelectionChanged="_accountList__SelectionChanged"
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400430 Width="320"
431 ItemContainerStyle="{StaticResource contactsListBoxStyle}"
432 Background="#FFE4F1F9"
433 ItemTemplate="{StaticResource AccountTemplate}"/>
atraczyk196936e2016-09-02 15:31:53 -0400434 </ScrollViewer>
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400435 <Button x:Name="_addAccountBtn_"
436 Grid.Row="1"
437 VerticalAlignment="Center"
438 HorizontalAlignment="Center"
439 Content="&#xE948;"
440 Click="_addAccountBtn__Click"
atraczyke87716f2016-09-20 13:46:22 -0400441 Style="{StaticResource ButtonStyle6}"/>
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400442 </Grid>
443 <!-- account creation menu. -->
444 <Grid x:Name="_accountCreationMenuGrid_"
445 Grid.Row="2"
446 Visibility="Collapsed"
447 Background="LightBlue">
448 <Grid.RowDefinitions>
449 <RowDefinition Height="*"/>
450 <RowDefinition Height="30"/>
451 </Grid.RowDefinitions>
452 <StackPanel Orientation="Vertical"
453 Grid.Row="0"
454 Background="#FFE4F1F9">
455 <StackPanel Orientation="Horizontal">
456 <TextBlock VerticalAlignment="Center"
457 Text="Account type : "
458 Margin="10,10,0,10"/>
atraczyk196936e2016-09-02 15:31:53 -0400459 <ComboBox x:Name="_accountTypeComboBox_"
460 SelectedIndex="0"
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400461 Margin="10"
462 VerticalAlignment="Center"
463 Width="195">
464 <ComboBoxItem Content="Ring"/>
465 <ComboBoxItem Content="Sip"/>
466 </ComboBox>
467 </StackPanel>
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400468 <!-- RING account. -->
469 <StackPanel x:Name="_ringAccountCreationStack_"
470 Visibility="Visible">
atraczyk196936e2016-09-02 15:31:53 -0400471 <TextBox x:Name="_aliasTextBox_"
472 Margin="10"
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400473 PlaceholderText="Enter your username"/>
474 <PasswordBox Margin="10"
475 PlaceholderText="Enter your password"/>
476 <PasswordBox Margin="10"
477 PlaceholderText="Repeat your Password"/>
478 </StackPanel>
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400479 </StackPanel>
480 <!-- buttons yes/no to create the new account. -->
481 <Grid Grid.Row="1">
482 <StackPanel Orientation="Horizontal"
483 HorizontalAlignment="Center">
484 <Button x:Name="_createAccountYes_"
485 Grid.Row="1"
486 VerticalAlignment="Center"
487 HorizontalAlignment="Center"
488 Content="&#xE081;"
489 Click="_createAccountYes__Click"
atraczyk196936e2016-09-02 15:31:53 -0400490 Style="{StaticResource ButtonStyle5}"/>
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400491 <Button x:Name="_createAccountNo_"
492 Grid.Row="1"
493 VerticalAlignment="Center"
494 HorizontalAlignment="Center"
495 Content="&#xE106;"
496 Click="_createAccountNo__Click"
atraczyk196936e2016-09-02 15:31:53 -0400497 Style="{StaticResource ButtonStyle5}"/>
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400498 </StackPanel>
499 </Grid>
500 </Grid>
501 <!-- share menu. -->
502 <Grid x:Name="_shareMenuGrid_"
503 Grid.Row="2"
504 Visibility="Collapsed"
505 Background="LightBlue">
506 <Grid.RowDefinitions>
507 <RowDefinition Height="*"/>
508 <RowDefinition Height="30"/>
509 </Grid.RowDefinitions>
510 <Grid Background="#FFE4F1F9">
511 <Grid.RowDefinitions>
512 <RowDefinition Height="*"/>
513 <RowDefinition Height="auto"/>
514 <RowDefinition Height="auto"/>
515 </Grid.RowDefinitions>
516 <Image x:Name="_selectedAccountQrCode_"
517 Source="Assets\TESTS\qrcode.png"
518 Width="200"
519 Margin="5"
520 Grid.Row="0"
521 Height="200"/>
522 <TextBlock Text="RingId:"
523 Grid.Row="1"
524 HorizontalAlignment="Center"/>
525 <TextBox Style="{StaticResource TextBoxStyle2}"
526 HorizontalAlignment="Center"
527 Text="c4fc649aed8b2497a5e98fd2d856222f07020044"
528 Grid.Row="2"/>
529 </Grid>
530 </Grid>
Nicolas Jagere4eb5132016-10-04 14:25:15 -0400531 <!-- devices menu. -->
532 <Grid x:Name="_devicesMenuGrid_"
533 Grid.Row="2"
534 Visibility="Collapsed"
535 Background="LightBlue">
536 <Grid.RowDefinitions>
537 <RowDefinition Height="*"/>
538 <RowDefinition Height="30"/>
539 </Grid.RowDefinitions>
540 <Grid Background="#FFE4F1F9">
541 <Grid.RowDefinitions>
542 <RowDefinition Height="auto"/>
Nicolas Jager813cf4d2016-10-06 10:54:46 -0400543 <RowDefinition Height="auto"/>
Nicolas Jagere4eb5132016-10-04 14:25:15 -0400544 <RowDefinition Height="*"/>
545 <RowDefinition Height="auto"/>
546 <RowDefinition Height="auto"/>
547 </Grid.RowDefinitions>
Nicolas Jager813cf4d2016-10-06 10:54:46 -0400548 <TextBlock Text="Device ID:"
Nicolas Jagere4eb5132016-10-04 14:25:15 -0400549 Grid.Row="0"
550 HorizontalAlignment="Center"/>
Nicolas Jager813cf4d2016-10-06 10:54:46 -0400551 <TextBlock x:Name="_deviceId_"
552 Text="[TEXT_MISSING]"
553 Grid.Row="1"
554 IsTextSelectionEnabled="True"
555 HorizontalAlignment="Center"/>
556 <ListBox x:Name="_devicesIdList_"
557 Grid.Row="2"/>
Nicolas Jagere4eb5132016-10-04 14:25:15 -0400558 </Grid>
559 <Button x:Name="_addDevice_"
560 Grid.Row="1"
561 VerticalAlignment="Center"
562 HorizontalAlignment="Center"
563 Content="&#xE948;"
564 Click="_addDevice__Click"
565 Style="{StaticResource ButtonStyle6}"/>
566 </Grid>
Nicolas Jagerd0830772016-10-07 08:45:33 -0400567 <!-- add device (pin generator) menu. -->
568 <Grid x:Name="_addingDeviceGrid_"
569 Grid.Row="2"
570 Visibility="Collapsed"
571 Background="LightBlue">
572 <Grid.RowDefinitions>
573 <RowDefinition Height="*"/>
574 <RowDefinition Height="30"/>
575 </Grid.RowDefinitions>
576 <Grid Background="#FFE4F1F9">
577 <Grid.RowDefinitions>
578 <RowDefinition Height="auto"/>
579 <RowDefinition Height="auto"/>
580 <RowDefinition Height="*"/>
581 </Grid.RowDefinitions>
582 <TextBlock VerticalAlignment="Center"
583 Text="PIN generator"
584 HorizontalAlignment="Center"
585 Grid.Row="0"
586 Margin="10,10,0,10"/>
587 <PasswordBox x:Name="_passwordForPinGenerator_"
588 Margin="10"
589 Grid.Row="1"
590 PlaceholderText="Enter your password"/>
591 </Grid>
592 <!-- buttons yes/no to generate a PIN. -->
593 <Grid Grid.Row="1">
594 <StackPanel Orientation="Horizontal"
595 HorizontalAlignment="Center">
596 <Button x:Name="_pinGeneratorYes_"
597 Grid.Row="1"
598 VerticalAlignment="Center"
599 HorizontalAlignment="Center"
600 Content="&#xE081;"
601 Click="_pinGeneratorYes__Click"
602 Style="{StaticResource ButtonStyle5}"/>
603 <Button x:Name="_pinGeneratorNo_"
604 Grid.Row="1"
605 VerticalAlignment="Center"
606 HorizontalAlignment="Center"
607 Content="&#xE106;"
608 Click="_pinGeneratorNo__Click"
609 Style="{StaticResource ButtonStyle5}"/>
610 </StackPanel>
611 </Grid>
612 </Grid>
613 <!-- waiting for a PIN. -->
614 <Grid x:Name="_waitingForPin_"
615 Grid.Row="2"
616 Visibility="Collapsed"
617 Background="LightBlue">
618 <Grid.RowDefinitions>
619 <RowDefinition Height="*"/>
620 <RowDefinition Height="30"/>
621 </Grid.RowDefinitions>
622 <Grid Background="#FFE4F1F9">
623 <Grid.RowDefinitions>
624 <RowDefinition Height="*"/>
625 <RowDefinition Height="auto"/>
626 <RowDefinition Height="*"/>
627 </Grid.RowDefinitions>
628 <TextBlock x:Name="_waitingAndResult_"
629 VerticalAlignment="Center"
630 Text="Exporting account on the Ring..."
631 HorizontalAlignment="Center"
632 Grid.Row="0"
633 Margin="10,10,0,10"/>
634 </Grid>
635 </Grid>
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400636 </Grid>
Nicolas Jager7c409f32016-09-08 09:35:16 -0400637 <!-- smartList and settings. -->
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400638 <Grid Grid.Row="1">
Nicolas Jager7c409f32016-09-08 09:35:16 -0400639 <!-- contacts + calls => smartpanelitems. -->
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400640 <Grid x:Name="_smartGrid_"
641 Grid.Row="0">
642 <Grid.RowDefinitions>
643 <RowDefinition x:Name="_rowRingTxtBx_"
644 Height="40"/>
645 <RowDefinition Height="*"/>
646 </Grid.RowDefinitions>
647 <TextBox x:Name="_ringTxtBx_"
Nicolas Jager8a85e1f2016-08-15 15:11:06 -0400648 HorizontalAlignment="Center"
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400649 VerticalAlignment="Center"
650 Width="320"
Nicolas Jager8a85e1f2016-08-15 15:11:06 -0400651 TextWrapping="Wrap"
atraczyke87716f2016-09-20 13:46:22 -0400652 Style="{StaticResource addContactTextBoxStyle}"
atraczyk82f8dda2016-08-25 16:34:52 -0400653 KeyDown="_ringTxtBx__KeyDown"
Nicolas Jager8a85e1f2016-08-15 15:11:06 -0400654 Text=""/>
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400655 <ListBox x:Name="_smartList_"
656 Grid.Row="1"
657 Margin="0"
658 Padding="0"
Nicolas Jager8a85e1f2016-08-15 15:11:06 -0400659 SelectionChanged="_smartList__SelectionChanged"
660 ScrollViewer.HorizontalScrollBarVisibility="Auto"
661 ScrollViewer.HorizontalScrollMode="Enabled"
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400662 ItemContainerStyle="{StaticResource contactsListBoxStyle}"
Nicolas Jager7c409f32016-09-08 09:35:16 -0400663 ItemTemplate="{StaticResource SmartPanelItemsTemplate}"/>
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -0400664 </Grid>
665 <!-- settings. -->
666 <Grid x:Name="_settings_"
667 Grid.Row="0"
668 Visibility="Collapsed">
669 <TextBlock>some settings</TextBlock>
670 </Grid>
671 </Grid>
Nicolas Jager998fbd72016-08-08 11:41:28 -0400672 </Grid>
673
674</Page>