Ejemplo n.º 1
0
        public Boolean checkemail(string email)
        {
            invalid = false;
            if (String.IsNullOrEmpty(email))
            {
                return(false);
            }

            // Use IdnMapping class to convert Unicode domain names.
            try {
                email = Regex.Replace(email, @"(@)(.+)$", this.DomainMapper,
                                      RegexOptions.None, TimeSpan.FromMilliseconds(200));
            }
            catch (RegexMatchTimeoutException) {
                return(false);
            }

            if (invalid)
            {
                return(false);
            }

            // Return true if strIn is in valid e-mail format.
            try {
                return(Regex.IsMatch(email,
                                     @"^(?("")("".+?(?<!\\)""@)|(([0-9a-z]((\.(?!\.))|[-!#\$%&'\*\+/=\?\^`\{\}\|~\w])*)(?<=[0-9a-z])@))" +
                                     @"(?(\[)(\[(\d{1,3}\.){3}\d{1,3}\])|(([0-9a-z][-\w]*[0-9a-z]*\.)+[a-z0-9][\-a-z0-9]{0,22}[a-z0-9]))$",
                                     RegexOptions.IgnoreCase, TimeSpan.FromMilliseconds(250)));
            }
            catch (RegexMatchTimeoutException) {
                return(false);
            }
        }
Ejemplo n.º 2
0
        public RegisterView()
        {
            indicator = new ExtendedIndicator {
                Text            = "Creating Your Native iOS App",
                BackgroundColor = Settings.BackgroundColor,
            };
            BackgroundColor = Settings.BackgroundColor;

            stackLayout = new StackLayout {
                Spacing         = 10,
                Padding         = new Thickness(20, 20, 20, 20),
                VerticalOptions = LayoutOptions.Fill,
                Children        =
                {
                    new ExtendedLabel {
                        Text     = "Just One More Step",
                        FontSize = Settings.FontSize.H2,
                    },
                }
            };
            email = new ExtendedEntryField {
                LabelText = "Email",
                EntryText = "",
            };


            companyname = new ExtendedEntryField {
                LabelText = "Company Name",
                EntryText = "",
            };
            email.Entry.PlaceHolder       = "*****@*****.**";
            companyname.Entry.PlaceHolder = "Your Compnay Name";

            ExtendedButton Next = new ExtendedButton {
                Text = "Next"
            };

            stackLayout.Children.Add(email);

            stackLayout.Children.Add(companyname);



            stackLayout.Children.Add(Next);
            Next.Clicked += OnSaveClicked;



            this.Content = new StackLayout {
                Children =
                {
                    new ScrollView {
                        Content = stackLayout
                    }
                }
            };
        }