public async void SetContactDetails(ObservableCollection <ServerUser> people)
        {
            //for (int i = 0; i < people.Count; i++)
            //{
            //    PeopleSpeakerTemplate dummyP1 = new PeopleSpeakerTemplate();
            //    dummyP1.SetDetails(people[i]);
            //    dummyP1.SetPeopleClick(((HomeLayout)App.Current.MainPage).CreatePeopleDetail);
            //    peopleList.Add(dummyP1);
            //}
            if (people.Count > 0)
            {
                contactsParent.IsVisible = true;
                emptyList.IsVisible      = false;
            }
            else
            {
                contactsParent.IsVisible = false;
                emptyList.IsVisible      = true;
            }
            ObservableCollection <ServerUser> filterPeople = new ObservableCollection <ServerUser>();

            if (!string.IsNullOrEmpty(peopleSearch.Text))
            {
                for (int i = 0; i < people.Count; i++)
                {
                    if (!BaseFunctions.CheckBool(people[i].userPrivacy))
                    {
                        if (people[i].userFirstName.Contains(peopleSearch.Text, StringComparison.OrdinalIgnoreCase) || people[i].userLastName.Contains(peopleSearch.Text, StringComparison.OrdinalIgnoreCase) ||
                            people[i].userCompany.Contains(peopleSearch.Text, StringComparison.OrdinalIgnoreCase) || people[i].userPosition.Contains(peopleSearch.Text, StringComparison.OrdinalIgnoreCase))
                        {
                            filterPeople.Add(people[i]);
                        }
                    }
                }
            }
            else
            {
                filterPeople = people as ObservableCollection <ServerUser>;
            }
            if (filterPeople.Count > 0)
            {
                filterPeople = new ObservableCollection <ServerUser>(filterPeople.OrderBy(a => GetSort(a)));
            }

            contactsParent.ItemsSource = filterPeople;
            await Task.Delay(1000);

            await((HomeLayout)App.Current.MainPage).SetLoading(false, "Syncing event RSVP status...");
            canSearch = true;
        }
Beispiel #2
0
        public SettingsPage()
        {
            InitializeComponent();

            privateProfile.IsToggled = BaseFunctions.CheckBool(App.serverData.mei_user.currentUser.userPrivacy);
            SetEditProfile();
            SetFeedbackAndSuggestions();
            SetChangePassword();
            SetApplicationTerms();
            SetPrivacyPolicy();
            SetPaymentHistory();
            SetPaymentList();
            SetShippingList();
            notSetting.IsToggled = App.NotificaitonEnabled;
            SetPushNotification();
            notSounds.IsToggled = App.NotificationSounds;
            SetPushNotificationSounds();
            SetPrivateProfile();
            SetLogout();
            if (Device.OS == TargetPlatform.Android)
            {
                versionNumber.Text = "Ver " + App.AppVersion;
            }
        }