示例#1
0
        private void Pivot_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            switch (((Pivot)sender).SelectedIndex)
            {
            case 0:
                ApplicationBar = (ApplicationBar)Resources["AppBar1"];
                break;

            case 1:
                ApplicationBar = (ApplicationBar)Resources["AppBar2"];
                break;

            case 2:
                ApplicationBar = (ApplicationBar)Resources["AppBar3"];

                string username = phoneAppServeice.State["username"].ToString();

                int readingBookNo = bookService.getReadingBookNo(username);
                ReadingBookNoText.Text = readingBookNo.ToString();

                int finishedBookNo = bookService.getFinishedBookNo(username);
                FinishedBookNoText.Text = finishedBookNo.ToString();

                int wishBookNo = bookService.getWishBookNo(username);
                WishBookNoText.Text = wishBookNo.ToString();

                int haveReadDays = bookService.getHaveReadDays(username);
                HaveReadDaysText.Text = haveReadDays.ToString();
                break;

            case 3:
                ApplicationBar = (ApplicationBar)Resources["AppBar4"];
                break;
            }
        }