public override void ViewDidLoad()
        {
            _didShowNotificationObserver = NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.DidShowNotification, KeyBoardDidShow, this);

            _willHideNotificationObserver = NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.WillHideNotification, KeyBoardWillHide, this);

            ActivityIndicator.StopAnimating();

            this.LoginField.ShouldReturn       += (textField) => textField.ResignFirstResponder();
            this.PasswordField.ShouldReturn    += (textField) => textField.ResignFirstResponder();
            this.AdressField.ShouldReturn      += (textField) => textField.ResignFirstResponder();
            this.PhoneNumberField.ShouldReturn += (textField) => textField.ResignFirstResponder();

            this.View.AddGestureRecognizer(new UITapGestureRecognizer(() =>
            {
                LoginField.ResignFirstResponder();
                PasswordField.ResignFirstResponder();
                AdressField.ResignFirstResponder();
                PhoneNumberField.ResignFirstResponder();
            }));

            RegistrationButton.TouchUpInside += async(sender, e) =>
            {
                Customers registrationFieldsForAsync = new Customers()
                {
                    Name = LoginField.Text, Password = PasswordField.Text, Adress = AdressField.Text, PhoneNumber = PhoneNumberField.Text
                };
                ActivityIndicator.StartAnimating();
                try
                {
                    RegistrationButton.Enabled = false;
                    LoginAndPasswordCheck.LoginCheck(registrationFieldsForAsync.Name);
                    LoginAndPasswordCheck.PasswordCheck(registrationFieldsForAsync.Password);
                    LoginAndPasswordCheck.AdressCheck(registrationFieldsForAsync.Adress);
                    LoginAndPasswordCheck.PhoneCheck(registrationFieldsForAsync.PhoneNumber);
                    await UsersCheckClass.TryToRegister(registrationFieldsForAsync);

                    AppDelegate.UserName = registrationFieldsForAsync.Name;
                    PerformSegue("RegistrationSegue", null);
                }
                catch (FiledsCheckException e1)
                {
                    ActivityIndicator.StopAnimating();
                    RegistrationButton.Enabled = true;
                    PresentViewController(GetAlertsClass.GetAlert(e1.Message), true, null);
                }
                catch (UserCheckClassException e1)
                {
                    ActivityIndicator.StopAnimating();
                    RegistrationButton.Enabled = true;
                    PresentViewController(GetAlertsClass.GetAlert(e1.Message), true, null);
                }
                catch
                {
                    ActivityIndicator.StopAnimating();
                    RegistrationButton.Enabled = true;
                    PresentViewController(GetAlertsClass.GetAlert("Не удалось подключиться к серверу"), true, null);
                }
            };
        }
Beispiel #2
0
 public void InputPaymentInformation(String firstName, String lastName, String phoneNumber, String emailAddress)
 {
     FirstNameField.SendKeys(firstName);
     LastNameField.SendKeys(lastName);
     PhoneNumberField.SendKeys(phoneNumber);
     EmailAddressField.SendKeys(emailAddress);
 }
Beispiel #3
0
 public void InputShippingInformation(String firstName, String lastName, String address, String zip, String city, String county, String state, String phoneNumber, String mobileNumber, String emailAddress)
 {
     FirstNameField.SendKeys(firstName);
     LastNameField.SendKeys(lastName);
     ShippingAddressField.SendKeys(address);
     if (!zip.Equals("N/A"))
     {
         ShippingZipField.SendKeys(zip);
     }
     if (!city.Equals("N/A"))
     {
         ShippingCityField.SendKeys(city);
     }
     if (!county.Equals("N/A"))
     {
         ShippingCountyField.SendKeys(county);
     }
     if (!state.Equals("N/A"))
     {
         ShippingStateField.SendKeys(state);
     }
     PhoneNumberField.SendKeys(phoneNumber);
     MobileNumberField.SendKeys(mobileNumber);
     EmailAddressField.SendKeys(emailAddress);
 }
Beispiel #4
0
 public void InputShippingInformation(String firstName, String lastName, String address, String zip, String phoneNumber, String emailAddress)
 {
     FirstNameField.SendKeys(firstName);
     LastNameField.SendKeys(lastName);
     ShippingAddressField.SendKeys(address);
     ZipLookup(zip);
     PhoneNumberField.SendKeys(phoneNumber);
     EmailAddressField.SendKeys(emailAddress);
 }
 /// <summary>
 /// Constructor for the class
 /// </summary>
 /// <param name="frm">The parent form</param>
 /// <param name="field">The fied to be edited</param>
 public PhoneNumberFieldDefinition(MainForm frm, PhoneNumberField field) : base(frm)
 {
     InitializeComponent();
     this.mode  = FormMode.Edit;
     this.field = field;
     this.page  = field.Page;
     PopulatePatterns();
     cbxPattern.SelectedIndex = -1;
     LoadFormData();
 }
