void WcfClient_loginCompleted(object sender, loginCompletedEventArgs e) { if (e.Result != null) { MessageBox.Show(string.Format("{0}登陆成功!", e.Result.realname)); } else { MessageBox.Show("登录失败!"); } }
void Client_loginCompleted(object sender, loginCompletedEventArgs e) { CurrentUser = e.Result; if (CurrentUser != null) { this.resultLabel.Content = CurrentUser.realname + " 登陆成功!"; } else { this.resultLabel.Content = "登陆失败!"; } }
private void OWSProxy_loginCompleted(object sender, loginCompletedEventArgs e) { if (e.Cancelled) { taskSourceLogin.SetCanceled(); } if (e.Error != null) { taskSourceLogin.SetException(e.Error); } if (e.Error == null && !e.Cancelled) { taskSourceLogin.SetResult(e.Result); } }
public void ServiceOnLoginCompleted(object sender, loginCompletedEventArgs eventArgs) { button_Login.Enabled = true; if (eventArgs.Result == null) { textView_Login.Text = Resources.GetText(Resource.String.loginInvalid); editText_Password.Text = string.Empty; editText_Password.Focusable = false; editText_Password.Focusable = false; return; } Session.UsuarioLogado = eventArgs.Result; var it = new Intent(this, typeof(MainActivity)); this.StartActivity(it); this.OverridePendingTransition(Resource.Animation.abc_slide_in_top, Resource.Animation.abc_slide_in_bottom); }
/// <summary> /// Callback for OpenAsync calls /// </summary> /// <param name="sender">should be this object</param> /// <param name="e">Event Args holding the login information from Salesforce</param> private void ls_restloginCompleted(object sender, loginCompletedEventArgs e) { LoginTime = DateTime.Now; Url = e.Result.serverUrl; SessionHeaderValue = new SessionHeader(); SessionHeaderValue.sessionId = e.Result.sessionId; SessionId = e.Result.sessionId; ServerUrl = e.Result.serverUrl; string[] pieces = ServerUrl.Split('/'); Version = pieces[pieces.Length - 2]; ApiEndPoint = new Uri(e.Result.serverUrl); baseUrl = "https://" + ApiEndPoint.Host; state = ConnectionState.Open; }
/// <summary> /// Callback for OpenAsync calls /// </summary> /// <param name="sender">should be this object</param> /// <param name="e">Event Args holding the login information from Salesforce</param> private void ls_loginCompleted(object sender, loginCompletedEventArgs e) { LoginTime = DateTime.Now; Url = e.Result.serverUrl; SessionHeaderValue = new SessionHeader(); SessionHeaderValue.sessionId = e.Result.sessionId; SessionId = e.Result.sessionId; ServerUrl = e.Result.serverUrl; string[] pieces = ServerUrl.Split('/'); Version = pieces[pieces.Length - 2]; ApiEndPoint = new Uri(e.Result.serverUrl); state = ConnectionState.Open; if (customLoginCompleted != null) { customLoginCompleted(sender, e); } }