void ReleaseDesignerOutlets() { if (CityTextField != null) { CityTextField.Dispose(); CityTextField = null; } if (CompanyNameTextField != null) { CompanyNameTextField.Dispose(); CompanyNameTextField = null; } if (PropertyNameTextField != null) { PropertyNameTextField.Dispose(); PropertyNameTextField = null; } if (SquareFeetTextField != null) { SquareFeetTextField.Dispose(); SquareFeetTextField = null; } if (StateTextField != null) { StateTextField.Dispose(); StateTextField = null; } }
void InitializeReverseValues() { //scrollView.Hidden = true; //activityIndicator.Hidden = false; //var timer = new System.Timers.Timer(); //timer.Interval = 50; //timer.Elapsed += delegate //{ //timer.Stop(); //timer.Dispose(); InvokeOnMainThread(async() => { CountryTextField.Text = null; RegionTextField.Text = null; CityTextField.Text = null; DetailAddressTextField.Text = null; //IndexTextField.Text = null; //NotationTextField.Text = null; if (!String.IsNullOrEmpty(countryTemp)) { CountryTextField.FloatLabelTop(); CountryTextField.Text = countryTemp; } if (!String.IsNullOrEmpty(cityTemp)) { CityTextField.FloatLabelTop(); CityTextField.Text = cityTemp; } if (!String.IsNullOrEmpty(regionTemp)) { RegionTextField.FloatLabelTop(); RegionTextField.Text = regionTemp; } if (!String.IsNullOrEmpty(indexTemp)) { IndexTextField.FloatLabelTop(); IndexTextField.Text = indexTemp; } if (!String.IsNullOrEmpty(FullCompanyAddressTemp)) { DetailAddressTextField.FloatLabelTop(); DetailAddressTextField.Text = FullCompanyAddressTemp; } UIApplication.SharedApplication.KeyWindow.EndEditing(true); CoordsTextField.UserInteractionEnabled = false; //await Task.Delay(300); SetScrollViewContentSize(); scrollView.Hidden = false; activityIndicator.Hidden = true; }); //}; //timer.Start(); }
public void FillForm() { IsVisible(By.Id("AddressLine2TextField")); AddressLine2TextField.Clear(); SendData(AddressLine2TextField, "1"); IsVisible(By.Id("AddressTextField")); AddressTextField.Clear(); SendData(AddressTextField, "1"); IsVisible(By.Id("CityTextField")); CityTextField.Clear(); SendData(CityTextField, "1"); IsVisible(By.Id("OrganizationNameTextField")); OrganizationNameTextField.Clear(); SendData(OrganizationNameTextField, "1"); IsVisible(By.Id("OrganizationPhoneTextField")); OrganizationPhoneTextField.Clear(); SendData(OrganizationPhoneTextField, "1"); IsClickable(OrganizationTypeSelectField); OrganizationTypeSelectFieldOption.SelectByIndex(1); IsVisible(By.Id("OrganizationWebsiteTextField")); OrganizationWebsiteTextField.Clear(); SendData(OrganizationWebsiteTextField, "1"); IsVisible(By.Id("ProgramsCheckboxFieldGTCUn6DedTUYoYkAj2DhhBOzg6161")); ProgramsCheckboxFieldGTCUn6DedTUYoYkAj2DhhBOzg6161.Clear(); SendData(ProgramsCheckboxFieldGTCUn6DedTUYoYkAj2DhhBOzg6161, "1"); IsVisible(By.Id("ProgramsCheckboxFieldGTCg6yLH436BQQ9C9QQzKBBBGw6161")); ProgramsCheckboxFieldGTCg6yLH436BQQ9C9QQzKBBBGw6161.Clear(); SendData(ProgramsCheckboxFieldGTCg6yLH436BQQ9C9QQzKBBBGw6161, "1"); IsVisible(By.Id("ProgramsCheckboxFieldGTCoR8of2mFXo47s6Nq0xHb8kA6161")); ProgramsCheckboxFieldGTCoR8of2mFXo47s6Nq0xHb8kA6161.Clear(); SendData(ProgramsCheckboxFieldGTCoR8of2mFXo47s6Nq0xHb8kA6161, "1"); IsClickable(StateSelectField); StateSelectFieldOption.SelectByIndex(1); IsVisible(By.Id("ZipCodeTextField")); ZipCodeTextField.Clear(); SendData(ZipCodeTextField, "1"); } // close FillForm
void ReleaseDesignerOutlets() { if (AddressLine1TextField != null) { AddressLine1TextField.Dispose(); AddressLine1TextField = null; } if (AddressLine2TextField != null) { AddressLine2TextField.Dispose(); AddressLine2TextField = null; } if (AddressLine3TextField != null) { AddressLine3TextField.Dispose(); AddressLine3TextField = null; } if (AlternatePhoneNumberTextField != null) { AlternatePhoneNumberTextField.Dispose(); AlternatePhoneNumberTextField = null; } if (CityTextField != null) { CityTextField.Dispose(); CityTextField = null; } if (CountryTextField != null) { CountryTextField.Dispose(); CountryTextField = null; } if (PhoneNumberTextField != null) { PhoneNumberTextField.Dispose(); PhoneNumberTextField = null; } if (StateTextField != null) { StateTextField.Dispose(); StateTextField = null; } if (ZipCodeTextField != null) { ZipCodeTextField.Dispose(); ZipCodeTextField = null; } }
void ReleaseDesignerOutlets() { if (ProvinceLabel != null) { ProvinceLabel.Dispose(); ProvinceLabel = null; } if (ProvinceTextField != null) { ProvinceTextField.Dispose(); ProvinceTextField = null; } if (CityLabel != null) { CityLabel.Dispose(); CityLabel = null; } if (CityTextField != null) { CityTextField.Dispose(); CityTextField = null; } if (RegionLabel != null) { RegionLabel.Dispose(); RegionLabel = null; } if (RegionTextField != null) { RegionTextField.Dispose(); RegionTextField = null; } if (RegisterButton != null) { RegisterButton.Dispose(); RegisterButton = null; } }
void ReleaseDesignerOutlets() { if (CityTextField != null) { CityTextField.Dispose(); CityTextField = null; } if (GetWeatherButton != null) { GetWeatherButton.Dispose(); GetWeatherButton = null; } if (ActivityIndicator != null) { ActivityIndicator.Dispose(); ActivityIndicator = null; } }
void ReleaseDesignerOutlets() { if (CityTextField != null) { CityTextField.Dispose(); CityTextField = null; } if (ClearButton != null) { ClearButton.Dispose(); ClearButton = null; } if (DescriptionTextField != null) { DescriptionTextField.Dispose(); DescriptionTextField = null; } if (NameTextField != null) { NameTextField.Dispose(); NameTextField = null; } if (PriceTextField != null) { PriceTextField.Dispose(); PriceTextField = null; } if (SaveButton != null) { SaveButton.Dispose(); SaveButton = null; } }
void ReleaseDesignerOutlets() { if (AddressLine12StackView != null) { AddressLine12StackView.Dispose(); AddressLine12StackView = null; } if (AddressLine1TextField != null) { AddressLine1TextField.Dispose(); AddressLine1TextField = null; } if (AddressLine2TextField != null) { AddressLine2TextField.Dispose(); AddressLine2TextField = null; } if (AddressSameAsBuyerLabel != null) { AddressSameAsBuyerLabel.Dispose(); AddressSameAsBuyerLabel = null; } if (AddressSameAsBuyerStackView != null) { AddressSameAsBuyerStackView.Dispose(); AddressSameAsBuyerStackView = null; } if (AddressSameAsBuyerSwitch != null) { AddressSameAsBuyerSwitch.Dispose(); AddressSameAsBuyerSwitch = null; } if (AliasTextField != null) { AliasTextField.Dispose(); AliasTextField = null; } if (CityStateCountryStackView != null) { CityStateCountryStackView.Dispose(); CityStateCountryStackView = null; } if (CityTextField != null) { CityTextField.Dispose(); CityTextField = null; } if (CountryTextField != null) { CountryTextField.Dispose(); CountryTextField = null; } if (CountyLabel != null) { CountyLabel.Dispose(); CountyLabel = null; } if (CountyTextField != null) { CountyTextField.Dispose(); CountyTextField = null; } if (CountyZipStackView != null) { CountyZipStackView.Dispose(); CountyZipStackView = null; } if (EmailErrorLabel != null) { EmailErrorLabel.Dispose(); EmailErrorLabel = null; } if (EmailLabel != null) { EmailLabel.Dispose(); EmailLabel = null; } if (EmailTextField != null) { EmailTextField.Dispose(); EmailTextField = null; } if (FirstNameErrorLabel != null) { FirstNameErrorLabel.Dispose(); FirstNameErrorLabel = null; } if (FirstNameLabel != null) { FirstNameLabel.Dispose(); FirstNameLabel = null; } if (FirstNameTextField != null) { FirstNameTextField.Dispose(); FirstNameTextField = null; } if (HomePhoneEmailStackView != null) { HomePhoneEmailStackView.Dispose(); HomePhoneEmailStackView = null; } if (HomePhoneErrorLabel != null) { HomePhoneErrorLabel.Dispose(); HomePhoneErrorLabel = null; } if (HomePhoneLabel != null) { HomePhoneLabel.Dispose(); HomePhoneLabel = null; } if (HomePhoneTextField != null) { HomePhoneTextField.Dispose(); HomePhoneTextField = null; } if (LastNameErrorLabel != null) { LastNameErrorLabel.Dispose(); LastNameErrorLabel = null; } if (LastNameLabel != null) { LastNameLabel.Dispose(); LastNameLabel = null; } if (LastNameTextField != null) { LastNameTextField.Dispose(); LastNameTextField = null; } if (MiddleLastStackView != null) { MiddleLastStackView.Dispose(); MiddleLastStackView = null; } if (MiddleNameTextField != null) { MiddleNameTextField.Dispose(); MiddleNameTextField = null; } if (MobilePhoneErrorLabel != null) { MobilePhoneErrorLabel.Dispose(); MobilePhoneErrorLabel = null; } if (MobilePhoneLabel != null) { MobilePhoneLabel.Dispose(); MobilePhoneLabel = null; } if (MobilePhoneTextField != null) { MobilePhoneTextField.Dispose(); MobilePhoneTextField = null; } if (MobileWorkPhoneStackView != null) { MobileWorkPhoneStackView.Dispose(); MobileWorkPhoneStackView = null; } if (PrefixFirstStackView != null) { PrefixFirstStackView.Dispose(); PrefixFirstStackView = null; } if (PrefixTextField != null) { PrefixTextField.Dispose(); PrefixTextField = null; } if (StateCountryLabel != null) { StateCountryLabel.Dispose(); StateCountryLabel = null; } if (StateTextField != null) { StateTextField.Dispose(); StateTextField = null; } if (SuffixAliasStackView != null) { SuffixAliasStackView.Dispose(); SuffixAliasStackView = null; } if (SuffixTextField != null) { SuffixTextField.Dispose(); SuffixTextField = null; } if (ValidationErrorLabel != null) { ValidationErrorLabel.Dispose(); ValidationErrorLabel = null; } if (WorkExtensionTextField != null) { WorkExtensionTextField.Dispose(); WorkExtensionTextField = null; } if (WorkPhoneErrorLabel != null) { WorkPhoneErrorLabel.Dispose(); WorkPhoneErrorLabel = null; } if (WorkPhoneLabel != null) { WorkPhoneLabel.Dispose(); WorkPhoneLabel = null; } if (WorkPhoneTextField != null) { WorkPhoneTextField.Dispose(); WorkPhoneTextField = null; } if (ZipCodeTextField != null) { ZipCodeTextField.Dispose(); ZipCodeTextField = null; } }
private void DoneProvinceAction() { ProvinceTextField.EndEditing(false); CityTextField.EndEditing(false); RegionTextField.EndEditing(false); }
void ReleaseDesignerOutlets() { if (AddressLine12StackView != null) { AddressLine12StackView.Dispose(); AddressLine12StackView = null; } if (AddressLine1TextField != null) { AddressLine1TextField.Dispose(); AddressLine1TextField = null; } if (AddressLine2TextField != null) { AddressLine2TextField.Dispose(); AddressLine2TextField = null; } if (AliasTextField != null) { AliasTextField.Dispose(); AliasTextField = null; } if (CityStateCountryStackView != null) { CityStateCountryStackView.Dispose(); CityStateCountryStackView = null; } if (CityTextField != null) { CityTextField.Dispose(); CityTextField = null; } if (ConsentEmailMailStackView != null) { ConsentEmailMailStackView.Dispose(); ConsentEmailMailStackView = null; } if (ConsentEmailSwitch != null) { ConsentEmailSwitch.Dispose(); ConsentEmailSwitch = null; } if (ConsentMailSwitch != null) { ConsentMailSwitch.Dispose(); ConsentMailSwitch = null; } if (ConsentPhoneContactPrefStackView != null) { ConsentPhoneContactPrefStackView.Dispose(); ConsentPhoneContactPrefStackView = null; } if (ConsentPhoneSwitch != null) { ConsentPhoneSwitch.Dispose(); ConsentPhoneSwitch = null; } if (ConsentTextSwitch != null) { ConsentTextSwitch.Dispose(); ConsentTextSwitch = null; } if (ContactPreferenceTextField != null) { ContactPreferenceTextField.Dispose(); ContactPreferenceTextField = null; } if (CountryTextField != null) { CountryTextField.Dispose(); CountryTextField = null; } if (CountyLabel != null) { CountyLabel.Dispose(); CountyLabel = null; } if (CountyTextField != null) { CountyTextField.Dispose(); CountyTextField = null; } if (CountyZipStackView != null) { CountyZipStackView.Dispose(); CountyZipStackView = null; } if (EmailErrorLabel != null) { EmailErrorLabel.Dispose(); EmailErrorLabel = null; } if (EmailTextField != null) { EmailTextField.Dispose(); EmailTextField = null; } if (ExcludeFollowUpSwitch != null) { ExcludeFollowUpSwitch.Dispose(); ExcludeFollowUpSwitch = null; } if (ExcludeReasonTextField != null) { ExcludeReasonTextField.Dispose(); ExcludeReasonTextField = null; } if (ExcludeStackView != null) { ExcludeStackView.Dispose(); ExcludeStackView = null; } if (FirstNameErrorLabel != null) { FirstNameErrorLabel.Dispose(); FirstNameErrorLabel = null; } if (FirstNameLabel != null) { FirstNameLabel.Dispose(); FirstNameLabel = null; } if (FirstNameTextField != null) { FirstNameTextField.Dispose(); FirstNameTextField = null; } if (HomePhoneEmailStackView != null) { HomePhoneEmailStackView.Dispose(); HomePhoneEmailStackView = null; } if (HomePhoneErrorLabel != null) { HomePhoneErrorLabel.Dispose(); HomePhoneErrorLabel = null; } if (HomePhoneTextField != null) { HomePhoneTextField.Dispose(); HomePhoneTextField = null; } if (LastNameErrorLabel != null) { LastNameErrorLabel.Dispose(); LastNameErrorLabel = null; } if (LastNameLabel != null) { LastNameLabel.Dispose(); LastNameLabel = null; } if (LastNameTextField != null) { LastNameTextField.Dispose(); LastNameTextField = null; } if (MiddleLastStackView != null) { MiddleLastStackView.Dispose(); MiddleLastStackView = null; } if (MiddleNameTextField != null) { MiddleNameTextField.Dispose(); MiddleNameTextField = null; } if (MobilePhoneErrorLabel != null) { MobilePhoneErrorLabel.Dispose(); MobilePhoneErrorLabel = null; } if (MobilePhoneTextField != null) { MobilePhoneTextField.Dispose(); MobilePhoneTextField = null; } if (MobileWorkPhoneStackView != null) { MobileWorkPhoneStackView.Dispose(); MobileWorkPhoneStackView = null; } if (PrefixFirstStackView != null) { PrefixFirstStackView.Dispose(); PrefixFirstStackView = null; } if (PrefixTextField != null) { PrefixTextField.Dispose(); PrefixTextField = null; } if (StateCountryLabel != null) { StateCountryLabel.Dispose(); StateCountryLabel = null; } if (StateTextField != null) { StateTextField.Dispose(); StateTextField = null; } if (SuffixAliasStackView != null) { SuffixAliasStackView.Dispose(); SuffixAliasStackView = null; } if (SuffixTextField != null) { SuffixTextField.Dispose(); SuffixTextField = null; } if (TrafficDetailTextField != null) { TrafficDetailTextField.Dispose(); TrafficDetailTextField = null; } if (TrafficSourceDetailError != null) { TrafficSourceDetailError.Dispose(); TrafficSourceDetailError = null; } if (TrafficSourceDetailLabel != null) { TrafficSourceDetailLabel.Dispose(); TrafficSourceDetailLabel = null; } if (TrafficSourceLabel != null) { TrafficSourceLabel.Dispose(); TrafficSourceLabel = null; } if (TrafficSourceTextField != null) { TrafficSourceTextField.Dispose(); TrafficSourceTextField = null; } if (TrafficStackView != null) { TrafficStackView.Dispose(); TrafficStackView = null; } if (ValidationErrorsLabel != null) { ValidationErrorsLabel.Dispose(); ValidationErrorsLabel = null; } if (WorkExtentionTextField != null) { WorkExtentionTextField.Dispose(); WorkExtentionTextField = null; } if (WorkPhoneErrorLabel != null) { WorkPhoneErrorLabel.Dispose(); WorkPhoneErrorLabel = null; } if (WorkPhoneTextField != null) { WorkPhoneTextField.Dispose(); WorkPhoneTextField = null; } if (ZipTextField != null) { ZipTextField.Dispose(); ZipTextField = null; } }
private void InitElements() { // Enable back navigation using swipe. NavigationController.InteractivePopGestureRecognizer.Delegate = null; new AppDelegate().disableAllOrientation = true; keyboard_height = (float)(View.Frame.Height / 2); // Fires when keyboard shows. //keyboardShowObserver = NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.WillShowNotification, (notification) => //{ // NSValue nsKeyboardBounds = (NSValue)notification.UserInfo.ObjectForKey(UIKeyboard.BoundsUserInfoKey); // keyboardBounds = nsKeyboardBounds.RectangleFValue; // keyboard_height = keyboardBounds.Height; // //if (needToScroll) // //{ // //if ((View.Frame.Height - keyboardBounds.Height - 50) < 360) // //{ // //scrollView.ContentOffset = new CoreGraphics.CGPoint(0, keyboardBounds.Height - 100); // //} // //} //}); //// Fires when keyboard hides. //keyboardHideObserver = NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.WillHideNotification, (notification) => //{ // //centering scroll // //scrollView.ContentOffset = new CoreGraphics.CGPoint(0, 0); //}); var deviceModel = Xamarin.iOS.DeviceHardware.Model; //image_bgIV.Frame = new Rectangle(0, 0, Convert.ToInt32(View.Frame.Width), Convert.ToInt32(View.Frame.Height)); if (deviceModel.Contains("X")) { headerView.Frame = new Rectangle(0, 0, Convert.ToInt32(View.Frame.Width), (Convert.ToInt32(View.Frame.Height) / 10) + 8); backBn.Frame = new Rectangle(0, (Convert.ToInt32(View.Frame.Width) / 20) + 20, Convert.ToInt32(View.Frame.Width) / 8, Convert.ToInt32(View.Frame.Width) / 8); headerLabel.Frame = new Rectangle(Convert.ToInt32(View.Frame.Width) / 5, (Convert.ToInt32(View.Frame.Width) / 12) + 20, (Convert.ToInt32(View.Frame.Width) / 5) * 3, Convert.ToInt32(View.Frame.Width) / 18); resetBn.Frame = new Rectangle(Convert.ToInt32(View.Frame.Width - View.Frame.Width / 4), Convert.ToInt32(View.Frame.Width) / 12 + 20, Convert.ToInt32(View.Frame.Width) / 4, Convert.ToInt32(View.Frame.Width) / 19); } else { headerView.Frame = new Rectangle(0, 0, Convert.ToInt32(View.Frame.Width), (Convert.ToInt32(View.Frame.Height) / 10)); backBn.Frame = new Rectangle(0, Convert.ToInt32(View.Frame.Width) / 20, Convert.ToInt32(View.Frame.Width) / 8, Convert.ToInt32(View.Frame.Width) / 8); headerLabel.Frame = new Rectangle(Convert.ToInt32(View.Frame.Width) / 5, Convert.ToInt32(View.Frame.Width) / 12, (Convert.ToInt32(View.Frame.Width) / 5) * 3, Convert.ToInt32(View.Frame.Width) / 18); resetBn.Frame = new Rectangle(Convert.ToInt32(View.Frame.Width - View.Frame.Width / 4), Convert.ToInt32(View.Frame.Width) / 12, Convert.ToInt32(View.Frame.Width) / 4, Convert.ToInt32(View.Frame.Width) / 19); } View.BackgroundColor = UIColor.FromRGB(36, 43, 52); headerView.BackgroundColor = UIColor.FromRGB(36, 43, 52); headerLabel.Text = "Адрес компании"; activityIndicator.Color = UIColor.FromRGB(255, 99, 62); activityIndicator.Frame = new Rectangle((int)(View.Frame.Width / 2 - View.Frame.Width / 20), (int)(headerView.Frame.Height * 2), (int)(View.Frame.Width / 10), (int)(View.Frame.Width / 10)); applyAddressBn.BackgroundColor = UIColor.FromRGB(255, 99, 62); backBn.ImageEdgeInsets = new UIEdgeInsets(backBn.Frame.Height / 3.5F, backBn.Frame.Width / 2.35F, backBn.Frame.Height / 3.5F, backBn.Frame.Width / 3); scrollView.Frame = new Rectangle(0, Convert.ToInt32(headerView.Frame.Y + headerView.Frame.Height), Convert.ToInt32(View.Frame.Width), (Convert.ToInt32(View.Frame.Height - headerView.Frame.Height))); scrollView.Hidden = true; view_in_scroll.Frame = new Rectangle(0, 0 /*Convert.ToInt32(headerView.Frame.Y + headerView.Frame.Height*1.2)*/, Convert.ToInt32(View.Frame.Width), Convert.ToInt32(scrollView.Frame.Height /* - headerView.Frame.Height * 1.2*/)); scrollView.KeyboardDismissMode = UIScrollViewKeyboardDismissMode.Interactive; CountryTextField = new FloatingTextField { TranslatesAutoresizingMaskIntoConstraints = false, Placeholder = "Страна", TextColor = UIColor.White, ReturnKeyType = UIReturnKeyType.Next }; CountryTextField.ShouldReturn = _ => RegionTextField.BecomeFirstResponder(); RegionTextField = new FloatingTextField { TranslatesAutoresizingMaskIntoConstraints = false, Placeholder = "Регион", TextColor = UIColor.White, ReturnKeyType = UIReturnKeyType.Next }; RegionTextField.ShouldReturn = _ => CityTextField.BecomeFirstResponder(); CityTextField = new FloatingTextField { TranslatesAutoresizingMaskIntoConstraints = false, Placeholder = "Город", TextColor = UIColor.White, ReturnKeyType = UIReturnKeyType.Next }; CityTextField.ShouldReturn = _ => DetailAddressTextField.BecomeFirstResponder(); DetailAddressTextField = new FloatingTextField { TranslatesAutoresizingMaskIntoConstraints = false, Placeholder = "Улица, Дом, Корпус, Офис", TextColor = UIColor.White, ReturnKeyType = UIReturnKeyType.Next }; DetailAddressTextField.ShouldReturn = _ => IndexTextField.BecomeFirstResponder(); IndexTextField = new FloatingTextField { TranslatesAutoresizingMaskIntoConstraints = false, Placeholder = "Индекс", KeyboardType = UIKeyboardType.NumberPad, TextColor = UIColor.White, ReturnKeyType = UIReturnKeyType.Next }; IndexTextField.ShouldReturn = _ => NotationTextField.BecomeFirstResponder(); NotationTextField = new FloatingTextField { TranslatesAutoresizingMaskIntoConstraints = false, Placeholder = "Примечание", TextColor = UIColor.White, ReturnKeyType = UIReturnKeyType.Done }; NotationTextField.ShouldReturn = _ => View.EndEditing(true); CoordsTextField = new FloatingTextField { TranslatesAutoresizingMaskIntoConstraints = false, Placeholder = "Координаты", TextColor = UIColor.White, ReturnKeyType = UIReturnKeyType.Done }; CoordsTextField.ShouldReturn = _ => View.EndEditing(true); CoordsRemoveBn = new UIButton { BackgroundColor = UIColor.Clear }; CoordsRemoveBn.Frame = new CoreGraphics.CGRect(0, 430, View.Frame.Width, 60); //ApartmentTextField = new FloatingTextField // { // TranslatesAutoresizingMaskIntoConstraints = false, // Placeholder = "Квартира", // TextColor = UIColor.White, // ReturnKeyType = UIReturnKeyType.Done // }; //ApartmentTextField.ShouldReturn = _ => View.EndEditing(true); //CountryTextField.EditingDidBegin += SetInsets; //RegionTextField.EditingDidBegin += SetInsets; //CityTextField.EditingDidBegin += SetInsets; //DetailAddressTextField.EditingDidBegin += SetInsets; //IndexTextField.EditingDidBegin += SetInsets; //NotationTextField.EditingDidBegin += SetInsets; view_in_scroll.AddSubviews(CountryTextField, RegionTextField, CityTextField, DetailAddressTextField, IndexTextField, NotationTextField, CoordsTextField, CoordsRemoveBn); view_in_scroll.AddConstraints(new NSLayoutConstraint[] { CountryTextField.TopAnchor.ConstraintEqualTo(view_in_scroll.TopAnchor, 12), CountryTextField.LeadingAnchor.ConstraintEqualTo(view_in_scroll.LeadingAnchor, 16), CountryTextField.TrailingAnchor.ConstraintEqualTo(view_in_scroll.TrailingAnchor, -16), CountryTextField.HeightAnchor.ConstraintEqualTo(48), RegionTextField.TopAnchor.ConstraintEqualTo(CountryTextField.TopAnchor, 70), RegionTextField.LeadingAnchor.ConstraintEqualTo(CountryTextField.LeadingAnchor, 0), RegionTextField.TrailingAnchor.ConstraintEqualTo(CountryTextField.TrailingAnchor, 0), RegionTextField.HeightAnchor.ConstraintEqualTo(48), CityTextField.TopAnchor.ConstraintEqualTo(RegionTextField.TopAnchor, 70), CityTextField.LeadingAnchor.ConstraintEqualTo(RegionTextField.LeadingAnchor, 0), CityTextField.TrailingAnchor.ConstraintEqualTo(RegionTextField.TrailingAnchor, 0), CityTextField.HeightAnchor.ConstraintEqualTo(48), DetailAddressTextField.TopAnchor.ConstraintEqualTo(CityTextField.TopAnchor, 70), DetailAddressTextField.LeadingAnchor.ConstraintEqualTo(CityTextField.LeadingAnchor, 0), DetailAddressTextField.TrailingAnchor.ConstraintEqualTo(CityTextField.TrailingAnchor, 0), DetailAddressTextField.HeightAnchor.ConstraintEqualTo(48), IndexTextField.TopAnchor.ConstraintEqualTo(DetailAddressTextField.TopAnchor, 70), IndexTextField.LeadingAnchor.ConstraintEqualTo(DetailAddressTextField.LeadingAnchor, 0), IndexTextField.TrailingAnchor.ConstraintEqualTo(DetailAddressTextField.TrailingAnchor, 0), IndexTextField.HeightAnchor.ConstraintEqualTo(48), NotationTextField.TopAnchor.ConstraintEqualTo(IndexTextField.TopAnchor, 70), NotationTextField.LeadingAnchor.ConstraintEqualTo(IndexTextField.LeadingAnchor, 0), NotationTextField.TrailingAnchor.ConstraintEqualTo(IndexTextField.TrailingAnchor, 0), NotationTextField.HeightAnchor.ConstraintEqualTo(48), CoordsTextField.TopAnchor.ConstraintEqualTo(NotationTextField.TopAnchor, 70), CoordsTextField.LeadingAnchor.ConstraintEqualTo(NotationTextField.LeadingAnchor, 0), CoordsTextField.TrailingAnchor.ConstraintEqualTo(NotationTextField.TrailingAnchor, 0), CoordsTextField.HeightAnchor.ConstraintEqualTo(48), CoordsRemoveBn.TopAnchor.ConstraintEqualTo(NotationTextField.TopAnchor, 70), CoordsRemoveBn.LeadingAnchor.ConstraintEqualTo(NotationTextField.LeadingAnchor, 0), CoordsRemoveBn.TrailingAnchor.ConstraintEqualTo(NotationTextField.TrailingAnchor, 0), CoordsRemoveBn.HeightAnchor.ConstraintEqualTo(48), }); resetBn.SetTitle("Сбросить", UIControlState.Normal); applyAddressBn.SetTitle("ПОДТВЕРДИТЬ АДРЕС", UIControlState.Normal); mapAddressBn.Layer.BorderColor = UIColor.FromRGB(255, 99, 62).CGColor; mapAddressBn.Layer.BorderWidth = 1f; mapAddressBn.SetTitle("ВЫБРАТЬ НА КАРТЕ", UIControlState.Normal); applyAddressBn.Font = UIFont.FromName(Constants.fira_sans, 15f); mapAddressBn.Font = UIFont.FromName(Constants.fira_sans, 15f); resetBn.Font = UIFont.FromName(Constants.fira_sans, 15f); if (!deviceModel.Contains("e 5") && !deviceModel.Contains("e 4") && !deviceModel.ToLower().Contains("e se")) { applyAddressBn.Frame = new Rectangle(Convert.ToInt32(View.Frame.Width) / 15, 600, Convert.ToInt32(View.Frame.Width) - ((Convert.ToInt32(View.Frame.Width) / 15) * 2), Convert.ToInt32(View.Frame.Height) / 12); mapAddressBn.Frame = new Rectangle(Convert.ToInt32(View.Frame.Width) / 15, Convert.ToInt32(applyAddressBn.Frame.Y - (int)(applyAddressBn.Frame.Height + 10)), Convert.ToInt32(View.Frame.Width) - ((Convert.ToInt32(View.Frame.Width) / 15) * 2), Convert.ToInt32(View.Frame.Height) / 12); } else { applyAddressBn.Frame = new Rectangle(Convert.ToInt32(View.Frame.Width) / 15, Convert.ToInt32(view_in_scroll.Frame.Height + 60 - headerView.Frame.Height / 3), Convert.ToInt32(View.Frame.Width) - ((Convert.ToInt32(View.Frame.Width) / 15) * 2), Convert.ToInt32(View.Frame.Height) / 12); mapAddressBn.Frame = new Rectangle(Convert.ToInt32(View.Frame.Width) / 15, Convert.ToInt32(applyAddressBn.Frame.Y - (int)(applyAddressBn.Frame.Height + 10)), Convert.ToInt32(View.Frame.Width) - ((Convert.ToInt32(View.Frame.Width) / 15) * 2), Convert.ToInt32(View.Frame.Height) / 12); var diff = view_in_scroll.Frame.Height - (applyAddressBn.Frame.Y + applyAddressBn.Frame.Height); if (diff < 0) { view_in_scroll.Frame = new Rectangle(0, 0 /*Convert.ToInt32(headerView.Frame.Y + headerView.Frame.Height*1.2)*/, Convert.ToInt32(View.Frame.Width), Convert.ToInt32(applyAddressBn.Frame.Y + applyAddressBn.Frame.Height)); } } SetScrollViewContentSize(); }
private void FillFields() { if (!String.IsNullOrEmpty(FullCompanyAddressTemp) && FullCompanyAddressTemp != " " && !String.IsNullOrEmpty(cityTemp)) { if (FullCompanyAddressTemp.Contains(cityTemp)) { var str = FullCompanyAddressTemp.Substring(0, cityTemp.Length); if (str == cityTemp) { FullCompanyAddressTemp = FullCompanyAddressTemp.Remove(0, cityTemp.Length + 1); } } } else { FullCompanyAddressTemp = null; } var timer = new System.Timers.Timer(); timer.Interval = 50; timer.Elapsed += delegate { timer.Stop(); timer.Dispose(); InvokeOnMainThread(async() => { if (!String.IsNullOrEmpty(country)) { CountryTextField.FloatLabelTop(); CountryTextField.Text = country; } if (!String.IsNullOrEmpty(city)) { CityTextField.FloatLabelTop(); CityTextField.Text = city; } if (!String.IsNullOrEmpty(region)) { RegionTextField.FloatLabelTop(); RegionTextField.Text = region; } if (!String.IsNullOrEmpty(index)) { IndexTextField.FloatLabelTop(); IndexTextField.Text = index; } if (!String.IsNullOrEmpty(FullCompanyAddressStatic)) { DetailAddressTextField.FloatLabelTop(); DetailAddressTextField.Text = FullCompanyAddressStatic; } if (!String.IsNullOrEmpty(notation)) { NotationTextField.FloatLabelTop(); NotationTextField.Text = notation; if (!String.IsNullOrEmpty(notationTemp)) { NotationTextField.Text = notationTemp; } } CoordsTextField.UserInteractionEnabled = true; if (!String.IsNullOrEmpty(CompanyAddressMapViewController.company_lat) && !String.IsNullOrEmpty(CompanyAddressMapViewController.company_lng)) { CoordsTextField.FloatLabelTop(); CoordsTextField.Text = "N" + CompanyAddressMapViewController.company_lat + " E" + CompanyAddressMapViewController.company_lng; } CoordsTextField.UserInteractionEnabled = false; UIApplication.SharedApplication.KeyWindow.EndEditing(true); //await Task.Delay(300); SetScrollViewContentSize(); view_in_scroll.Frame = new Rectangle(0, 0 /*Convert.ToInt32(headerView.Frame.Y + headerView.Frame.Height*1.2)*/, Convert.ToInt32(View.Frame.Width), Convert.ToInt32(applyAddressBn.Frame.Y + applyAddressBn.Frame.Height)); scrollView.Hidden = false; activityIndicator.Hidden = true; if (came_from_map) { addressChangeRequest(); } }); }; timer.Start(); }
void ReleaseDesignerOutlets() { if (NextButton != null) { NextButton.Dispose(); NextButton = null; } if (CityLabel != null) { CityLabel.Dispose(); CityLabel = null; } if (CityTextField != null) { CityTextField.Dispose(); CityTextField = null; } if (ComissionLabel != null) { ComissionLabel.Dispose(); ComissionLabel = null; } if (ComissionTextField != null) { ComissionTextField.Dispose(); ComissionTextField = null; } if (DateLabel != null) { DateLabel.Dispose(); DateLabel = null; } if (DateTextField != null) { DateTextField.Dispose(); DateTextField = null; } if (DegreeOfDifficultyLabel != null) { DegreeOfDifficultyLabel.Dispose(); DegreeOfDifficultyLabel = null; } if (DegreeOfDifficultyTextField != null) { DegreeOfDifficultyTextField.Dispose(); DegreeOfDifficultyTextField = null; } if (FeedDistanceLabel != null) { FeedDistanceLabel.Dispose(); FeedDistanceLabel = null; } if (FeedDistanceValueLabel != null) { FeedDistanceValueLabel.Dispose(); FeedDistanceValueLabel = null; } if (FeedDurationValueLabel != null) { FeedDurationValueLabel.Dispose(); FeedDurationValueLabel = null; } if (TotalDistanceLabel != null) { TotalDistanceLabel.Dispose(); TotalDistanceLabel = null; } if (TotalDistanceValueLabel != null) { TotalDistanceValueLabel.Dispose(); TotalDistanceValueLabel = null; } if (TotalPriceLabel != null) { TotalPriceLabel.Dispose(); TotalPriceLabel = null; } if (TotalPriceValueLabel != null) { TotalPriceValueLabel.Dispose(); TotalPriceValueLabel = null; } }