protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            IDictionary <string, string> parameters = this.NavigationContext.QueryString;

            if (parameters.ContainsKey("type"))
            {
                type = (parameters["type"] as string);
            }
            if (parameters.ContainsKey("keyword"))
            {
                keyword = (parameters["keyword"] as string);
            }
            this.TBPageTitle.Text  = TitleHelper.GetTitle(type);
            this.TBMainSearch.Text = keyword;
            InitFilterButton("", "", "");
            result = await GetData(keyword);

            if (result != null)
            {
                Render();
            }
            else
            {
                string url = string.Empty;
                url = StaticURLHelper.GetURL(type).List;
                GetJSON(url, new Dictionary <string, string>());
            }
            base.OnNavigatedTo(e);
        }
        private void OItem_OnData1Changed(object sender, SelectionChangedEventArgs e)
        {
            if (filterNum == 2)
            {
                string id   = ((sender as ListBox).SelectedItem as BaseMap).id.ToString();
                string name = ((sender as ListBox).SelectedItem as BaseMap).name;
                string url  = string.Empty;
                switch (filterNum)
                {
                case '0': url = StaticURLHelper.GetURL(type).Filter1; break;

                case '1': url = StaticURLHelper.GetURL(type).Filter2; break;

                case '2': url = StaticURLHelper.GetURL(type).Filter3; break;

                default:
                    url = StaticURLHelper.GetURL(type).Filter1; break;
                }
                Dictionary <string, string> dic = new Dictionary <string, string>();
                dic.Add("id", id);
                GetJSON(url, dic);
                this.LayoutRoot.Children.Remove(oItem);
                SetFilterButton(name);
            }
        }
Пример #3
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            Dictionary <string, string> dic;

            if (PhoneApplicationService.Current.State.ContainsKey("dic"))
            {
                dic = (Dictionary <string, string>)PhoneApplicationService.Current.State["dic"];
            }
            else
            {
                return;
            }
            IDictionary <string, string> parameters = this.NavigationContext.QueryString;

            if (parameters.ContainsKey("type"))
            {
                type = (parameters["type"] as string);
            }
            string url = string.Empty;

            url = StaticURLHelper.GetURL(type).List;

            GetJSON(url, dic);

            base.OnNavigatedTo(e);
        }
Пример #4
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            IDictionary <string, string> parameters = this.NavigationContext.QueryString;

            if (parameters.ContainsKey("id"))
            {
                idStr = (parameters["id"] as string);
            }
            if (!string.IsNullOrEmpty(idStr))
            {
                string url = StaticURLHelper.GetURL(type).Show;
                GetData(url, idStr);
            }
        }
Пример #5
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            IDictionary <string, string> parameters = this.NavigationContext.QueryString;

            base.OnNavigatedTo(e);
            if (parameters.ContainsKey("id"))
            {
                idStr = (parameters["id"] as string);
            }
            if (parameters.ContainsKey("type"))
            {
                type = (parameters["type"] as string);
            }
            HttpHelper ht  = new HttpHelper();
            string     url = StaticURLHelper.GetURL(type).Show;
            Dictionary <string, string> dic = new Dictionary <string, string>();

            dic.Add("id", idStr);
            ht.CreatePostHttpResponse(url, dic);
            ht.FileWatchEvent += Ht_FileWatchEvent;
        }