public static SoapApi getInstance() { if (SoapApi.instance == null) { SoapApi.instance = new SoapApi(); } return(SoapApi.instance); }
async partial void login(UIButton sender) { UpdateUIForLogin(true); var api = SoapApi.getInstance(); var result = (await api.login(usernameTextField.Text, passwordTextField.Text)); if (result.OK) { var defaults = NSUserDefaults.StandardUserDefaults; defaults.SetString("username", usernameTextField.Text); defaults.SetString("password", passwordTextField.Text); PerformSegue("showMainInterface", this); } else { UpdateUIForLogin(false); } }