public override bool ShouldChangeCharacters(UITextField textField, Foundation.NSRange range, string replacementString) { if (replacementString == "-" && textField.Text.Length > 0) { return(true); } if (replacementString == " " && textField.Text.Length == 0) { return(false); } if (replacementString.Length > 1) { return(false); } if (!string.IsNullOrEmpty(replacementString) && Char.IsDigit(Char.Parse(replacementString)) && textField.Text.Length == 0) { return(false); } if (!string.IsNullOrEmpty(replacementString) && !(replacementString == " " || Char.IsLetterOrDigit(Char.Parse(replacementString)))) { return(false); } if ((replacementString + textField.Text).Length > 40) { return(false); } return(true); }
public override bool ShouldChangeCharacters(UITextField textField, Foundation.NSRange range, string replacementString) { NSString original = NSObject.FromObject(textField.Text) as NSString; NSString replacement = NSObject.FromObject(replacementString) as NSString; NSString updated = original.Replace(range, replacement); var result = Validator.ValidateFloat(updated); return(result == Validator.ValidationResult.Intermediate || result == Validator.ValidationResult.Valid); }
public bool ShouldChangeCharacters(UITextField textField, Foundation.NSRange range, string replacementString) { var newLength = textField.Text.Length + replacementString.Length - range.Length; var text = textField.Text; var result = text.Substring(0, (int)range.Location) + replacementString + text.Substring((int)(range.Location + range.Length)); var shouldChange = newLength <= 21; if (shouldChange) { formatText(result); } return(newLength <= 21); }
public bool ShouldChangeCharacters(UITextField textField, Foundation.NSRange range, string replacementString) { Debug.WriteLine(textField.Text); return(true); }
public virtual void SetTemporaryAttributes (Foundation.NSDictionary<Foundation.NSString,Foundation.NSObject> attributes, Foundation.NSRange characterReange) => throw new NotSupportedException ();
public bool ShouldChangeCharacters(UITextField textField, Foundation.NSRange range, string replacementString) { return(Validations.ValidateText(replacementString)); }
public static NSTextCheckingResult DateCheckingResultWithRange(NSRange range, NSDate date, NSTimeZone timeZone, NSTimeInterval duration) { return(default(NSTextCheckingResult)); }
public static NSTextCheckingResult TransitInformationCheckingResultWithRange(NSRange range, Dictionary <NSObject, AnyObject> components) { return(default(NSTextCheckingResult)); }
public static NSTextCheckingResult PhoneNumberCheckingResultWithRange(NSRange range, string phoneNumber) { return(default(NSTextCheckingResult)); }
public static NSTextCheckingResult ReplacementCheckingResultWithRange(NSRange range, string replacementString) { return(default(NSTextCheckingResult)); }
public static NSTextCheckingResult LinkCheckingResultWithRange(NSRange range, NSURL URL) { return(default(NSTextCheckingResult)); }
public static NSTextCheckingResult GrammarCheckingResultWithRange(NSRange range, AnyObject[] details) { return(default(NSTextCheckingResult)); }
public static NSTextCheckingResult OrthographyCheckingResultWithRange(NSRange range, NSOrthography orthography) { return(default(NSTextCheckingResult)); }
public static NSTextCheckingResult SpellCheckingResultWithRange(NSRange range) { return(default(NSTextCheckingResult)); }
public bool ShouldChangeCharacters(UITextField textField, Foundation.NSRange range, string replacementString) { return(Validations.ValidateInput(replacementString, Validations.ValidationType.Password)); }
public virtual bool IsPartialStringValid(out string partialString, out NSRange proposedSelRange, string origString, NSRange origSelRange, out NSString error) { partialString = origString; proposedSelRange = origSelRange; error = null; return(true); }
public unsafe static void SetBuffers(this IMTLArgumentEncoder This, IMTLBuffer [] buffers, nint [] offsets, Foundation.NSRange range) { fixed(void *handle = offsets) This.SetBuffers(buffers, (IntPtr)handle, range); }
public static NSTextCheckingResult DateCheckingResultWithRange(NSRange range, NSDate date) { return(default(NSTextCheckingResult)); }