Ejemplo n.º 1
0
        /// <summary>
        /// Updates the cell's UI from a DownloadInfo object.
        /// </summary>
        /// <param name="info">Info.</param>
        public void UpdateFromDownloadInfo(DownloadInfo info)
        {
            bool showDownload = info.Status != DownloadInfo.STATUS.Downloading && info.Status != DownloadInfo.STATUS.Completed;
            bool showStop     = info.Status == DownloadInfo.STATUS.Downloading;
            bool showProgress = info.Status == DownloadInfo.STATUS.Downloading;

            this.btnDownload.Hidden  = !showDownload;
            this.btnStop.Hidden      = !showStop;
            this.progressView.Hidden = !showProgress;

            this.progressView.Progress = info.Progress;

            this.lblFilename.TextColor = info.Status == DownloadInfo.STATUS.Completed ? UIColor.Green : UIColor.Black;

            this.lblFilename.Text = info.Title;
        }
        /// <summary>
        /// Updates the cell's UI from a DownloadInfo object.
        /// </summary>
        /// <param name="info">Info.</param>
        public void UpdateFromDownloadInfo(DownloadInfo info)
        {
            bool showDownload = info.Status != DownloadInfo.STATUS.Downloading && info.Status != DownloadInfo.STATUS.Completed;
            bool showStop = info.Status == DownloadInfo.STATUS.Downloading;
            bool showProgress = info.Status == DownloadInfo.STATUS.Downloading;

            this.btnDownload.Hidden = !showDownload;
            this.btnStop.Hidden = !showStop;
            this.progressView.Hidden = !showProgress;

            this.progressView.Progress = info.Progress;

            this.lblFilename.TextColor = info.Status == DownloadInfo.STATUS.Completed ? UIColor.Green : UIColor.Black;

            this.lblFilename.Text = info.Title;
        }
        void UpdateDownloadInfo(DownloadInfo downloadInfo, DownloadInfo.STATUS status, NSUrl destinationUrl)
        {
            // Update download info object.
            downloadInfo.Reset ();

            downloadInfo.Status = status;
            downloadInfo.DestinationFile = destinationUrl;
        }