public async Task CheckLogin() { if (txtUser.Text == "" || txtPwd.Text == "") { txtMsg.Text = "Please input correct User and Password"; } else { try { LogonDetails = await LogonUser.DoLogon(txtUser.Text, txtPwd.Text, "appdb.local", packageName); } catch (Exception ex) { txtMsg.Text = ex.Message; txtUser.Text = ""; txtPwd.Text = ""; #if DEBUG txtUser.Text = "cacota"; txtPwd.Text = "1312"; #endif txtUser.RequestFocus(); return; } //Intent intent = new Intent(); //intent.PutExtra("Result", "OK"); //SetResult(Result.Ok, intent); Finish(); } }
private async void Button1_1_Click(object sender, EventArgs e) { string packageName = "com.espack.partnumberinfo"; LogonDetails = await LogonUser.DoLogon(LogonDetails, packageName); MainActivity.LaunchPackage(packageName, this); //Finish(); }
protected async override void OnStart() { base.OnStart(); CallingPkg = Intent.GetStringExtra("CallingPackage") ?? "com.espack.logon"; if (LogonDetails.User != null) { Intent.RemoveExtra("CallingPackage"); LogonDetails = await LogonUser.DoLogon(LogonDetails.User, LogonDetails.Password, "appdb.local", CallingPkg); await LaunchPackage(CallingPkg, this); CallingPkg = null; return; } }