Commit 199691a3 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

First run for the incall view

parent 441fd143
File added
No preview for this file type
......@@ -143,6 +143,9 @@
<Compile Include="Views\History.xaml.cs">
<DependentUpon>History.xaml</DependentUpon>
</Compile>
<Compile Include="Views\InCall.xaml.cs">
<DependentUpon>InCall.xaml</DependentUpon>
</Compile>
<Compile Include="Views\Settings.xaml.cs">
<DependentUpon>Settings.xaml</DependentUpon>
</Compile>
......@@ -188,6 +191,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\InCall.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\Settings.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
......@@ -218,6 +225,7 @@
<Content Include="Assets\AppBar\check.png" />
<Content Include="Assets\AppBar\close.png" />
<Content Include="Assets\AppBar\delete.png" />
<Content Include="Assets\AppBar\dialpad.png" />
<Content Include="Assets\AppBar\download.png" />
<Content Include="Assets\AppBar\edit.png" />
<Content Include="Assets\AppBar\favs.addto.png" />
......@@ -232,16 +240,20 @@
<Content Include="Assets\AppBar\feature.video.png" />
<Content Include="Assets\AppBar\folder.png" />
<Content Include="Assets\AppBar\like.png" />
<Content Include="Assets\AppBar\mic.png" />
<Content Include="Assets\AppBar\microphone.png" />
<Content Include="Assets\AppBar\minus.png" />
<Content Include="Assets\AppBar\new.png" />
<Content Include="Assets\AppBar\next.png" />
<Content Include="Assets\AppBar\overflowdots.png" />
<Content Include="Assets\AppBar\pause.png" />
<Content Include="Assets\AppBar\people.contacts.png" />
<Content Include="Assets\AppBar\play.png" />
<Content Include="Assets\AppBar\questionmark.png" />
<Content Include="Assets\AppBar\refresh.png" />
<Content Include="Assets\AppBar\save.png" />
<Content Include="Assets\AppBar\share.png" />
<Content Include="Assets\AppBar\speaker.png" />
<Content Include="Assets\AppBar\stop.png" />
<Content Include="Assets\AppBar\sync.png" />
<Content Include="Assets\AppBar\time.png" />
......
......@@ -149,5 +149,38 @@ namespace Linphone.Model
//TileManager tileManager = TileManager.Instance;
//tileManager.UpdateTileWithMissedCalls(new Random().Next(10));
}
/// <summary>
/// Stops the current call if any
/// </summary>
public void EndCurrentCall()
{
}
/// <summary>
/// Pauses the current call if any and if it's running
/// </summary>
public void PauseCurrentCall()
{
}
/// <summary>
/// Resume the current call if any and if it's paused
/// </summary>
public void ResumeCurrentCall()
{
}
/// <summary>
/// Hang up the current call if any
/// </summary>
public void HangUp()
{
}
}
}
......@@ -201,6 +201,15 @@ namespace Linphone.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to hang up.
/// </summary>
public static string HangUp {
get {
return ResourceManager.GetString("HangUp", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to History.
/// </summary>
......@@ -210,6 +219,15 @@ namespace Linphone.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to hold.
/// </summary>
public static string Hold {
get {
return ResourceManager.GetString("Hold", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to ILBC.
/// </summary>
......@@ -228,6 +246,15 @@ namespace Linphone.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to mute.
/// </summary>
public static string Mute {
get {
return ResourceManager.GetString("Mute", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to PCMA.
/// </summary>
......@@ -291,6 +318,15 @@ namespace Linphone.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to speaker.
/// </summary>
public static string Speaker {
get {
return ResourceManager.GetString("Speaker", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Speex 16.
/// </summary>
......
......@@ -215,4 +215,16 @@ http://www.linphone.org/m/help
<data name="LockScreenSettings" xml:space="preserve">
<value>LockScreen settings</value>
</data>
<data name="HangUp" xml:space="preserve">
<value>hang up</value>
</data>
<data name="Hold" xml:space="preserve">
<value>hold</value>
</data>
<data name="Mute" xml:space="preserve">
<value>mute</value>
</data>
<data name="Speaker" xml:space="preserve">
<value>speaker</value>
</data>
</root>
\ No newline at end of file
......@@ -37,15 +37,21 @@ namespace Linphone
{
String sipAddressToCall = NavigationContext.QueryString["sip"];
sipAddress.Text = sipAddressToCall;
LinphoneManager.Instance.NewOutgoingCall(sipAddressToCall);
NewOutgoingCall(sipAddressToCall);
}
}
private void call_Click_1(object sender, EventArgs e)
private void NewOutgoingCall(String address)
{
NavigationService.Navigate(new Uri("/Views/InCall.xaml?sip=" + address, UriKind.RelativeOrAbsolute));
LinphoneManager.Instance.NewOutgoingCall(numpad.Address.Text);
}
private void call_Click_1(object sender, EventArgs e)
{
NewOutgoingCall(numpad.Address.Text);
}
private void history_Click_1(object sender, EventArgs e)
{
NavigationService.Navigate(new Uri("/Views/History.xaml", UriKind.RelativeOrAbsolute));
......
This diff is collapsed.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace Linphone.Views
{
public partial class InCall : PhoneApplicationPage
{
private const string speakerOn = "/Assets/AppBar/speaker.png";
private const string speakerOff = "/Assets/AppBar/speaker.png";
private const string micOn = "/Assets/AppBar/mic.png";
private const string micOff = "/Assets/AppBar/mic.png";
private const string pauseOn = "/Assets/AppBar/play.png";
private const string pauseOff = "/Assets/AppBar/pause.png";
public InCall()
{
InitializeComponent();
}
protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (NavigationContext.QueryString.ContainsKey("sip"))
{
}
}
private void hangUp_Click(object sender, RoutedEventArgs e)
{
NavigationService.GoBack();
}
private void speaker_Click_1(object sender, RoutedEventArgs e)
{
bool isSpeakerToggled = (bool)speaker.IsChecked;
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 ? micOn : micOff, UriKind.RelativeOrAbsolute));
}
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));
}
private void dialpad_Click_1(object sender, RoutedEventArgs e)
{
bool isDialpadVisible = (bool)dialpad.IsChecked;
pause.Visibility = isDialpadVisible ? Visibility.Collapsed : Visibility.Visible;
speaker.Visibility = isDialpadVisible ? Visibility.Collapsed : Visibility.Visible;
microphone.Visibility = isDialpadVisible ? Visibility.Collapsed : Visibility.Visible;
numpad.Visibility = isDialpadVisible ? Visibility.Visible : Visibility.Collapsed;
}
private void Numpad_Click_1(object sender, RoutedEventArgs e)
{
}
}
}
\ No newline at end of file
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