public FilterSearch(SearchSettings userSearchSettings) { InitializeComponent(); try { newSearchSettings = userSearchSettings; _dataManager = new DataManager(); if (newSearchSettings != null) { distance.Minimum = 0; distance.Maximum = 1000; distance.Value = (int)newSearchSettings.Distance; distanceLabel.Text = "Distance " + ((int)distance.Value) + " km"; distance.ValueChanged += (sender, e) => { distanceLabel.Text = "Distance " + ((int)distance.Value + " km"); newSearchSettings.Distance = distance.Value; }; EventCategory.ManageCategories(eventTypeGrid, newSearchSettings.EventTypes, false); updateButton.Clicked += (sender, e) => { UpdateSearch(); }; } } catch (Exception e) { } }
public async Task<bool> updateSearchSettings(SearchSettings settings) { var uri = "/searchPreference/" + App.StoredUserFacebookId; var content = JsonConvert.SerializeObject(settings); List<Profile> profiles = await PostProfileServerCall(uri, content); return true; }