예제 #1
0
 public static SoapApi getInstance()
 {
     if (SoapApi.instance == null)
     {
         SoapApi.instance = new SoapApi();
     }
     return(SoapApi.instance);
 }
예제 #2
0
        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);
            }
        }