Beispiel #1
0
        public PeoplePage()
        {
            InitializeComponent();
            searchPopup = new Popup();
            people      = App.peoplePassed;
            if (people != null)
            {
                People p = Cache.getPeople(people.id);
                if (p != null)
                {
                    people = p;
                }
                peopleParser = new PeopleHtmlParser(people);
            }

            var moviePullDector = new WP8PullToRefreshDetector();

            moviePullDector.Bind(movieSelector);
            moviePullDector.Compression += movieDector_Compress;
            var imagePullDector = new WP8PullToRefreshDetector();

            imagePullDector.Bind(imageSelector);
            imagePullDector.Compression += imageDector_Compress;

            imageSelector.ItemRealized += image_ItemRealized;
            movieSelector.ItemRealized += movie_ItemRealized;
            LayoutRoot.DataContext      = Settings.instance;
        }
Beispiel #2
0
        // Constructor
        public MainPage()
        {
            InitializeComponent();
            App.mainPage = this;

            // Pull to refresh
            var top250PullDector = new WP8PullToRefreshDetector();

            top250PullDector.Bind(top250LongListSelector);
            top250PullDector.Compression += top250Dector_Compress;
            var hotReviewPullDector = new WP8PullToRefreshDetector();

            hotReviewPullDector.Bind(hotReviewLongListSelector);
            hotReviewPullDector.Compression += hotReviewDector_Compress;

            // Scroll to new item
            isTop250NewLoad = false;
            top250LongListSelector.ItemRealized += top250_ItemRealized;
            isCommentNewLoad = false;
            hotReviewLongListSelector.ItemRealized += comment_ItemRealized;

            LayoutRoot.DataContext = Settings.instance;
            // Get hot movie
            popup       = new Popup();
            searchPopup = new Popup();
            TesterTrailer.testHttpClient();
        }
Beispiel #3
0
        public ImageCommentPage()
        {
            InitializeComponent();
            searchPopup = new Popup();
            image       = App.commentImagePassed;
            if (image != null)
            {
                parser = new ImageCommentHtmlParser(image);
            }

            var commentPullDector = new WP8PullToRefreshDetector();

            commentPullDector.Bind(commentSelector);
            commentPullDector.Compression += commentDector_Compress;

            commentSelector.ItemRealized += comment_ItemRealized;
            LayoutRoot.DataContext        = Settings.instance;
        }
Beispiel #4
0
        public ReviewPage()
        {
            InitializeComponent();
            searchPopup = new Popup();
            review      = App.reviewPassed;
            if (review != null)
            {
                reviewParser = new ReviewHtmlParser(review);
            }

            var commentPullDector = new WP8PullToRefreshDetector();

            commentPullDector.Bind(commentSelector);
            commentPullDector.Compression += commentDector_Compress;

            commentSelector.ItemRealized += comment_ItemRealized;

            LayoutRoot.DataContext = Settings.instance;
        }
Beispiel #5
0
        public MoviePage()
        {
            InitializeComponent();
            searchPopup        = new Popup();
            shortReviewLoaded  = false;
            reviewLoaded       = false;
            imageLoaded        = false;
            movieLoaded        = false;
            shortReviewNewLoad = false;
            reviewNewLoad      = false;
            imageNewLoad       = false;

            // Pull to refresh handle
            var shortReviewPullDector = new WP8PullToRefreshDetector();

            shortReviewPullDector.Bind(shortReviewSelector);
            shortReviewPullDector.Compression += shortReviewDector_Compress;
            var reviewPullDector = new WP8PullToRefreshDetector();

            reviewPullDector.Bind(reviewLongListSelector);
            reviewPullDector.Compression += reviewDector_Compress;
            var imagePullDector = new WP8PullToRefreshDetector();

            imagePullDector.Bind(imageSelector);
            imagePullDector.Compression += imageDector_Compress;

            // Item realize handler
            shortReviewSelector.ItemRealized    += shortReview_ItemRealized;
            reviewLongListSelector.ItemRealized += review_ItemRealized;
            imageSelector.ItemRealized          += image_ItemRealized;

            movie = App.moviePassed;
            if (movie != null)
            {
                movieParser = new MovieJsonParser(movie);
            }

            LayoutRoot.DataContext = Settings.instance;
            movieGrid.DataContext  = null;
        }