async void ActionLogin(object sender, EventArgs e) { var txtEmail = FindViewById <EditText>(Resource.Id.txtEmail).Text; if (String.IsNullOrEmpty(txtEmail)) { ShowMessageBox(null, Constants.InvalidEmailTxt); return; } ShowLoadingView(Constants.LoadingTxt); var mxData = await MxData.LoadAsync(txtEmail); HideLoadingView(); if (mxData == null) { ShowMessageBox(null, Constants.InvalidEmailTxt); return; } _appSettings.MxData = mxData; _appSettings.Save(); LoginWithEmail(txtEmail); }
partial void ActionLogin(UIButton sender) { if (String.IsNullOrEmpty(txtEmail.Text)) { ShowMessageBox(null, Constants.EmptyEmailTxt); return; } ShowLoadingView(Constants.LoadingTxt); var txt = txtEmail.Text; new System.Threading.Thread(new System.Threading.ThreadStart(async() => { var mxData = await MxData.LoadAsync(txt); InvokeOnMainThread(() => { HideLoadingView(); if (mxData == null) { ShowMessageBox(null, Constants.InvalidEmailTxt); return; } _appSettings.MxData = mxData; _appSettings.Save(); GoToMainVC(txtEmail.Text); }); })).Start(); }