Commit 5cba4af2 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Improved interface to be much WP like

parent 4062245f
......@@ -8,6 +8,55 @@
<!--Application Resources-->
<Application.Resources>
<local:LocalizedStrings xmlns:local="clr-namespace:Linphone" x:Key="LocalizedStrings"/>
<Style x:Key="AccentColorButton" TargetType="Button">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="{StaticResource PhoneForegroundBrush}"/>
<Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
<Setter Property="BorderThickness" Value="{StaticResource PhoneBorderThickness}"/>
<Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiBold}"/>
<Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMedium}"/>
<Setter Property="Padding" Value="10,5,10,6"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid Background="Transparent">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver"/>
<VisualState x:Name="Pressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer">
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneContrastForegroundBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneContrastBackgroundBrush}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer">
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ButtonBackground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground">
<DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Border x:Name="ButtonBackground" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="0" Margin="{StaticResource PhoneTouchTargetOverhang}">
<ContentControl x:Name="ContentContainer" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Application.Resources>
<Application.ApplicationLifetimeObjects>
......
......@@ -10,8 +10,13 @@
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
d:DesignHeight="100" d:DesignWidth="480">
<Grid x:Name="LayoutRoot">
<Grid x:Name="LayoutRoot" Background="{StaticResource PhoneAccentBrush}">
<Grid.Resources>
<Style TargetType="ContentControl" x:Key="HintCustomStyle">
<Setter Property="Foreground" Value="LightGray"/>
</Style>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="Auto"></ColumnDefinition>
......@@ -27,6 +32,7 @@
BorderThickness="0"
Foreground="White"
Background="Transparent"
HintStyle="{StaticResource HintCustomStyle}"
Hint="{Binding Path=LocalizedResources.AddressHint, Source={StaticResource LocalizedStrings}}"/>
<toolkit:PhoneTextBox
......
......@@ -52,9 +52,9 @@
<ActivatableClass ActivatableClassId="Linphone.Core.BackgroundModeLogger" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.IncomingCallViewDismissedCallback" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.CallController" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.Globals" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.Transports" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.LinphoneCore" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.Globals" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.LinphoneAddress" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.LinphoneAuthInfo" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.LinphoneCall" ThreadingModel="MTA" />
......@@ -77,12 +77,12 @@
<Interface Name="Linphone.Core.__ILinphoneCoreFactoryPublicNonVirtuals" InterfaceId="{C83B6E96-A239-311E-BD2B-880114A4E240}" />
<Interface Name="Linphone.Core.__IBackgroundModeLoggerPublicNonVirtuals" InterfaceId="{5A14F5CD-E159-36A3-A7EB-AC29F8CF301C}" />
<Interface Name="Linphone.Core.__ICallControllerPublicNonVirtuals" InterfaceId="{C50D71F8-F4D8-3871-ADDA-739A4E312CED}" />
<Interface Name="Linphone.Core.__IGlobalsPublicNonVirtuals" InterfaceId="{01600449-19D0-3E52-80E3-382A2C93CBB1}" />
<Interface Name="Linphone.Core.__IGlobalsStatics" InterfaceId="{828E0FFB-4077-39EF-A334-6F19365E4FFE}" />
<Interface Name="Linphone.Core.OutOfProcess.__IServerPublicNonVirtuals" InterfaceId="{46DDE636-87D1-3A06-9D4A-D0753804368A}" />
<Interface Name="Linphone.Core.__ITransportsPublicNonVirtuals" InterfaceId="{9CF934BB-9476-3105-B0DF-49E2F4B2A580}" />
<Interface Name="Linphone.Core.__ITransportsFactory" InterfaceId="{3376B207-4618-313D-B564-D5500B8EFB64}" />
<Interface Name="Linphone.Core.__ILinphoneCorePublicNonVirtuals" InterfaceId="{5D15EB8C-4443-3BC3-BC3D-A319DDE8A2BE}" />
<Interface Name="Linphone.Core.__IGlobalsPublicNonVirtuals" InterfaceId="{01600449-19D0-3E52-80E3-382A2C93CBB1}" />
<Interface Name="Linphone.Core.__IGlobalsStatics" InterfaceId="{828E0FFB-4077-39EF-A334-6F19365E4FFE}" />
<Interface Name="Linphone.Core.OutOfProcess.__IServerPublicNonVirtuals" InterfaceId="{46DDE636-87D1-3A06-9D4A-D0753804368A}" />
<Interface Name="Linphone.Core.__ILinphoneAddressPublicNonVirtuals" InterfaceId="{1EB65211-A8E9-3139-96CA-CD6CD0348372}" />
<Interface Name="Linphone.Core.__ILinphoneAuthInfoPublicNonVirtuals" InterfaceId="{C7039DF8-D910-3633-A2E1-FB0B176790C0}" />
<Interface Name="Linphone.Core.__ILinphoneCallPublicNonVirtuals" InterfaceId="{0985A9C4-838F-3350-AA92-3D22BCBA35D9}" />
......
......@@ -138,6 +138,15 @@ namespace Linphone.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Call.
/// </summary>
public static string Call {
get {
return ResourceManager.GetString("Call", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Call.
/// </summary>
......
......@@ -287,4 +287,7 @@ http://www.linphone.org/m/help
<data name="TransportTLS" xml:space="preserve">
<value>TLS</value>
</data>
<data name="Call" xml:space="preserve">
<value>Call</value>
</data>
</root>
\ No newline at end of file
......@@ -28,7 +28,7 @@
<!--TitlePanel contains the name of the application and page title-->
<StackPanel x:Name="TitlePanel" Grid.Row="1" Margin="12,5,0,0">
<TextBlock Text="{Binding Path=LocalizedResources.DialerMenu, Source={StaticResource LocalizedStrings}}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
<TextBlock Text="{Binding Path=LocalizedResources.DialerMenu, Source={StaticResource LocalizedStrings}}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}" Tap="Title_Tap"/>
</StackPanel>
<!--ContentPanel - place additional content here-->
......@@ -232,12 +232,20 @@
<Grid Grid.Row="2" Margin="0,20,0,20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<controls:TwoStateButton
<Button
Grid.Column="1"
x:Name="call"
DefaultImage="/Assets/call_answer_default.png"
OverImage="/Assets/call_answer_over.png"/>
Background="{StaticResource PhoneAccentBrush}"
Content="{Binding Path=LocalizedResources.Call, Source={StaticResource LocalizedStrings}}"
Click="call_Click_1"
ClickMode="Release">
<Button.Style>
<StaticResource ResourceKey="AccentColorButton"/>
</Button.Style>
</Button>
</Grid>
</Grid>
......
......@@ -30,8 +30,6 @@ namespace Linphone
BuildLocalizedApplicationBar();
ContactManager contactManager = ContactManager.Instance; //Force creation and init of ContactManager
call.Click += call_Click_1;
}
/// <summary>
......@@ -127,5 +125,10 @@ namespace Linphone
appBarAbout.Click += about_Click_1;
ApplicationBar.MenuItems.Add(appBarAbout);
}
private void Title_Tap(object sender, System.Windows.Input.GestureEventArgs e)
{
LinphoneManager.Instance.LinphoneCore.RefreshRegisters();
}
}
}
\ No newline at end of file
......@@ -85,57 +85,6 @@
Content="{Binding Path=LocalizedResources.HangUp, Source={StaticResource LocalizedStrings}}"
Click="hangUp_Click"
ClickMode="Release">
<Button.Resources>
<Style x:Key="AccentColorButton" TargetType="Button">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="{StaticResource PhoneForegroundBrush}"/>
<Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
<Setter Property="BorderThickness" Value="{StaticResource PhoneBorderThickness}"/>
<Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiBold}"/>
<Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMedium}"/>
<Setter Property="Padding" Value="10,5,10,6"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid Background="Transparent">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver"/>
<VisualState x:Name="Pressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer">
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneContrastForegroundBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneContrastBackgroundBrush}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer">
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ButtonBackground">
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground">
<DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Border x:Name="ButtonBackground" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="0" Margin="{StaticResource PhoneTouchTargetOverhang}">
<ContentControl x:Name="ContentContainer" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Button.Resources>
<Button.Style>
<StaticResource ResourceKey="AccentColorButton"/>
</Button.Style>
......
......@@ -2,6 +2,7 @@ In order to compile Linphone, you need:
* A computer with Windows 8 (Pro if you want to use the emulator)
* Visual Studio 11 (2012)
* The Windows Phone 8 SDK
* wget, awk and unzip from the GnuWin32 project and put them in your path (http://gnuwin32.sourceforge.net/) for some mediastreamer2 codecs
To import the solution, open the Linphone.sln file at the root of the project.
......
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