Пример #1
0
        private async void GetTJQuanzi()
        {
            try
            {
                pr_Load.Visibility = Visibility.Visible;
                wc = new WebClientClass();
                string url = string.Format("http://www.im9.com/api/query.community.list.do?access_key={0}&actionKey=appkey&appkey={1}&build=418000&data_type=1&mobi_app=android&page_no=1&page_size=30&platform=android&ts={2}", ApiHelper.access_key, ApiHelper._appKey, ApiHelper.GetTimeSpen);
                url += "&sign=" + ApiHelper.GetSign_Android(url);

                string results = await wc.GetResults(new Uri(url));

                MyQuanziModel        model  = JsonConvert.DeserializeObject <MyQuanziModel>(results);
                MyQuanziModel        model1 = JsonConvert.DeserializeObject <MyQuanziModel>(model.data.ToString());
                List <MyQuanziModel> list   = JsonConvert.DeserializeObject <List <MyQuanziModel> >(model1.result.ToString());
                list_TJQuan.ItemsSource = list;
            }
            catch (Exception)
            {
                messShow.Show("加载推荐信息失败", 3000);
            }
            finally
            {
                pr_Load.Visibility = Visibility.Collapsed;
            }
        }
Пример #2
0
        private async void GetMyQuanzi()
        {
            try
            {
                wc = new WebClientClass();
                string url = string.Format("http://www.im9.com/api/query.my.community.list.do?access_key={0}&actionKey=appkey&appkey={1}&build=411005&data_type=2&mid={3}&mobi_app=android&page_no=1&page_size=40&platform=wp&ts={2}", ApiHelper.access_key, ApiHelper._appKey, ApiHelper.GetTimeSpen, ApiHelper.GetUserId());
                url += "&sign=" + ApiHelper.GetSign(url);

                string results = await wc.GetResults(new Uri(url));

                MyQuanziModel        model  = JsonConvert.DeserializeObject <MyQuanziModel>(results);
                MyQuanziModel        model1 = JsonConvert.DeserializeObject <MyQuanziModel>(model.data.ToString());
                List <MyQuanziModel> list   = JsonConvert.DeserializeObject <List <MyQuanziModel> >(model1.result.ToString());
                list_MyQuan.ItemsSource = list;
            }
            catch (Exception)
            {
                messShow.Show("我的关注加载失败", 3000);
            }
            finally
            {
                if (list_MyQuan.Items.Count == 0)
                {
                    txt_NotGz.Visibility = Visibility.Visible;
                    AttenBiliQuan();
                }
                else
                {
                    txt_NotGz.Visibility = Visibility.Collapsed;
                }
            }
        }
Пример #3
0
        private void list_MyQuan_ItemClick(object sender, ItemClickEventArgs e)
        {
            MyQuanziModel model = e.ClickedItem as MyQuanziModel;

            this.Frame.Navigate(typeof(QuanziPage), model);
        }