Beispiel #6
0
 public void InputShippingInformation(String firstName, String lastName, String address, String zip, String city, String state, String phoneNumber, String emailAddress)
 {
     FirstNameField.SendKeys(firstName);
     LastNameField.SendKeys(lastName);
     ShippingAddressField.SendKeys(address);
     ShippingZipField.SendKeys(zip);
     ShippingCityField.SendKeys(city);
     new SelectElement(ShippingStateSelect).SelectByText(state);
     PhoneNumberField.SendKeys(phoneNumber);
     EmailAddressField.SendKeys(emailAddress);
 }
 public void EditNameAddress(String newLastName, String newAddress, String newPhoneNumber, String newMobileNumber)
 {
     NameAddressLink.Click();
     LastNameField.Clear();
     LastNameField.SendKeys(newLastName);
     AddressField.Clear();
     AddressField.SendKeys(newAddress);
     PhoneNumberField.Clear();
     PhoneNumberField.SendKeys(newPhoneNumber);
     MobileNumberField.Clear();
     MobileNumberField.SendKeys(newMobileNumber);
     InputComments();
     UpdateButton.Click();
 }
Beispiel #8
0
        void ReleaseDesignerOutlets()
        {
            if (ActivityIndicator != null)
            {
                ActivityIndicator.Dispose();
                ActivityIndicator = null;
            }

            if (AdressField != null)
            {
                AdressField.Dispose();
                AdressField = null;
            }

            if (LoginField != null)
            {
                LoginField.Dispose();
                LoginField = null;
            }

            if (PasswordField != null)
            {
                PasswordField.Dispose();
                PasswordField = null;
            }

            if (PhoneNumberField != null)
            {
                PhoneNumberField.Dispose();
                PhoneNumberField = null;
            }

            if (RegistrationButton != null)
            {
                RegistrationButton.Dispose();
                RegistrationButton = null;
            }
        }
Beispiel #9
0
        public ShippingOptionPage CreateShippingAddress(ShippingAddressInfo shippingAddressInfo)
        {
            FullNameField.Clear();
            FullNameField.SendKeys(shippingAddressInfo.FullName);

            AddressLineFirstField.Clear();
            AddressLineFirstField.SendKeys(shippingAddressInfo.AddressLineFirst);

            AddressLineSecondField.Clear();
            AddressLineSecondField.SendKeys(shippingAddressInfo.AddressLineSecond);

            CityField.Clear();
            CityField.SendKeys(shippingAddressInfo.City);

            StateProvinceRegionField.Clear();
            StateProvinceRegionField.SendKeys(shippingAddressInfo.StateProvinceRegion);

            ZIPField.Clear();
            ZIPField.SendKeys(shippingAddressInfo.ZIP);

            SelectElement CountryDropDown = new SelectElement(Country);

            CountryDropDown.SelectByText(shippingAddressInfo.Country);

            PhoneNumberField.Clear();
            PhoneNumberField.SendKeys(shippingAddressInfo.PhoneNumber);

            //SelectElement WeekendDeliveryDropDown = new SelectElement(WeekendDelivery);
            //WeekendDeliveryDropDown.SelectByText(shippingAddressInfo.WeekendDelivery);

            SecurityAccessCodeField.Clear();
            SecurityAccessCodeField.SendKeys(shippingAddressInfo.SecurityAccessCode);

            ShipTothisAdressButton.Click();
            return(new ShippingOptionPage(_driver));
        }
            public void Step2()
            {
                var d = new Data.Data.AccountOwner();
                var SalutationDropdownSelect = new SelectElement(SalutationDropdown);
                var DOBYearDropdownSelect    = new SelectElement(DobYearDropdown);
                var DOBMonthDropdownSelect   = new SelectElement(DobMonthDropdown);
                var DOBDayDropdownSelect     = new SelectElement(DobDayDropdown);
                var StateDropdownSelect      = new SelectElement(StateDropDown);

                SalutationDropdownSelect.SelectByText(d.Salutation);
                FirstNameField.SendKeys(d.FirstName);
                LastNameField.SendKeys(d.LastName);
                SSNField.SendKeys(d.SSN);
                DOBYearDropdownSelect.SelectByText(d.Year);
                DOBMonthDropdownSelect.SelectByText(d.Month);
                DOBDayDropdownSelect.SelectByText(d.Day);
                Address1Field.SendKeys(d.Address1);
                CityField.SendKeys(d.City);
                StateDropdownSelect.SelectByText(d.State);
                ZipCodeField.SendKeys(d.Zip);
                PhoneNumberField.SendKeys(d.PhoneNum);
                CellRadio.Click();
                NextButton.Click();
            }