private void Save() { if (Domain.Text.Contains(":")) { if (Proxy.Text.Length == 0) { Proxy.Text = Domain.Text; } Domain.Text = Domain.Text.Split(':')[0]; } _settings.Username = Username.Text; _settings.UserId = UserId.Text; _settings.Password = Password.Password; _settings.Domain = Domain.Text; _settings.Proxy = Proxy.Text; _settings.OutboundProxy = OutboundProxy.IsChecked; _settings.DisplayName = DisplayName.Text; _settings.Transport = Transport.SelectedItem.ToString(); _settings.Expires = Expires.Text; _settings.AVPF = AVPF.IsChecked; _settings.Save(); if (linphoneAccount) { NetworkSettingsManager networkSettings = new NetworkSettingsManager(); networkSettings.Load(); networkSettings.MEncryption = networkSettings.EnumToMediaEncryption[MediaEncryption.SRTP]; networkSettings.FWPolicy = networkSettings.EnumToFirewallPolicy[FirewallPolicy.UseIce]; networkSettings.StunServer = "stun.linphone.org"; networkSettings.Save(); } }
private void Save() { _callSettings.SendDTFMsRFC2833 = rfc2833.IsOn; _callSettings.SendDTFMsSIPInfo = sipInfo.IsOn; _callSettings.Save(); _networkSettings.MEncryption = mediaEncryption.SelectedItem.ToString(); _networkSettings.FWPolicy = firewallPolicy.SelectedItem.ToString(); _networkSettings.StunServer = Stun.Text; _networkSettings.IPV6 = IPV6.IsOn; if (TunnelPanel.Visibility == Visibility.Visible) { _networkSettings.TunnelMode = tunnelMode.SelectedItem.ToString(); _networkSettings.TunnelServer = tunnelServer.Text; _networkSettings.TunnelPort = tunnelPort.Text; } _networkSettings.Save(); //_chatSettings.VibrateOnIncomingMessage = vibrator.IsOn; //_chatSettings.ScaleDownSentPictures = resizeDown.IsOn; _chatSettings.Save(); _settings.DebugEnabled = (bool)Debug.IsOn; _settings.Save(); }
private void Save() { _callSettings.SendDTFMsRFC2833 = rfc2833.IsChecked; _callSettings.SendDTFMsSIPInfo = sipInfo.IsChecked; _callSettings.Save(); _networkSettings.MEncryption = MediaEncryption.SelectedItem.ToString(); _networkSettings.FWPolicy = FirewallPolicy.SelectedItem.ToString(); _networkSettings.StunServer = Stun.Text; _networkSettings.TunnelMode = tunnelMode.SelectedItem.ToString(); _networkSettings.TunnelServer = tunnelServer.Text; _networkSettings.TunnelPort = tunnelPort.Text; _networkSettings.Save(); _chatSettings.VibrateOnIncomingMessage = vibrator.IsChecked; _chatSettings.ScaleDownSentPictures = resizeDown.IsChecked; _chatSettings.Save(); _settings.DebugEnabled = (bool)Debug.IsChecked; _settings.Save(); LinphoneManager.Instance.ConfigureLogger(); }
private void LogIn_Click(object sender, RoutedEventArgs e) { ErrorMessage.Text = ""; if (Username.Text.Length > 0 && Domain.Text.Length > 0) { LogIn.IsEnabled = false; Register.IsEnabled = false; LinphoneLogIn.IsEnabled = false; Loading.Visibility = Visibility.Visible; Username.IsEnabled = false; Password.IsEnabled = false; Domain.IsEnabled = false; NetworkSettingsManager networkSettings = new NetworkSettingsManager(); _settings.Username = Username.Text; _settings.Password = Password.Password; _settings.Domain = Domain.Text; if (Domain.Text.Equals("sip.linphone.org")) { _settings.Proxy = "<sip:sip.linphone.org:5223;transport=tls>"; _settings.Transport = AppResources.TransportTLS; _settings.OutboundProxy = true; networkSettings.StunServer = "stun.linphone.org"; networkSettings.FWPolicy = AppResources.FirewallPolicyIce; } networkSettings.Save(); _settings.Save(); NavigationService.Navigate(new Uri("/Views/Dialer.xaml", UriKind.RelativeOrAbsolute)); NavigationService.RemoveBackEntry(); // Prevent a back to this screen from the dialer } else { ErrorMessage.Text = AppResources.ErrorLogin; } }
private void Save() { if (Domain.Text.Contains(":")) { if (Proxy.Text.Length == 0) { Proxy.Text = Domain.Text; } Domain.Text = Domain.Text.Split(':')[0]; } _settings.Username = Username.Text; _settings.UserId = UserId.Text; _settings.Password = Password.Password; _settings.Domain = Domain.Text; _settings.Proxy = Proxy.Text; _settings.OutboundProxy = OutboundProxy.IsOn; _settings.DisplayName = DisplayName.Text; _settings.Transports = Transport.SelectedItem.ToString(); _settings.Expires = Expires.Text; _settings.AVPF = AVPF.IsOn; _settings.ICE = IceSwitch.IsOn; _settings.Save(); if (linphoneAccount) { NetworkSettingsManager networkSettings = new NetworkSettingsManager(); networkSettings.Load(); networkSettings.MEncryption = "SRTP"; networkSettings.FWPolicy = true; networkSettings.StunServer = "stun.linphone.org"; networkSettings.Save(); } }