Example #1
0
        private void InitVariableNEventHandle()
        {
            //升级
            _upgradeFactory = new UpgradeFactory();

            _upgradeFactory.HttpSucessHandler  += OnGetUpgradeInfoSucceeded;
            _upgradeFactory.HttpFailHandler    += OnGetUpgradeInfoFailed;
            _upgradeFactory.HttpTimeOutHandler += OnGetUpgradedInfoTimeout;

            //大图的导航
            _recommendCoverNavFactory = new RecommandCoverNavFactory();
            _recommendCoverNavFactory.HttpFailHandler    += _recommendCoverNavFactory_GetRecommendNavFailed;
            _recommendCoverNavFactory.HttpSucessHandler  += _recommendCoverNavFactory_GetRecommendNavSucceed;
            _recommendCoverNavFactory.HttpTimeOutHandler += _recommendCoverNavFactory_GetRecommendNavTimeout;

            //影片的导航
            _recommendNavFactory = new RecommendNavFactory();
            _recommendNavFactory.HttpSucessHandler  += OnGetRecommendNavSucceeded;
            _recommendNavFactory.HttpFailHandler    += OnGetRecommendNavFailed;
            _recommendNavFactory.HttpTimeOutHandler += OnGetRecommendNavTimeout;

            //下载推荐的影片
            _channelFactoryByRecommendNav = new VodRecommandFactory();
            _channelFactoryByRecommendNav.HttpSucessHandler  += OnGetChannelsByRecommendSucceeded;
            _channelFactoryByRecommendNav.HttpFailHandler    += _channelFactoryByRecommendNav_GetChannelsByRecommendNavFailed;
            _channelFactoryByRecommendNav.HttpTimeOutHandler += _channelFactoryByRecommendNav_GetChannelsByRecommendNavTimeout;
            xCoverBar.CoverImagesDownloadCompleted           += new CoversBar.DownloadedEventHandler(xCoverBar_CoverImagesDownloadCompleted);
            xCoverBar.ItemTap += new CoversBar.ImageTapEventHandler(xCoverBar_ItemTap);

            xHotSearchBar.ItemTap += new HotSearchBar.ImageTapEventHandler(xHotSearchBar_ItemTap);

            _getDataStatusHelp = new GetDataStatusHelp();
            _getDataStatusHelp.DataDownloadFailure += new GetDataStatusHelp.DownloadFailEventHandler(_getDataStatusHelp_DataDownloadFailure);
        }