partial void StopDownloading(Foundation.NSObject sender)
        {
            //Terminate active download
            downloadManager.AbortDownload();

            //Update GUI
            DownloadingProgress.Hidden = true;
            DownloadingActivity.StopAnimating();
            DownloadButton.Enabled  = true;
            CancelButton.Enabled    = false;
            DownloadingLabel.Hidden = true;
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            //Call base
            base.ViewDidLoad();

            // Build a download manager
            downloadManager = new ACDownloadManager();

            //Wireup progress bar
            downloadManager.FileDownloadProgressPercent += delegate(float percentage) {
                //Update GUI
                using (var pool = new NSAutoreleasePool())
                {
                    pool.BeginInvokeOnMainThread(delegate {
                        //Set current percentage
                        DownloadingProgress.Progress = percentage;
                    });
                }
            };

            //Wireup completion handler
            downloadManager.AllDownloadsCompleted += delegate() {
                //Update GUI
                using (var pool = new NSAutoreleasePool())
                {
                    pool.BeginInvokeOnMainThread(delegate {
                        //Display Alert Dialog Box
                        ACAlert.ShowAlertOK("Download Manager", "All files have been downloaded.");

                        //Update GUI
                        DownloadingProgress.Hidden = true;
                        DownloadingActivity.StopAnimating();
                        DownloadButton.Enabled  = true;
                        CancelButton.Enabled    = false;
                        DownloadingLabel.Hidden = true;
                    });
                }
            };

            //Wireup download error event
            downloadManager.DownloadError += delegate(string message) {
                //Update GUI
                using (var pool = new NSAutoreleasePool())
                {
                    pool.BeginInvokeOnMainThread(delegate {
                        //Display Alert Dialog Box
                        ACAlert.ShowAlertOK("Download Error", message);

                        //Update GUI
                        DownloadingProgress.Hidden = true;
                        DownloadingActivity.StopAnimating();
                        DownloadButton.Enabled  = true;
                        CancelButton.Enabled    = false;
                        DownloadingLabel.Hidden = true;
                    });
                }
            };

            // Perform any additional setup after loading the view, typically from a nib.
            DownloadingProgress.Hidden = true;
            DownloadingActivity.StopAnimating();
            DownloadButton.Enabled = true;
            CancelButton.Enabled   = false;
        }