Пример #1
0
        private void list_His_ItemClick(object sender, ItemClickEventArgs e)
        {
            QuanziListModel model = new QuanziListModel()
            {
                community_id   = (e.ClickedItem as QuanHisModel).community_id,
                community_name = (e.ClickedItem as QuanHisModel).community_name,
                post_id        = (e.ClickedItem as QuanHisModel).post_id
            };

            this.Frame.Navigate(typeof(QuanInfoPage), model);
        }
Пример #2
0
        private async void GetMyQuanziDT()
        {
            try
            {
                LoadHome           = true;
                pr_Load.Visibility = Visibility.Visible;
                wc = new WebClientClass();
                string url = string.Format("http://www.im9.com/api/query.dynamic.post.list.do?access_key={0}&actionKey=appkey&appkey={1}&build=418000&mobi_app=wp&page_no={3}&page_size=20&platform=android&ts={2}", ApiHelper.access_key, ApiHelper._appKey_Android, ApiHelper.GetTimeSpen, Pages);
                url += "&sign=" + ApiHelper.GetSign_Android(url);
                //string url = "http://www.im9.com/api/query.dynamic.post.list.do?access_key=cac4bbdb9c54df0bc1fbe60727fbddcb&actionKey=appkey&appkey=c1b107428d337928&build=418000&mobi_app=android&page_no=1&page_size=20&platform=android&ts=1464334658000&sign=3426fe25d424a3507f09a0cd5da4dd0a";
                string results = await wc.GetResults(new Uri(url));

                QuanziListModel        model  = JsonConvert.DeserializeObject <QuanziListModel>(results);
                QuanziListModel        model1 = JsonConvert.DeserializeObject <QuanziListModel>(model.data.ToString());
                List <QuanziListModel> list   = JsonConvert.DeserializeObject <List <QuanziListModel> >(model1.result.ToString());
                //List<QuanziListModel> lists = new List<QuanziListModel>();
                foreach (var item in list)
                {
                    QuanziListModel m = JsonConvert.DeserializeObject <QuanziListModel>(item.post_info.ToString());
                    m.community_name = JsonConvert.DeserializeObject <QuanziListModel>(item.community_info.ToString()).community_name;
                    m.community_id   = JsonConvert.DeserializeObject <QuanziListModel>(item.community_info.ToString()).community_id;
                    //lists.Add(m);
                    list_DT.Items.Add(m);
                }
                Pages++;
            }
            catch (Exception)
            {
                messShow.Show("没有数据了...", 3000);
            }
            finally
            {
                LoadHome = false;
                if (list_DT.Items.Count == 0)
                {
                    txt_NotDt.Visibility    = Visibility.Visible;
                    btn_LoadMore.Visibility = Visibility.Collapsed;
                }
                else
                {
                    txt_NotDt.Visibility    = Visibility.Collapsed;
                    btn_LoadMore.Visibility = Visibility.Visible;
                }
                pr_Load.Visibility = Visibility.Collapsed;
            }

            //
        }
Пример #3
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     bg.Color = ((SolidColorBrush)this.Frame.Tag).Color;
     if (e.NavigationMode == NavigationMode.New)
     {
         par = e.Parameter as QuanziListModel;
         list_Items.Items.Clear();
         pages                      = 1;
         total_page                 = 1;
         pane_Info.DataContext      = null;
         btn_Zan.Foreground         = new SolidColorBrush(Colors.Gray);
         btn_LookMaster.IsChecked   = false;
         btn_ReverseOrder.IsChecked = false;
         Look_landlord              = 1;
         reverse                    = 1;
         sv.ScrollToVerticalOffset(0);
         GetInfo();
     }
 }
Пример #4
0
        private async void GetQuanziDT()
        {
            try
            {
                qLoading           = true;
                pr_Load.Visibility = Visibility.Visible;
                wc = new WebClientClass();
                string url = string.Format("http://www.im9.com/api/query.community.post.list.do?page_no={4}&community_id={0}&sort_type=1&access_key={1}&actionKey=appkey&appkey={2}&build=418000&mobi_app=android&platform=android&ts={3}", par.id, ApiHelper.access_key, ApiHelper._appKey_Android, ApiHelper.GetTimeSpen, Pages);
                url += "&sign=" + ApiHelper.GetSign_Android(url);
                string results = await wc.GetResults(new Uri(url));

                QuanziListModel        model  = JsonConvert.DeserializeObject <QuanziListModel>(results);
                QuanziListModel        model1 = JsonConvert.DeserializeObject <QuanziListModel>(model.data.ToString());
                QuanziListModel        model2 = JsonConvert.DeserializeObject <QuanziListModel>(model1.post_list.ToString());
                List <QuanziListModel> list   = JsonConvert.DeserializeObject <List <QuanziListModel> >(model2.result.ToString());
                //List<QuanziListModel> lists = new List<QuanziListModel>();
                foreach (var item in list)
                {
                    item.community_id = par.id;
                    if (item.is_top == 1)
                    {
                        list_Top.Items.Add(item);
                    }
                    else
                    {
                        list_Content.Items.Add(item);
                    }
                }
                Pages++;
            }
            catch (Exception)
            {
                messShow.Show("没有数据了...", 3000);
            }
            finally
            {
                qLoading           = false;
                pr_Load.Visibility = Visibility.Collapsed;
            }

            //
        }
Пример #5
0
        private void list_Top_ItemClick(object sender, ItemClickEventArgs e)
        {
            QuanziListModel model = e.ClickedItem as QuanziListModel;

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