Ejemplo n.º 1
0
        //清除历史查询记录
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            var localSettings = Windows.Storage.ApplicationData.Current.LocalSettings;

            if (localSettings.Values.ContainsKey("searchHistory"))
            {
                localSettings.Values["searchHistory"] = "";
            }
            FeedDataSource dataSource = new FeedDataSource();

            dataSource.GetHSData();
            searchHistory.ItemsSource = dataSource.getHSItem();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 在此页将要在 Frame 中显示时进行调用。
        /// </summary>
        /// <param name="e">描述如何访问此页的事件数据。Parameter
        /// 属性通常用于配置页。</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            Object obj = e.Parameter;

            if (!obj.ToString().Equals(""))
            {
                expressCompany.Text = obj.ToString();
            }
            //获取历史查询数据
            FeedDataSource dataSource = new FeedDataSource();

            dataSource.GetHSData();
            searchHistory.ItemsSource = dataSource.getHSItem();
        }