Commit 684efb85 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Hide login form if already logged in

parent 30292994
......@@ -48,7 +48,8 @@ namespace Xamarin.Droid
{
using (StreamReader sr = new StreamReader(assets.Open("linphonerc_default")))
{
File.WriteAllText(rc_path, sr.ReadToEnd());
string content = sr.ReadToEnd();
File.WriteAllText(rc_path, content);
}
}
string factory_path = path + "/factory_rc";
......@@ -56,7 +57,8 @@ namespace Xamarin.Droid
{
using (StreamReader sr = new StreamReader(assets.Open("linphonerc_factory")))
{
File.WriteAllText(factory_path, sr.ReadToEnd());
string content = sr.ReadToEnd();
File.WriteAllText(factory_path, content);
}
}
......
......@@ -13,8 +13,8 @@
<Entry x:Name="domain" Placeholder="Domain" Text="sip.linphone.org"/>
<Picker x:Name="transport"/>
<Button x:Name="register" Text="Register" Clicked="OnRegisterClicked" HorizontalOptions="Center" />
<Label x:Name="registration_status" HorizontalOptions="Center" />
</StackLayout>
<Label x:Name="registration_status" HorizontalOptions="Center" />
<Entry x:Name="address" Placeholder="Address" />
<Button x:Name="call" Text="Start Call" Clicked="OnCallClicked" HorizontalOptions="Center" />
......
......@@ -113,6 +113,13 @@ namespace Xamarin
transport.Items.Add(protocol);
}
transport.SelectedIndex = 2;
if (Core.DefaultProxyConfig.State == RegistrationState.Ok)
{
register.IsEnabled = false;
stack_registrar.IsVisible = false;
}
registration_status.Text = "Registration state: " + Core.DefaultProxyConfig.State;
}
private void OnRegisterClicked(object sender, EventArgs e)
......
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