示例#1
0
        private async void Validate()
        {
            SALLab05.ServiceClient ServiceClient = new
                                                   SALLab05.ServiceClient();

            var TextValidator = FindViewById <TextView>(Resource.Id.TextValidator);

            string StudentEmail = "xxxx";
            string Password     = "******";

            string myDevice = Android.Provider
                              .Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId);

            SALLab05.ResultInfo Result = await
                                         ServiceClient.ValidateAsync(StudentEmail, Password, myDevice);

            //Android.App.AlertDialog.Builder Builder = new Android.App.AlertDialog.Builder(this);
            //AlertDialog Alert = Builder.Create();

            //Alert.SetTitle("Resultado de la Verificacion");
            // Alert.SetIcon(Resource.Drawable.Icon);
            TextValidator.Text = ($"{Result.Status} \n{Result.Fullname}\n {Result.Token}");
            //TextValidator.Gravity= ($"{Result.Status} \n{Result.Fullname}\n {Result.Token}");
            // Alert.SetButton("Ok", (s, ev) => { });
            // Alert.Show();
        }
示例#2
0
        private async void Validate()
        {
            var TextValidator = FindViewById <TextView>(Resource.Id.TextValidator);

            SALLab05.ServiceClient ServiceClient = new
                                                   SALLab05.ServiceClient();

            string StudentEmail = "*****@*****.**";
            string Password     = "******";

            string myDevice = Android.Provider
                              .Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId);

            SALLab05.ResultInfo Result = await
                                         ServiceClient.ValidateAsync(StudentEmail, Password, myDevice);

            TextValidator.Text = ($"{Result.Status} \n{Result.Fullname}\n {Result.Token}");
        }