Beispiel #1
0
        public SearchPage()
        {
            this.InitializeComponent();
            this.Loaded += load_Handler;
            snapSearchListView.LayoutUpdated += load_Handler;
            this.NavigationCacheMode          = Windows.UI.Xaml.Navigation.NavigationCacheMode.Enabled;

            _searchViewModel                  = new ChannelSearchViewModel <ChannelSearchListInfo, HotSearchInfo>();
            _searchViewModel.Items            = new ObservableCollection <ChannelSearchListInfo>();
            _searchViewModel.Navs             = new ObservableCollection <TextBlock>();
            this.DefaultViewModel["Items"]    = _searchViewModel.Items;
            searchCatalogComboBox.ItemsSource = _searchViewModel.Navs;

            _channelFactory = new ChannelSearchFactory();
            _channelFactory.HttpSucessHandler += channelFactory_HttpSucessed;
            _channelFactory.HttpFailorTimeOut  = channelFactory_HttpFailorTimeOut;
            _hotSearchFactory = new HotSearchFactory();
            _hotSearchFactory.HttpSucessHandler += hotSearchFactory_HttpSucessed;

            _requestNum = ScreenUtils.CreateRequestNum(370, 160, 251);
        }
Beispiel #2
0
        public SearchPage()
        {
            this.InitializeComponent();
            this.Loaded += load_Handler;
            snapSearchListView.LayoutUpdated += load_Handler;
            this.NavigationCacheMode = Windows.UI.Xaml.Navigation.NavigationCacheMode.Enabled;

            _searchViewModel = new ChannelSearchViewModel<ChannelSearchListInfo, HotSearchInfo>();
            _searchViewModel.Items = new ObservableCollection<ChannelSearchListInfo>();
            _searchViewModel.Navs = new ObservableCollection<TextBlock>();
            this.DefaultViewModel["Items"] = _searchViewModel.Items;
            searchCatalogComboBox.ItemsSource = _searchViewModel.Navs;

            _channelFactory = new ChannelSearchFactory();
            _channelFactory.HttpSucessHandler += channelFactory_HttpSucessed;
            _channelFactory.HttpFailorTimeOut = channelFactory_HttpFailorTimeOut;
            _hotSearchFactory = new HotSearchFactory();
            _hotSearchFactory.HttpSucessHandler += hotSearchFactory_HttpSucessed;

            _requestNum = ScreenUtils.CreateRequestNum(370, 160, 251);
        }