Beispiel #1
0
        private async void Validate()
        {
            SALLab02.ServiceClient ServiceClient =
                new SALLab02.ServiceClient();

            string StudentEmail = "";
            string Password     = "";

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

            SALLab02.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 verificación");
            Alert.SetIcon(Resource.Drawable.Icon);
            Alert.SetMessage($"{Result.Status}\n{Result.Fullname}\n{Result.Token}");
            Alert.SetButton("Ok", (s, ev) => { });
            Alert.Show();
        }
Beispiel #2
0
        private async void Validate()
        {
            SALLab02.ServiceClient serviceClient = new SALLab02.ServiceClient();

            string studentEmail = "*****@*****.**";
            string password     = "******";
            string myDevice     = Android.Provider.Settings.Secure.GetString(ContentResolver,
                                                                             Android.Provider.Settings.Secure.AndroidId);

            SALLab02.ResultInfo result = await serviceClient.ValidateAsync(studentEmail, password, myDevice);

            AlertDialog.Builder builder = new AlertDialog.Builder(this);
            AlertDialog         alert   = builder.Create();

            alert.SetTitle("Resultado de la verificación");
            alert.SetIcon(Resource.Drawable.Icon);
            string nl = System.Environment.NewLine;

            alert.SetMessage(
                $"{result.Status}{nl}{result.Fullname}{nl}{result.Token}");
            alert.SetButton("OK", (s, ev) => { });
            alert.Show();
        }