protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Validation); Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init(); // Create your application here var textView = FindViewById <TextView>(Resource.Id.Result); var validateButton = FindViewById <Button>(Resource.Id.ValidateButton); var emailText = FindViewById <EditText>(Resource.Id.Email); var passwordText = FindViewById <EditText>(Resource.Id.Password); validateButton.Click += async delegate { SALLab06.ServiceClient client = new SALLab06.ServiceClient(); string email = emailText.Text; string password = passwordText.Text; string deviceInfo = Android.Provider.Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId); var resultInfo = await client.ValidateAsync(email, password, deviceInfo); textView.Text = resultInfo.Status.ToString() + "\n"; textView.Text += resultInfo.Fullname + "\n"; textView.Text += resultInfo.Token; }; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.Validar); // Create your application here var editEmailText = FindViewById <EditText>(Resource.Id.editTextEmail); var passText = FindViewById <EditText>(Resource.Id.editTxtPass); var btnValidar = FindViewById <Button>(Resource.Id.btnValidarActividad); var txtValidar = FindViewById <TextView>(Resource.Id.textViewValidar); btnValidar.Click += async(sender, e) => { var ServiceClient = new SALLab06.ServiceClient(); string StudentEmail = editEmailText.Text; string Password = passText.Text; string myDevice = Android.Provider.Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId); var ResultV = await ServiceClient.ValidateAsync(StudentEmail, Password, myDevice); txtValidar.Text = $"{ResultV.Status}\n{ResultV.Fullname}\n{ResultV.Token}"; }; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.Validate); var TextResult = FindViewById <TextView>(Resource.Id.ResultView); var ValidateButton = FindViewById <Button>(Resource.Id.ValidateButton); var EmailText = FindViewById <EditText>(Resource.Id.EmailText); var PasswordText = FindViewById <EditText>(Resource.Id.PasswordText); string EMail; string Password; string Device = Android.Provider.Settings.Secure.GetString( ContentResolver, Android.Provider.Settings.Secure.AndroidId); ValidateButton.Click += (sender, e) => { EMail = EmailText.Text; Password = PasswordText.Text; Validate(); }; async void Validate() { string Result; var ServiceClient = new SALLab06.ServiceClient(); var SvcResult = await ServiceClient.ValidateAsync(EMail, Password, Device); Result = $"{SvcResult.Status}\n{SvcResult.Fullname}\n{SvcResult.Token}"; TextResult.Text = Result; } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.Validate); Button btnValidar = FindViewById <Button>(Resource.Id.ValidarButton); EditText correoText = FindViewById <EditText>(Resource.Id.CorreoEditText); EditText passwordText = FindViewById <EditText>(Resource.Id.PasswordEditText); btnValidar.Click += async(sender, e) => { var serviceClient = new SALLab06.ServiceClient(); string email = correoText.Text; string password = passwordText.Text; string myDevice = Android.Provider.Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId ); var result = await serviceClient.ValidateAsync(email, password, myDevice); RunOnUiThread(() => { FindViewById <TextView>(Resource.Id.EvidenciaTextView1).Text = $"{result.Status}\n{result.Fullname}\n{result.Token}"; }); }; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Create your application here SetContentView(Resource.Layout.Validate); SetTitle(Resource.String.ValidateActivity); var ValidateButton = FindViewById <Button>(Resource.Id.ValidateButton); var EmailText = FindViewById <TextView>(Resource.Id.EmailText); var PasswordText = FindViewById <TextView>(Resource.Id.PasswordText); var ResultTextView = FindViewById <TextView>(Resource.Id.ResultTextView); ValidateButton.Click += async(object sender, System.EventArgs e) => { SALLab06.ServiceClient ServiceClient = new SALLab06.ServiceClient(); string StudentEmail = EmailText.Text; //"*****@*****.**"; string Pass = PasswordText.Text; //"brisco10"; string myDevice = Android.Provider.Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId); SALLab06.ResultInfo result = await ServiceClient.ValidateAsync(StudentEmail, Pass, myDevice); ResultTextView.Text = $"{result.Status}\n{result.Fullname}\n{result.Token}"; }; }
public async void Validate(string Email, string Password, string Device) { string res; var ServiceClient = new SALLab06.ServiceClient(); var SvcResult = await ServiceClient.ValidateAsync(Email, Password, Device); res = $"{SvcResult.Status}\n{SvcResult.Fullname}\n{SvcResult.Token}"; tvValidacion.Text = res; }
public async void Validate() { var MessageText = FindViewById <TextView>(Resource.Id.textView2); //var ServiceClient = new SALLab05.ServiceClient(); var ServiceClient = new SALLab06.ServiceClient(); string StudentEmail = "*****@*****.**"; string Password = "******"; string myDevice = Android.Provider.Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId); var Result = await ServiceClient.ValidateAsync(StudentEmail, Password, myDevice); MessageText.Text = $"{Result.Status}\n{Result.Fullname})\n{Result.Token}"; }
async void Validate() { var Client = new SALLab06.ServiceClient(); var Result = await Client.ValidateAsync(txtEmail.Text, txtPassword.Text, this); var Alert = UIAlertController.Create("Resultado", $"{Result.Status}\n{Result.FullName}\n{Result.Token}", UIAlertControllerStyle.Alert); Alert.AddAction(UIAlertAction.Create("Ok", UIAlertActionStyle.Default, null)); PresentViewController(Alert, true, null); }
async void validar(string _correo, string _contrasena) { var serviceClient = new SALLab06.ServiceClient(); var user = _correo; var pass = _contrasena; var phoneInfo = Android.Provider.Settings.Secure.GetString( ContentResolver, Android.Provider.Settings.Secure.AndroidId);; var serviceResult = await serviceClient.ValidateAsync(user, pass, phoneInfo); tvPrimero.Text = serviceResult.Status.ToString(); tvSegundo.Text = serviceResult.Fullname; tvTercero.Text = serviceResult.Token; }
public override void ViewDidLoad() { base.ViewDidLoad(); ValidateButton.TouchUpInside += async(sender, e) => { var Client = new SALLab06.ServiceClient(); var Result = await Client.ValidateAsync(CorreoText.Text, ContraText.Text, this); var Alert = UIAlertController.Create("Resultado", $"{Result.Status}\n{Result.FullName}\n{Result.Token}", UIAlertControllerStyle.Alert); Alert.AddAction(UIAlertAction.Create("Ok", UIAlertActionStyle.Default, null)); PresentViewController(Alert, true, null); }; }
async Task Validate(string correo, string pass) { SALLab06.ServiceClient ServiceClient = new SALLab06.ServiceClient(); string StudentMail = correo; string Password = pass; string myDevice = Android.Provider.Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId); var Result = await ServiceClient.ValidateAsync(StudentMail, Password, myDevice); var TextViewValidacion = FindViewById <TextView>(Resource.Id.ValidacionTextView); TextViewValidacion.Text = $"{Result.Status}\n{Result.Fullname}\n{Result.Token}"; }
public async void Validate(string device, string correo, string contrasena) { string Result; var ValidationText = FindViewById <TextView>(Resource.Id.ValidationText); var ServiceClient = new SALLab06.ServiceClient(); Console.WriteLine($"{correo} | {contrasena}"); var SvcResult = await ServiceClient.ValidateAsync( correo, contrasena, device); Result = $"{SvcResult.Status}\n{SvcResult.Fullname}\n{SvcResult.Token}"; ValidationText.Text = Result; }
async partial void ValidateButton_TouchUpInside(UIButton sender) { if (!IsValidCredential()) { return; } var client = new SALLab06.ServiceClient(); var result = await client.ValidateAsync(emailText.Text, passwordText.Text, this); var alert = UIAlertController.Create("Ressultado", $"{result.Status}\n{result.FullName}\n{result.Token}", UIAlertControllerStyle.Alert); alert.AddAction(UIAlertAction.Create("OK", UIAlertActionStyle.Default, null)); PresentViewController(alert, true, null); }
private async void Validate() { var ServiceClient = new SALLab06.ServiceClient(); string StudentEmail = "*****@*****.**"; string Password = "******"; string myDevice = Android.Provider.Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId); var Result = await ServiceClient.ValidateAsync(StudentEmail, Password, myDevice); var txtValidar = FindViewById <TextView>(Resource.Id.txtVValidar); txtValidar.TextAlignment = Android.Views.TextAlignment.Center; txtValidar.Text = $"{Result.Status}\n{Result.Fullname}\n{Result.Token}"; }
public override void ViewDidLoad() { base.ViewDidLoad(); ValidateButton.TouchUpInside += async(object sender, EventArgs e) => { var Client = new SALLab06.ServiceClient(); string email = EmailTextField.Text; string password = PasswordTextField.Text; var Result = await Client.ValidateAsync(email, password, this); var Alert = UIAlertController.Create("Resultado", $"{Result.Status}\n{Result.FullName}\n{Result.Token}", UIAlertControllerStyle.Alert); Alert.AddAction(UIAlertAction.Create("Ok", UIAlertActionStyle.Default, null)); PresentViewController(Alert, true, null); }; }
private async void Validate2() { var miCorreo = FindViewById <EditText>(Resource.Id.textEmailAddress); var miPassword = FindViewById <EditText>(Resource.Id.textPassword); var miResultado = FindViewById <TextView>(Resource.Id.miMensajeText2); var ServiceClient = new SALLab06.ServiceClient(); string StudentEmail = miCorreo.Text.Trim(); string PasswordStudent = miPassword.Text.Trim(); string myDevice = Android.Provider.Settings.Secure.GetString( ContentResolver, Android.Provider.Settings.Secure.AndroidId); var Result = await ServiceClient.ValidateAsync(StudentEmail, PasswordStudent, myDevice); miResultado.Text = $"{Result.Status}\n{Result.Fullname}\n{Result.Token}"; }
private async void Validate() { var miMensajeText = FindViewById <TextView>(Resource.Id.miMensajeText); var ServiceClient = new SALLab06.ServiceClient(); string StudentEmail = @"*****@*****.**"; string PasswordStudent = "********"; // lo acabo de comentar 2018 string myDevice = Android.Provider.Settings.Secure.GetString( ContentResolver, Android.Provider.Settings.Secure.AndroidId); var Result = await ServiceClient.ValidateAsync(StudentEmail, PasswordStudent, myDevice); miMensajeText.Text = $"{Result.Status}\n{Result.Fullname}\n{Result.Token}"; //miMensajeText.Text = $"Satisfactoriamente\nJoharry Correa\ncodigo mmmmm-alak\nXamarinDiplomado3.0-Lab05"; //var miMensajeText = FindViewById<TextView>(Resource.Id.miMensajeText); //miMensajeText.Text = $"Satisfactoriamente\nJoharry Correa\ncodigo mmmmm-alak\nXamarinDiplomado3.0-Lab05"; }
private async void Validate() { var Verificador = FindViewById <TextView>(Resource.Id.Verificador); SALLab06.ServiceClient ServiceClient = new SALLab06.ServiceClient(); string StudentEmail = "*****@*****.**"; string password = "******"; string myDevice = Android.Provider.Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId); SALLab06.ResultInfo Result = await ServiceClient.ValidateAsync(StudentEmail, password, myDevice); /* Android.App.AlertDialog.Builder Builder = new AlertDialog.Builder(this); * AlertDialog Alert = Builder.Create(); * Alert.SetTitle("Resultado de la verificacion"); * Alert.SetIcon(Resource.Drawable.Icon); * Alert.SetMessage($"{Result.Status}\n{Result.Fullname}\n{Result.Token}"); * Alert.SetButton("OK", (s, ev) => { }); * * Alert.Show();*/ Verificador.Text = ($"{Result.Status}\n{Result.Fullname}\n{Result.Token}"); }