Esempio n. 1
0
        private async void mainpivot_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            switch (mainpivot.SelectedIndex)
            {
            case 0:
            {
                if (!IsChatLoaded)
                {
                    List <Chat> chats = await ContentServ.GetChatsAsync();

                    ls_chat.ItemsSource = chats;
                    IsChatLoaded        = true;
                }
            } break;

            case 1:
            {
                if (!IsWissLoaded)
                {
                    List <Wisper> wiss = await ContentServ.GetWisperAsync();

                    ls_wiss.ItemsSource = wiss;
                    IsWissLoaded        = true;
                }
            }
            break;

            case 2:
            {
                if (!IsNotiLoaded)
                {
                    List <Notify> notis = await ContentServ.GetNotiAsync();

                    ls_noti.ItemsSource = notis;
                    IsNotiLoaded        = true;
                }
            }
            break;

            case 3:
            {
                if (!PraiseLoaded)
                {
                    List <PraiseMe> notis = await ContentServ.GetPraiseListAsync();

                    ls_prme.ItemsSource = notis;
                    PraiseLoaded        = true;
                }
            }
            break;
            }
        }