Ejemplo n.º 1
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // Override point for customization after application launch.
            // If not required for your application you can safely delete this method
            this.Window = new UIWindow(UIScreen.MainScreen.Bounds);
            ImageDownloader imageDownloader = new ImageDownloader(new StorageClient());
            MovieConverter  converter       = new MovieConverter(new MovieDbSettings());

            var searchController = new MovieSearchViewController(converter, imageDownloader);

            UINavigationBar.Appearance.BarTintColor = UIColor.FromRGB(24, 24, 24);
            UINavigationBar.Appearance.TintColor    = UIColor.FromRGB(186, 157, 9);
            UINavigationBar.Appearance.SetTitleTextAttributes(new UITextAttributes()
            {
                TextColor = UIColor.White
            });

            var searchNavigationController   = new UINavigationController(searchController);
            var topRatedController           = new TopRatedController(converter);
            var topRatedNavigationController = new UINavigationController(topRatedController);

            var tabBarController = new TabBarController()
            {
                ViewControllers = new UIViewController[]
                {
                    searchNavigationController,
                    topRatedNavigationController
                }
            };

            this.Window.RootViewController = tabBarController;
            this.Window.MakeKeyAndVisible();
            return(true);
        }
Ejemplo n.º 2
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // Override point for customization after application launch.
            // If not required for your application you can safely delete this method

            IImageStorage   storageClient   = new StorageClient();
            ImageDownloader imageDownloader = new ImageDownloader(storageClient);
            MovieService    movieService    = new MovieService();

            this.Window = new UIWindow(UIScreen.MainScreen.Bounds);
            var movieController              = new MovieSearchViewController(movieService, imageDownloader);
            var topTenMoviesController       = new TopTenController(movieService, imageDownloader);
            var navigationController         = new UINavigationController(movieController);
            var navigationTopRatedController = new UINavigationController(topTenMoviesController);

            var tabBarController = new TabBarController()
            {
                ViewControllers = new UIViewController[] { navigationController, navigationTopRatedController }
            };

            this.Window.RootViewController = tabBarController;
            this.Window.MakeKeyAndVisible();

            return(true);
        }
Ejemplo n.º 3
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // Override point for customization after application launch.
            // If not required for your application you can safely delete this method

            this.Window = new UIWindow(UIScreen.MainScreen.Bounds);
            var controller = new MovieSearchViewController();

            this.Window.RootViewController = new UINavigationController(controller);
            this.Window.MakeKeyAndVisible();
            return(true);
        }
Ejemplo n.º 4
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // Override point for customization after application launch.
            // If not required for your application you can safely delete this method
            this.Window = new UIWindow(UIScreen.MainScreen.Bounds);

            MovieDbFactory.RegisterSettings(new MovieDbSettings());
            var movieApi     = MovieDbFactory.Create <IApiMovieRequest>().Value;
            var movieService = new MovieServices(movieApi);

            MovieDownload.StorageClient   storageClient   = new MovieDownload.StorageClient();
            MovieDownload.ImageDownloader imageDownloader = new MovieDownload.ImageDownloader(storageClient);

            var controller = new MovieSearchViewController(movieService, imageDownloader);
            var movieSearchNavigationController = new UINavigationController(controller);

            // List<Movie> topRatedMovies = new List<Movie>();
            //  topRatedMovies = movieService.getTopRatedMovies();

            var movieListController = new MovieListController(new List <Movie>()
            {
            }, new List <MovieDetail>()
            {
            });
            var movieListNavigationController = new UINavigationController(movieListController);
            var tabController = new TabController()
            {
                ViewControllers = new UIViewController[] { movieSearchNavigationController, movieListNavigationController }
            };



            this.Window.RootViewController = tabController;
            //new UINavigationController(controller);
            this.Window.MakeKeyAndVisible();

            return(true);
        }