示例#1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            _tokenField          = new TokenField(new CGRect(10, 100, View.Frame.Width - 20, 30));
            _tokenField.Delegate = this;

            _tokenField.BackgroundColor = UIColor.Red;

            View.AddSubview(_tokenField);

            TokenFieldShouldReturn(_tokenField);
        }
示例#2
0
        public bool TokenFieldShouldReturn(TokenField tokenField)
        {
            string rawString = tokenField._textField.Text;

            rawString = rawString.Trim();

            if (rawString.Length > 0)
            {
                _tokenField.AddTokenWithTitle(rawString, rawString);

                _tokenField._textField.Text     = "";
                _tokenField._canNotDeletedToken = false;
            }
            return(false);
        }
示例#3
0
 public void DidRemoveToken(TokenField tokenField, string title, object representedObject)
 {
 }
        public async Task <AuthenticationResult <bool> > ValidateUpdateToken(TUser user, string updateToken, TokenField field, CancellationToken cancellationToken)
        {
            if (user == null)
            {
                throw new ArgumentNullException(nameof(user));
            }
            if (string.IsNullOrEmpty(updateToken))
            {
                throw new ArgumentNullException(nameof(updateToken));
            }

            await Commit(cancellationToken, StoreTypes.TokenStore);

            return(AuthenticationResult <bool> .Success(true));
        }