Exemple #1
0
        /// <summary>
        /// This method is invoked when the application has loaded and is ready to run. In this
        /// method you should instantiate the window, load the UI into it and then make the window
        /// visible.
        /// </summary>
        /// <remarks>
        /// You have 5 seconds to return from this method, or iOS will terminate your application.
        /// </remarks>
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            Window                    = new UIWindow(UIScreen.MainScreen.Bounds);
            RootController            = new AppViewController(null, null);
            NavigationController      = new UINavigationController(RootController);
            Window.RootViewController = NavigationController;

            // make the window visible
            Window.MakeKeyAndVisible();

            BeginDownloading();
            return(true);
        }
        public DataSource(AppViewController controller)
        {
            Controller = controller;

            // Listen for changes to the Apps collection so the TableView can be updated
            Controller.Apps.CollectionChanged += HandleAppsCollectionChanged;
            // Initialise DownloadTask with an empty and complete task
            DownloadTask = Task.Factory.StartNew(() => { });
            // Load the Placeholder image so it's ready to be used immediately
            PlaceholderImage = UIImage.FromFile("App Symbol Filled-32.png");

            // If either a download fails or the image we download is corrupt, ignore the problem.
            TaskScheduler.UnobservedTaskException += delegate(object sender, UnobservedTaskExceptionEventArgs e) {
                e.SetObserved();
            };
        }