Commit 752a7882 authored by Margaux Clerc's avatar Margaux Clerc

Update ui

parent 764679eb
<UserControl x:Class="Linphone.Controls.CallControlsL"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="using:Linphone.Controls"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="860">
<Grid x:Name="LayoutRoot">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<ToggleButton
x:Name="speaker"
Grid.Row="1"
Grid.Column="0"
BorderThickness="0"
Margin="-10"
Click="speaker_Click_1">
<StackPanel Orientation="Vertical">
<Image x:Name="speakerImg" Source="/Assets/Incall_Icons/speaker_off.png" Stretch="None"/>
</StackPanel>
</ToggleButton>
<ToggleButton
x:Name="microphone"
Grid.Row="1"
Grid.Column="1"
BorderThickness="0"
Margin="-10"
Click="microphone_Click_1"
IsEnabled="False">
<StackPanel Orientation="Vertical">
<Image x:Name="microImg" Source="/Assets/Incall_Icons/micro_on.png" Stretch="None" Opacity="0.4"/>
</StackPanel>
</ToggleButton>
<ToggleButton
x:Name="bluetooth"
Grid.Row="1"
Grid.Column="2"
BorderThickness="0"
Margin="-10"
Click="bluetooth_Click_1"
IsEnabled="False">
<StackPanel Orientation="Vertical">
<Image x:Name="bluetoothImg" Source="/Assets/Incall_Icons/bluetooth_off.png" Stretch="None" Opacity="0.4"/>
</StackPanel>
</ToggleButton>
<ToggleButton
x:Name="pause"
Grid.Row="2"
Grid.Column="0"
BorderThickness="0"
Margin="-10"
Click="pause_Click_1"
IsEnabled="False">
<StackPanel Orientation="Vertical">
<Image x:Name="pauseImg" Source="/Assets/Incall_Icons/play.png" Stretch="None" Opacity="0.4"/>
</StackPanel>
</ToggleButton>
<ToggleButton
x:Name="video"
Grid.Row="2"
Grid.Column="1"
BorderThickness="0"
Margin="-10"
Click="video_Click_1"
IsEnabled="False"
Visibility="{Binding VideoButtonVisibility}">
<StackPanel Orientation="Vertical">
<Image x:Name="videoImg" Source="/Assets/Incall_Icons/video_off.png" Stretch="None" Opacity="0.4"/>
</StackPanel>
</ToggleButton>
<ToggleButton
x:Name="stats"
Grid.Row="2"
Grid.Column="2"
BorderThickness="0"
Margin="-10"
Click="stats_Click_1">
<StackPanel Orientation="Vertical">
<Image x:Name="statsImg" Source="/Assets/Incall_Icons/stats.png" Stretch="None"/>
</StackPanel>
</ToggleButton>
<Button
x:Name="camera"
Grid.Row="3"
Grid.Column="3"
BorderThickness="0"
Margin="-10"
Click="camera_Click_1"
IsEnabled="False"
Visibility="{Binding CameraButtonVisibility}">
<StackPanel Orientation="Vertical">
<Image x:Name="cameraImg" Source="/Assets/Incall_Icons/camera.png" Stretch="None" Opacity="0.4"/>
</StackPanel>
</Button>
<Button
x:Name="hangUp"
Grid.Row="3"
Grid.Column="0"
Grid.ColumnSpan="3"
BorderThickness="0"
Margin="-10"
Content="HangUp"
Click="hangUp_Click"
ClickMode="Release"/>
<ToggleButton
x:Name="dialpad"
Grid.Row="3"
Grid.Column="4"
Grid.ColumnSpan="2"
BorderThickness="0"
Margin="-10"
Click="dialpad_Click_1">
<Image Source="/Assets/Incall_Icons/dialpad.png" Stretch="None"/>
</ToggleButton>
<!-- Statistics panel -->
<Grid x:Name="statsPanel" Grid.Row="1" Grid.RowSpan="2" Grid.Column="3" Grid.ColumnSpan="3" Visibility="Collapsed">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="StatPayloadType" Margin="5" Grid.Column="0" Grid.Row="1"/>
<TextBlock Text="{Binding PayloadType}" Grid.Column="1" Grid.Row="1"/>
<TextBlock Text="StatDownloadBandwidth" Margin="5" Grid.Column="0" Grid.Row="2"/>
<TextBlock Text="{Binding DownBandwidth}" Grid.Column="1" Grid.Row="2"/>
<TextBlock Text="StatUploadBandwidth" Margin="5" Grid.Column="0" Grid.Row="3"/>
<TextBlock Text="{Binding UpBandwidth}" Grid.Column="1" Grid.Row="3"/>
<TextBlock Text="StatMediaEncryption" Margin="5" Grid.Column="0" Grid.Row="4"/>
<TextBlock Text="{Binding MediaEncryption}" Grid.Column="1" Grid.Row="4"/>
<TextBlock Text="StatICE" Margin="5" Grid.Column="0" Grid.Row="5"/>
<TextBlock Text="{Binding ICE}" Grid.Column="1" Grid.Row="5"/>
<TextBlock Text="StatReceivedVideoSize" Visibility="{Binding VideoStatsVisibility}" Margin="5" Grid.Column="0" Grid.Row="6"/>
<TextBlock Text="{Binding ReceivedVideoSize}" Visibility="{Binding VideoStatsVisibility}" Grid.Column="1" Grid.Row="6"/>
<TextBlock Text="StatSentVideoSize" Visibility="{Binding VideoStatsVisibility}" Margin="5" Grid.Column="0" Grid.Row="7"/>
<TextBlock Text="{Binding SentVideoSize}" Visibility="{Binding VideoStatsVisibility}" Grid.Column="1" Grid.Row="7"/>
</Grid>
<!-- Numeric pad buttons -->
<controls:Numpad
x:Name="numpad"
Grid.Row="0"
Grid.RowSpan="3"
Grid.Column="3"
Grid.ColumnSpan="3"
Visibility="Collapsed"/>
</Grid>
</UserControl>
\ No newline at end of file
/*
CallControlsL.xaml.cs
Copyright (C) 2015 Belledonne Communications, Grenoble, France
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using Linphone.Model;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media.Imaging;
namespace Linphone.Controls
{
/// <summary>
///
/// </summary>
public partial class CallControlsL : UserControl
{
private const string speakerOn = "/Assets/Incall_Icons/speaker_on.png";
private const string speakerOff = "/Assets/Incall_Icons/speaker_off.png";
private const string bluetoothOn = "/Assets/Incall_Icons/bluetooth_on.png";
private const string bluetoothOff = "/Assets/Incall_Icons/bluetooth_off.png";
private const string videoOn = "/Assets/Incall_Icons/video_on.png";
private const string videoOff = "/Assets/Incall_Icons/video_off.png";
private const string pauseOn = "/Assets/Incall_Icons/pause.png";
private const string pauseOff = "/Assets/Incall_Icons/play.png";
private const string micOn = "/Assets/Incall_Icons/micro_on.png";
private const string micOff = "/Assets/Incall_Icons/micro_off.png";
public delegate void HangUpClickEventHandler(object sender);
public event HangUpClickEventHandler HangUpClick;
public delegate void StatsClickEventHandler(object sender, bool areStatsVisible);
public event StatsClickEventHandler StatsClick;
public delegate void CameraClickEventHandler(object sender);
public event CameraClickEventHandler CameraClick;
public delegate void PauseClickEventHandler(object sender, bool isPaused);
public event PauseClickEventHandler PauseClick;
public delegate bool SpeakerClickEventHandler(object sender, bool isSpeakerOn);
public event SpeakerClickEventHandler SpeakerClick;
public delegate void MuteClickEventHandler(object sender, bool isMuteOn);
public event MuteClickEventHandler MuteClick;
public delegate void VideoClickEventHandler(object sender, bool isVideoOn);
public event VideoClickEventHandler VideoClick;
public delegate void DialpadClickEventHandler(object sender, bool isDialpadShown);
public event DialpadClickEventHandler DialpadClick;
public delegate void BluetoothClickEventHandler(object sender, bool isBluetoothOn);
public event DialpadClickEventHandler BluetoothClick;
/// <summary>
/// Public constructor
/// </summary>
public CallControlsL()
{
this.InitializeComponent();
}
private void hangUp_Click(object sender, RoutedEventArgs e)
{
HangUpClick(this);
}
private void bluetooth_Click_1(object sender, RoutedEventArgs e)
{
/*bool isBluetoothToggled = (bool)bluetooth.IsChecked;
bluetoothImg.Source = new BitmapImage(new Uri(isBluetoothToggled ? bluetoothOn : bluetoothOff, UriKind.RelativeOrAbsolute));
BluetoothClick(this, isBluetoothToggled);*/
}
private void speaker_Click_1(object sender, RoutedEventArgs e)
{
/* bool isSpeakerToggled = (bool)speaker.IsChecked;
if (SpeakerClick(this, isSpeakerToggled))
{
speakerImg.Source = new BitmapImage(new Uri(isSpeakerToggled ? speakerOn : speakerOff, UriKind.RelativeOrAbsolute));
}*/
}
private void microphone_Click_1(object sender, RoutedEventArgs e)
{
/* bool isMicToggled = (bool)microphone.IsChecked;
microImg.Source = new BitmapImage(new Uri(isMicToggled ? micOff : micOn, UriKind.RelativeOrAbsolute));
MuteClick(this, isMicToggled);*/
}
private void stats_Click_1(object sender, RoutedEventArgs e)
{
/*bool areStatsVisible = (bool)stats.IsChecked;
StatsClick(this, areStatsVisible);*/
}
private void video_Click_1(object sender, RoutedEventArgs e)
{
/* bool isVideoToggled = (bool)video.IsChecked;
videoImg.Source = new BitmapImage(new Uri(isVideoToggled ? videoOn : videoOff, UriKind.RelativeOrAbsolute));
VideoClick(this, isVideoToggled);*/
}
private void camera_Click_1(object sender, RoutedEventArgs e)
{
CameraClick(this);
}
private void dialpad_Click_1(object sender, RoutedEventArgs e)
{
//bool isDialpadChecked = (bool)dialpad.IsChecked;
// DialpadClick(this, isDialpadChecked);
}
private void pause_Click_1(object sender, RoutedEventArgs e)
{
// bool isPauseToggled = (bool)pause.IsChecked;
// pauseImg.Source = new BitmapImage(new Uri(isPauseToggled ? pauseOn : pauseOff, UriKind.RelativeOrAbsolute));
// PauseClick(this, isPauseToggled);
}
}
}
......@@ -17,7 +17,7 @@
<Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="Foreground" Value="{ThemeResource SystemChromeWhiteColor}" />
<Setter Property="Background" Value="Red" />
<Setter Property="Background" Value="{ThemeResource SystemControlBackgroundAccentBrush}" />
<Setter Property="MinWidth" Value="0" />
<Setter Property="Height" Value="72" />
<Setter Property="IsTextScaleFactorEnabled" Value="False" />
......@@ -67,6 +67,10 @@
</VisualState>
<VisualState x:Name="Checked">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid"
Storyboard.TargetProperty="Opacity">
<DiscreteObjectKeyFrame KeyTime="0" Value="0.7" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid"
Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAccentBrush}" />
......@@ -219,73 +223,74 @@
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Button
x:Name="camera"
<ToggleButton
x:Name="video"
Grid.Row="2"
Grid.Column="3"
Grid.Column="0"
Style="{StaticResource ToggleButtonStyle}"
BorderThickness="0"
Style="{StaticResource ButtonStyle}"
Click="camera_Click_1"
IsEnabled="False"
Visibility="{Binding CameraButtonVisibility}">
<Button.ContentTemplate>
Click="video_Click_1">
<ToggleButton.ContentTemplate>
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE124;" RenderTransformOrigin="0.5,0.5">
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE116;" RenderTransformOrigin="0.5,0.5">
<FontIcon.RenderTransform>
<CompositeTransform ScaleX=".75" ScaleY=".75"/>
</FontIcon.RenderTransform>
</FontIcon>
<TextBlock Text="Toggle camera"
<TextBlock Text="Video"
Grid.Row="1"
Margin="0,4,0,0"
LineHeight="14"
HorizontalAlignment="Center" />
</Grid>
</DataTemplate>
</Button.ContentTemplate>
</Button>
</ToggleButton.ContentTemplate>
</ToggleButton>
<ToggleButton
x:Name="speaker"
<Button
x:Name="camera"
Grid.Row="2"
Grid.Column="0"
Grid.Column="1"
BorderThickness="0"
Style="{StaticResource ToggleButtonStyle}"
Click="speaker_Click_1">
<ToggleButton.ContentTemplate>
Style="{StaticResource ButtonStyle}"
Click="camera_Click_1"
IsEnabled="True"
Visibility="{Binding CameraButtonVisibility}">
<Button.ContentTemplate>
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE15D;" RenderTransformOrigin="0.5,0.5">
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE124;" RenderTransformOrigin="0.5,0.5">
<FontIcon.RenderTransform>
<CompositeTransform ScaleX=".75" ScaleY=".75"/>
</FontIcon.RenderTransform>
</FontIcon>
<TextBlock Text="Speaker"
<TextBlock Text="Toggle camera"
Grid.Row="1"
Margin="0,4,0,0"
LineHeight="14"
HorizontalAlignment="Center" />
</Grid>
</DataTemplate>
</ToggleButton.ContentTemplate>
</ToggleButton>
</Button.ContentTemplate>
</Button>
<ToggleButton
x:Name="microphone"
Grid.Row="2"
Grid.Column="1"
BorderThickness="0"
<ToggleButton
x:Name="stats"
Grid.Row="3"
Grid.Column="2"
Style="{StaticResource ToggleButtonStyle}"
Click="microphone_Click_1">
BorderThickness="0"
Click="stats_Click_1">
<ToggleButton.ContentTemplate>
<DataTemplate>
<Grid>
......@@ -293,12 +298,12 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE720;" RenderTransformOrigin="0.5,0.5">
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE2C0;" RenderTransformOrigin="0.5,0.5">
<FontIcon.RenderTransform>
<CompositeTransform ScaleX=".75" ScaleY=".75"/>
</FontIcon.RenderTransform>
</FontIcon>
<TextBlock Text="Micro"
<TextBlock Text="Stats"
Grid.Row="1"
Margin="0,4,0,0"
LineHeight="14"
......@@ -307,7 +312,7 @@
</DataTemplate>
</ToggleButton.ContentTemplate>
</ToggleButton>
<ToggleButton
x:Name="bluetooth"
Grid.Row="2"
......@@ -369,14 +374,13 @@
</ToggleButton.ContentTemplate>
</ToggleButton>
<ToggleButton
x:Name="video"
<ToggleButton
x:Name="microphone"
Grid.Row="3"
Grid.Column="1"
Style="{StaticResource ToggleButtonStyle}"
BorderThickness="0"
IsEnabled="False"
Click="video_Click_1">
Style="{StaticResource ToggleButtonStyle}"
Click="microphone_Click_1">
<ToggleButton.ContentTemplate>
<DataTemplate>
<Grid>
......@@ -384,12 +388,12 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE116;" RenderTransformOrigin="0.5,0.5">
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE720;" RenderTransformOrigin="0.5,0.5">
<FontIcon.RenderTransform>
<CompositeTransform ScaleX=".75" ScaleY=".75"/>
</FontIcon.RenderTransform>
</FontIcon>
<TextBlock Text="Video"
<TextBlock Text="Micro"
Grid.Row="1"
Margin="0,4,0,0"
LineHeight="14"
......@@ -400,12 +404,12 @@
</ToggleButton>
<ToggleButton
x:Name="stats"
Grid.Row="3"
Grid.Column="2"
Style="{StaticResource ToggleButtonStyle}"
x:Name="speaker"
Grid.Row="2"
Grid.Column="3"
BorderThickness="0"
Click="stats_Click_1">
Style="{StaticResource ToggleButtonStyle}"
Click="speaker_Click_1">
<ToggleButton.ContentTemplate>
<DataTemplate>
<Grid>
......@@ -413,12 +417,12 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE2C0;" RenderTransformOrigin="0.5,0.5">
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE15D;" RenderTransformOrigin="0.5,0.5">
<FontIcon.RenderTransform>
<CompositeTransform ScaleX=".75" ScaleY=".75"/>
</FontIcon.RenderTransform>
</FontIcon>
<TextBlock Text="Stats"
<TextBlock Text="Speaker"
Grid.Row="1"
Margin="0,4,0,0"
LineHeight="14"
......@@ -427,7 +431,7 @@
</DataTemplate>
</ToggleButton.ContentTemplate>
</ToggleButton>
<Button
x:Name="hangUp"
Grid.Row="4"
......
......@@ -81,6 +81,12 @@ namespace Linphone.Controls
dialpad.Visibility = isDialpadShown ? Visibility.Visible : Visibility.Collapsed;
}
public void enabledVideo(bool isDialpadShown)
{
video.IsEnabled = isDialpadShown;
}
private void hangUp_Click(object sender, RoutedEventArgs e)
{
HangUpClick(this);
......
......@@ -14,6 +14,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
using BelledonneCommunications.Linphone.Native;
using System;
using System.Diagnostics;
using Windows.UI.Xaml.Media.Imaging;
......@@ -149,6 +150,8 @@ namespace Linphone.Model
}
}
private String _displayName;
/// <summary>
/// Named displayed for the caller/callee.
/// </summary>
......@@ -156,11 +159,12 @@ namespace Linphone.Model
{
get
{
if (_isIncoming)
return _from;
else
return _to;
return _displayName;
}
set
{
_displayName = value;
}
}
private DateTime _startDate;
......@@ -188,7 +192,16 @@ namespace Linphone.Model
_to = to;
_isIncoming = isIncoming;
_isMissed = isMissed;
if (_isIncoming)
{
_displayName = Utils.GetUsernameFromAddress((nativeLog as CallLog).FromAddress);
} else
{
_displayName = Utils.GetUsernameFromAddress((nativeLog as CallLog).ToAddress);
}
DateTime unixStart = new DateTime(1970, 1, 1, 0, 0, 0, 0, System.DateTimeKind.Utc);
long unixTimeStampInTicks = (long)(startDate * TimeSpan.TicksPerSecond);
_startDate = new DateTime(unixStart.Ticks + unixTimeStampInTicks).ToLocalTime();
......
......@@ -997,7 +997,8 @@ namespace Linphone.Model
}
if (ValueChanged(AutomaticallyInitiateVideoKeyName) || ValueChanged(AutomaticallyAcceptVideoKeyName))
{
//VideoPolicy policy = LinphoneManager.Instance.Core.VideoPolicy = AutomaticallyInitiateVideoKeyName;
VideoPolicy policy = new VideoPolicy(Convert.ToBoolean(GetNew(AutomaticallyInitiateVideoKeyName)),Convert.ToBoolean(GetNew(AutomaticallyAcceptVideoKeyName)));
LinphoneManager.Instance.Core.VideoPolicy = policy;
}
if (ValueChanged(SelfViewEnabledKeyName))
{
......
......@@ -14,33 +14,24 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
using System;
using System.Globalization;
using System.Windows;
using BelledonneCommunications.Linphone.Native;
using System;
using Windows.UI.Xaml.Data;
using System.Diagnostics;
namespace Linphone.Model
{
/// <summary>
/// Converter returning the AccentColorBrush if the boolean is true, else returning a title color.
/// </summary>
public class SipUriToUsernameConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
string sipAddress = (string)value;
Debug.WriteLine(sipAddress);
//Address addr = LinphoneManager.Instance.Core.InterpretURL(sipAddress);
//return addr.UserName;
return sipAddress;
Address addr = LinphoneManager.Instance.Core.InterpretURL(sipAddress);
return addr.UserName;
}
public object ConvertBack(object value, Type targetType, object parameter, string language)
{
throw new NotImplementedException();
}
}
}
......@@ -14,8 +14,10 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
using BelledonneCommunications.Linphone.Native;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.IsolatedStorage;
using System.Linq;
......@@ -92,6 +94,24 @@ namespace Linphone.Model
return null;
}
public static string GetUsernameFromAddress(Address addr)
{
if (addr.DisplayName != null && addr.DisplayName.Length > 0)
{
return addr.DisplayName;
}
else
{
if(addr.UserName != null && addr.UserName.Length > 0)
{
return addr.UserName;
} else
{
return addr.AsStringUriOnly();
}
}
}
/// <summary>
/// Saves a BitmapImage as a JPEG file in the local storage
/// </summary>
......
......@@ -140,14 +140,14 @@
<data name="DeleteAllMenu" xml:space="preserve">
<value>Delete All</value>
</data>
<data name="HistoryMenu" xml:space="preserve">
<value>History</value>
<data name="HistoryMenu.Text" xml:space="preserve">
<value>HISTORY</value>
</data>
<data name="SaveSettings" xml:space="preserve">
<value>Save</value>
</data>
<data name="SettingsMenu.Text" xml:space="preserve">
<value>Settings</value>
<value>SETTINGS</value>
</data>
<data name="DeleteSelectionMenu" xml:space="preserve">
<value>Delete Selection</value>
......@@ -155,8 +155,8 @@
<data name="AddressHint.PlaceholderText" xml:space="preserve">
<value>Number or address</value>
</data>
<data name="ContactsMenu" xml:space="preserve">
<value>Contacts</value>
<data name="ContactsMenu.Text" xml:space="preserve">
<value>CONTACTS</value>
</data>
<data name="DialerMenu" xml:space="preserve">
<value>Dialer</value>
......@@ -183,31 +183,31 @@ and cc-by-nd from https://github.com/Templarian/WindowsIcons</value>
<data name="AudioSettingsMenu.Text" xml:space="preserve">
<value>Audio settings</value>
</data>
<data name="G722Codec" xml:space="preserve">
<data name="G722Codec.Header" xml:space="preserve">
<value>G722</value>
</data>
<data name="GSMCodec" xml:space="preserve">
<data name="GSMCodec.Header" xml:space="preserve">
<value>GSM</value>
</data>
<data name="ILBCCodec" xml:space="preserve">
<data name="ILBCCodec.Header" xml:space="preserve">
<value>ILBC</value>
</data>
<data name="PCMACodec" xml:space="preserve">
<data name="PCMACodec.Header" xml:space="preserve">
<value>PCMA</value>
</data>
<data name="PCMUCodec" xml:space="preserve">
<data name="PCMUCodec.Header" xml:space="preserve">
<value>PCMU</value>
</data>
<data name="SILK16Codec" xml:space="preserve">
<value>SILK 16</value>
</data>
<data name="Speex16Codec" xml:space="preserve">
<data name="Speex16Codec.Header" x