Commit d3e17eb1 authored by Margaux Clerc's avatar Margaux Clerc

Add about page ui

parent d331eccc
......@@ -94,7 +94,7 @@
<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="&#xE946;" RenderTransformOrigin="0.5,0.5">
<FontIcon.RenderTransform>
<CompositeTransform ScaleX=".75" ScaleY=".75"/>
</FontIcon.RenderTransform>
......@@ -273,7 +273,7 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE717;" RenderTransformOrigin="0.5,0.5">
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE75F;" RenderTransformOrigin="0.5,0.5">
<FontIcon.RenderTransform>
<CompositeTransform ScaleX=".75" ScaleY=".75"/>
</FontIcon.RenderTransform>
......@@ -324,7 +324,7 @@
<controls:Numpad
x:Name="numpad"
Grid.Row="0"
Grid.RowSpan="4"
Grid.RowSpan="3"
Grid.ColumnSpan="3"
Visibility="Collapsed"/>
</Grid>
......
......@@ -38,8 +38,6 @@ namespace Linphone.Model
private static LinphoneManager _instance = new LinphoneManager();
public static LinphoneManager Instance { get { return _instance; } }
private String filePath;
public delegate void ChangedEventHandler(object sender, EventArgs e);
public delegate void CallStateChangedEventHandler(Call call, CallState state);
......@@ -172,6 +170,11 @@ namespace Linphone.Model
}
}
}
public String getCoreVersion()
{
return Core.Version;
}
#endregion
#region CallLogs
......@@ -697,7 +700,7 @@ void CoreListener.CallStateChanged(Call call, CallState state, string message)
void CoreListener.DtmfReceived(Call call, char dtmf)
{
throw new NotImplementedException();
//throw new NotImplementedException();
}
void CoreListener.GlobalStateChanged(GlobalState state, string message)
......@@ -707,12 +710,12 @@ void CoreListener.CallStateChanged(Call call, CallState state, string message)
void CoreListener.LogCollectionUploadProgressIndication(int offset, int total)
{
throw new NotImplementedException();
//throw new NotImplementedException();
}
void CoreListener.LogCollectionUploadStateChanged(LogCollectionUploadState state, string info)
{
throw new NotImplementedException();
//throw new NotImplementedException();
}
public class ProxyEventArgs : EventArgs
......@@ -834,6 +837,11 @@ void CoreListener.CallStateChanged(Call call, CallState state, string message)
}
ContactManager.ContactFound -= OnContactFound;
}
public void EcCalibrationStatus(EcCalibratorStatus status, int delayMs)
{
throw new NotImplementedException();
}
#endregion
}
......
......@@ -16,6 +16,11 @@
<Setter Property="Margin" Value="0,0,5,5"/>
</Style>
<Style TargetType="TextBlock" x:Key="AboutTextStyle">
<Setter Property="FontSize" Value="22"/>
<Setter Property="Foreground" Value="#FFFF5E00"/>
</Style>
<Style TargetType="RichTextBlock" x:Key="MessageStyle">
<Setter Property="Foreground" Value="White"/>
<Setter Property="Margin" Value="7,5,2,2"/>
......
......@@ -8,39 +8,63 @@
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
mc:Ignorable="d">
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!--TitlePanel contains the name of the application and page title-->
<StackPanel Grid.Row="0" Margin="12,5,0,0">
<!--<TextBlock Foreground="Black" Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}"/>-->
<TextBlock Text="AboutMenu" Margin="9,-7,0,0"/>
<StackPanel Grid.Row="0" Margin="12,12,12,0">
<TextBlock x:Uid="AboutMenu" Style="{StaticResource HeaderTextStyle}" />
</StackPanel>
<!--ContentPanel - place additional content here-->
<ScrollViewer x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
<Rectangle Width="80" Height="80">
</Rectangle>
<TextBlock
<StackPanel Grid.Row="1" Orientation="Vertical" HorizontalAlignment="Center" Margin="0,20,0,0">
<Image Source="/Assets/linphone_logo_orange.png" Width="100" Height="100">
</Image>
<TextBlock
HorizontalAlignment="Center"
Margin="0,10,0,0"
FontSize="40"
Text="Linphone"
FontWeight="SemiLight"
Style="{StaticResource HeaderTextBlockStyle}"
x:Uid="ApplicationTitle"/>
<Image Source="\Assets\Square44x44Logo.scale-200.png"/>
<TextBlock
<TextBlock
x:Name="AboutText"
HorizontalAlignment="Center"
Margin="0,20,0,0"
TextWrapping="Wrap"
FontSize="25"
TextAlignment="Center" />
</StackPanel>
</ScrollViewer>
Style="{StaticResource AboutTextStyle}"
TextAlignment="Center">
<Run Text="The"></Run>
<Run FontStyle="Italic" Text="libre"></Run>
<Run Text="SIP client"></Run>
</TextBlock>
<TextBlock
TextAlignment="Center"
Style="{StaticResource ListItemStyle}"
Margin="0,10,0,0">
<Run Text="Linphone Windows Phone"/>
<Run x:Name="AppVersion"/>
</TextBlock>
<TextBlock
TextAlignment="Center"
Style="{StaticResource ListItemStyle}">
<Run Text="Linphone Core"/>
<Run x:Name="CoreVersion"/>
</TextBlock>
<TextBlock
TextAlignment="Center"
Margin="0,5,0,0">
<Hyperlink NavigateUri="http://www.linphone.org" Foreground="#FFFF5E00">www.linphone.org</Hyperlink>
</TextBlock>
<TextBlock
TextAlignment="Center"
Margin="0,10,0,0">
GNU General Public License V2 <LineBreak/>
© 2010-2016 Belledonne Communications
</TextBlock>
</StackPanel>
</Grid>
</Page>
\ No newline at end of file
......@@ -14,59 +14,50 @@ 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 Linphone.Model;
using System.Reflection;
using System.Resources;
using Windows.UI.Xaml.Controls;
namespace Linphone.Views
{
/// <summary>
/// Page used to display message about the app.
/// </summary>
public partial class About : Page
{
/// <summary>
/// Public constructor.
/// </summary>
public About()
{
this.InitializeComponent();
//ResourceManager resourceManager = new ResourceManager("Linphone.Resources.AppResources", typeof(AppResources).Assembly);
//string versionName = new AssemblyName(Assembly.GetExecutingAssembly().FullName).Version.ToString();
int i = 0;
//string text = resourceManager.GetString("AboutText", CultureInfo.CurrentCulture);
//Paragraph paragraph = new Paragraph();
var packageId = Windows.ApplicationModel.Package.Current.Id;
AppVersion.Text = string.Format("{0}.{1}.{2}", packageId.Version.Major, packageId.Version.Minor, packageId.Version.Build);
CoreVersion.Text = LinphoneManager.Instance.getCoreVersion();
// Parse the text to insert clickable links when a line start with http://
// And replace #version# tag by actual version name
/* foreach (var line in text.Split('\n'))
{
String textLine = line;
if (line.Contains("#version#"))
{
textLine = line.Replace("#version#", versionName);
}
/* foreach (var line in text.Split('\n'))
{
String textLine = line;
if (line.Contains("#version#"))
{
textLine = line.Replace("#version#", versionName);
}
if (line.StartsWith("http://"))
{
Hyperlink link = new Hyperlink();
link.NavigateUri = new Uri(textLine);
link.Inlines.Add(textLine);
link.TargetName = "_blank";
if (line.StartsWith("http://"))
{
Hyperlink link = new Hyperlink();
link.NavigateUri = new Uri(textLine);
link.Inlines.Add(textLine);
link.TargetName = "_blank";
paragraph.Inlines.Add(link);
i++;
}
else
{
paragraph.Inlines.Add(textLine);
paragraph.Inlines.Add(new LineBreak());
}
}
AboutText.Blocks.Add(paragraph);*/
paragraph.Inlines.Add(link);
i++;
}
else
{
paragraph.Inlines.Add(textLine);
paragraph.Inlines.Add(new LineBreak());
}
}
AboutText.Blocks.Add(paragraph);*/
}
}
}
\ No newline at end of file
......@@ -15,7 +15,7 @@
HorizontalAlignment="Stretch">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="1.5*"/>
</Grid.RowDefinitions>
<Grid x:Name="ContactHeader" VerticalAlignment="Center">
......@@ -61,9 +61,8 @@
Grid.Row="4"
Margin="12"
x:Name="statusIcon"
Visibility="Collapsed"
FontFamily="Segoe MDL2 Assets"
Glyph="&#xE768;"
Glyph=""
RenderTransformOrigin="0.5,0.5"/>
</Grid>
......
......@@ -259,6 +259,24 @@ namespace Linphone.Views
}
}
}
refreshUI();
}
private void refreshUI()
{
if (!LinphoneManager.Instance.IsVideoAvailable)
{
buttons.enabledVideo(false);
}
else {
if (LinphoneManager.Instance.Core.CurrentCall.CurrentParams.IsVideoEnabled)
{
buttons.checkedVideo(true);
}
else {
buttons.checkedVideo(false);
}
}
}
public async void AskVideoPopup(Call call)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment