void ReleaseDesignerOutlets() { if (CityText != null) { CityText.Dispose(); CityText = null; } if (ShowWeather != null) { ShowWeather.Dispose(); ShowWeather = null; } if (TemperatureLabel != null) { TemperatureLabel.Dispose(); TemperatureLabel = null; } if (WeatherLabel != null) { WeatherLabel.Dispose(); WeatherLabel = null; } }
private void AddButton_Click(object sender, EventArgs e) { Location p = new Location(); p.City = CityText.Text; p.Country = CountryText.Text; p.Year = Int32.Parse(YearText.Text); locations.Add(p); History.Items.Add(string.Format("{0} | {1}, {2}", p.Year, p.City, p.Country)); CityText.Clear(); CountryText.Clear(); YearText.Clear(); }
//Fill out the property details form internal void AddPropertyDetails() { // Populating the data from Excel ExcelLib.PopulateInCollection(Base.ExcelPath, "Property Details"); PropertyTypeDropdownButton.Click(); Driver.driver.FindElement(By.XPath("//div[@class='item'][contains(text(),'Short-Term Rental')]")).Click(); // Navigating to Property Details using value from Excel PropertyNameText.SendKeys(ExcelLib.ReadData(2, "Property Name")); NumberText.SendKeys(ExcelLib.ReadData(2, "Number")); StreetText.SendKeys(ExcelLib.ReadData(2, "Street")); DescriptionText.SendKeys(ExcelLib.ReadData(2, "Description")); CityText.SendKeys(ExcelLib.ReadData(2, "City")); PostCodeText.SendKeys(ExcelLib.ReadData(2, "PostCode")); RegionText.SendKeys(ExcelLib.ReadData(2, "Region")); YearBuiltText.SendKeys(ExcelLib.ReadData(2, "Year Built")); TargetRentText.SendKeys(ExcelLib.ReadData(2, "Target Rent")); BedroomsText.SendKeys(ExcelLib.ReadData(2, "Bedrooms")); BathroomsText.SendKeys(ExcelLib.ReadData(2, "Bathrooms")); CarparksText.SendKeys(ExcelLib.ReadData(2, "Carparks")); UploadFileButton.SendKeys(ExcelLib.ReadData(2, "Choose Files")); }
void ReleaseDesignerOutlets() { if (account_settings_title != null) { account_settings_title.Dispose(); account_settings_title = null; } if (BioText != null) { BioText.Dispose(); BioText = null; } if (BtnLocationSettings != null) { BtnLocationSettings.Dispose(); BtnLocationSettings = null; } if (CityText != null) { CityText.Dispose(); CityText = null; } if (DisplayNameText != null) { DisplayNameText.Dispose(); DisplayNameText = null; } if (EmailText != null) { EmailText.Dispose(); EmailText = null; } if (first_label_account_settings_title != null) { first_label_account_settings_title.Dispose(); first_label_account_settings_title = null; } if (lblBio != null) { lblBio.Dispose(); lblBio = null; } if (lblCity != null) { lblCity.Dispose(); lblCity = null; } if (lblComments != null) { lblComments.Dispose(); lblComments = null; } if (lblCount != null) { lblCount.Dispose(); lblCount = null; } if (lblDiscoverDescription != null) { lblDiscoverDescription.Dispose(); lblDiscoverDescription = null; } if (lblDiscoverTeams != null) { lblDiscoverTeams.Dispose(); lblDiscoverTeams = null; } if (lblDisplayName != null) { lblDisplayName.Dispose(); lblDisplayName = null; } if (lblEmail != null) { lblEmail.Dispose(); lblEmail = null; } if (lblHideSocialNetworks != null) { lblHideSocialNetworks.Dispose(); lblHideSocialNetworks = null; } if (lblLikes != null) { lblLikes.Dispose(); lblLikes = null; } if (lblLocation != null) { lblLocation.Dispose(); lblLocation = null; } if (lblName != null) { lblName.Dispose(); lblName = null; } if (lblNotifications != null) { lblNotifications.Dispose(); lblNotifications = null; } if (lblPrivacy != null) { lblPrivacy.Dispose(); lblPrivacy = null; } if (lblProfile != null) { lblProfile.Dispose(); lblProfile = null; } if (left_side_margin_view != null) { left_side_margin_view.Dispose(); left_side_margin_view = null; } if (MainScroll != null) { MainScroll.Dispose(); MainScroll = null; } if (MainScrollBottomConstraint != null) { MainScrollBottomConstraint.Dispose(); MainScrollBottomConstraint = null; } if (Name_Divider != null) { Name_Divider.Dispose(); Name_Divider = null; } if (Name_View != null) { Name_View.Dispose(); Name_View = null; } if (Name_View_Aspect != null) { Name_View_Aspect.Dispose(); Name_View_Aspect = null; } if (NameText != null) { NameText.Dispose(); NameText = null; } if (parent != null) { parent.Dispose(); parent = null; } if (rightLoMargin != null) { rightLoMargin.Dispose(); rightLoMargin = null; } if (second_label_account_settings_title != null) { second_label_account_settings_title.Dispose(); second_label_account_settings_title = null; } if (swComments != null) { swComments.Dispose(); swComments = null; } if (swDiscoverTeams != null) { swDiscoverTeams.Dispose(); swDiscoverTeams = null; } if (swHideSocialNetworks != null) { swHideSocialNetworks.Dispose(); swHideSocialNetworks = null; } if (swLikes != null) { swLikes.Dispose(); swLikes = null; } if (swNotifications != null) { swNotifications.Dispose(); swNotifications = null; } if (VersionNumber != null) { VersionNumber.Dispose(); VersionNumber = null; } if (ViewHideBlockDiscover != null) { ViewHideBlockDiscover.Dispose(); ViewHideBlockDiscover = null; } if (ViewHideBlockNotification != null) { ViewHideBlockNotification.Dispose(); ViewHideBlockNotification = null; } }
public override void ViewDidLoad() { base.ViewDidLoad(); DisplayNameText.Text = StringWithEmojiConverter.ConvertEmojiFromServer(SL.Profile.UserName);//need to anderstand difference from NameText CityText.Text = SL.Profile.City ?? ""; NameOfCity = SL.Profile.City ?? ""; NameText.Text = SL.Profile.UserName; CityText.EditingChanged += (s, e) => { CityText.Text = CheckText(CityText.Text); }; EmailText.EditingDidEnd += (s, e) => { var profile = SL.Profile; profile.EmailAddress = EmailText.Text; SL.Manager.SaveProfileAsync(profile); SL.Profile = profile; }; NameText.ShouldReturn = delegate { NameText.EndEditing(true); return(true); }; DisplayNameText.ShouldReturn = delegate { DisplayNameText.EndEditing(true); return(true); }; CityText.ShouldReturn = delegate { CityText.EndEditing(true); return(true); }; EmailText.ShouldReturn = delegate { EmailText.EndEditing(true); return(true); }; var tap = new UITapGestureRecognizer(() => { foreach (var view in View.Subviews[0].Subviews[0].Subviews) { if (view is UITextView text) { text.ResignFirstResponder(); } if (view is UITextField text1) { text1.ResignFirstResponder(); } } }); View.AddGestureRecognizer(tap); EmailText.Text = SL.Profile.EmailAddress; var version = NSBundle.MainBundle.InfoDictionary["CFBundleVersion"];//NSBundle.MainBundle.InfoDictionary["CFBundleShortVersionString"]; VersionNumber.Text = $"v{version.Description}"; #region v2 //swFromElectricAdvinture.On = SL.AppSettings.GetValueOrDefault("FromElectricAdvintureEnabled", false); //swFromElectricAdvinture.ValueChanged += SwFromElectricAdvinture_ValueChanged; //Need remove to v.2 Name_View.TranslatesAutoresizingMaskIntoConstraints = false; Name_Divider.Hidden = true; Name_View.RemoveConstraint(Name_View_Aspect); Name_View.AddConstraint(NSLayoutConstraint.Create(Name_View, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 0, 0)); Name_View.UpdateConstraints(); #endregion swComments.On = SL.AppSettings.GetValueOrDefault("CommentsEnabled", false); swComments.ValueChanged += SwComments_ValueChanged; swLikes.On = SL.AppSettings.GetValueOrDefault("LikesEnabled", false); swLikes.ValueChanged += SwLikes_ValueChanged; swDiscoverTeams.On = SL.AppSettings.GetValueOrDefault("DiscoverTeamsEnabled", false); swDiscoverTeams.ValueChanged += SwDiscoverTeams_ValueChanged; swHideSocialNetworks.On = SL.AppSettings.GetValueOrDefault("HideSocialNetworksEnabled", false); swHideSocialNetworks.ValueChanged += SwHideSocialNetworks_ValueChanged; #region v1 var notificationStatus = SL.AppSettings.GetValueOrDefault("NotificationStatus", string.Empty); swNotifications.On = notificationStatus.Equals(Enums.NotififcationStatus.Enabled.ToString()) ? true : false; swNotifications.ValueChanged += SwNotifications_ValueChanged; //SetupNotificationSwitch(); ViewHideBlockDiscover.AddConstraint(NSLayoutConstraint.Create(ViewHideBlockDiscover, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1, 0)); ViewHideBlockNotification.AddConstraint(NSLayoutConstraint.Create(ViewHideBlockNotification, NSLayoutAttribute.Height, NSLayoutRelation.Equal, 1, 0)); View.UpdateConstraints(); #endregion }
private void InitFields() { var context = new PSOConnect(); var team = context.team.FirstOrDefault(teams => teams.idTeam == Login.CurrentUser.idTeam); foreach (var disaster in context.disaster) { SelectDisasterField.Items.Add($"{ disaster.idDisaster}-СТРАНА: { disaster.country} ГОРОД: { disaster.city} ДАТА: { disaster.date.Value.ToLongDateString()}"); if (team.idDisaster == null || team.idDisaster != disaster.idDisaster) { continue; } SelectDisasterField.SelectedItem = SelectDisasterField.Items[SelectDisasterField.Items.Count - 1]; _disaster = disaster; CountyResultText.Text = disaster.country.ToString(); CityResultText.Text = disaster.city.ToString(); DateResultText.Text = disaster.date.Value.ToShortDateString(); ReasonText.Text = disaster.reason.Count > 1 ? "Причины" : "Причина"; foreach (var reason in disaster.reason) { ListInfo.Items.Add($"ТИП: {reason.typeReason} ПРИЧИНА: {reason.reason1}"); } } NoFoundDisasterText.Hide(); if (team.idDisaster == null) { ListInfo.Hide(); ReasonText.Hide(); DateResultText.Hide(); DateText.Hide(); CountryText.Hide(); CountyResultText.Hide(); CityResultText.Hide(); CityText.Hide(); SelectDisasterField.Show(); SelectDisasterText.Show(); SelectedButton.Show(); CompletedButton.Hide(); if (SelectDisasterField.Items.Count > 0) { SelectDisasterField.SelectedIndex = 0; } else { SelectedButton.Hide(); NoFoundDisasterText.Show(); SelectDisasterField.Hide(); } } else { ListInfo.Show(); ReasonText.Show(); DateResultText.Show(); DateText.Show(); CountryText.Show(); CountyResultText.Show(); CityResultText.Show(); CityText.Show(); SelectDisasterField.Hide(); SelectDisasterText.Hide(); SelectedButton.Hide(); CompletedButton.Show(); } if (SelectDisasterField.Items.Count == 0) { SelectDisasterField.Hide(); NoFoundDisasterText.Show(); CompletedButton.Hide(); } }