Exemple #1
0
        public void ImageFetchOperationDidUpdateProgressiveImage(TIPImageFetchOperation op, ITIPImageFetchResult progressiveResult, float progress)
        {
            Debug.WriteLine($"...progressive update ({progress:0.000})...");

            progressView.TintColor = UIColor.Orange;
            progressView.SetProgress(progress, true);
            imageView.Image = progressiveResult.ImageContainer.Image;
        }
 public PhotoPlaceholderCollectionViewCell(IntPtr handle) : base(handle)
 {
     progressView       = new UIProgressView();
     progressView.Frame = new CGRect(0, 95, 200, 10);
     progressView.SetProgress(0.1f, false);
     AddSubview(progressView);
 }
Exemple #3
0
        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            if (inProgress)
            {
                return;
            }

            CLBeacon       beacon = beacons [GetNonEmptySection(indexPath.Section)] [indexPath.Row];
            CLBeaconRegion region = Helpers.CreateRegion(beacon.ProximityUuid, beacon.Major, beacon.Minor);

            if (region == null)
            {
                return;
            }

            // We can stop ranging to display beacons available for calibration.
            StopRangingAllRegions();
            // And we'll start the calibration process.
            calculator = new CalibrationCalculator(region, CompletionHandler);
            calculator.PerformCalibration((sender, e) => {
                progressBar.SetProgress(e.PercentComplete, true);
            });

            progressBar.Progress = 0.0f;
            inProgress           = true;
            TableView.ReloadData();
        }
        public void UpdateStatus(int total, int process)
        {
            if (process > 0)
            {
                // With big data we have numeric overflow situation
                decimal proc = process;
                decimal tot  = total;
                decimal div  = proc / tot;

                var percent = (int)(div * 100);

                if (_settings.DevelopModeEnabled)
                {
                    _progress.Text = String.Format("{0}Kb", process / 1024);
                }
                else
                {
                    _progress.Text = String.Format("{0}%", percent);
                }
            }

            float progress = process / (float)total;

            _indicator.SetProgress(progress, true);
        }
Exemple #5
0
 public void UpdateProgressView(float progress)
 {
     if (progressView != null)
     {
         BookshelfBook.DownloadProgress = progress;
         progressView.SetProgress((float)progress, true);
     }
 }
Exemple #6
0
            public void Update(ProjectElement source)
            {
                HeaderImage.Image       = UIImage.FromBundle(source.Project.MainImage);
                HeaderImage.ContentMode = UIViewContentMode.ScaleAspectFill;
                TitleLabel.Text         = source.Project.Title;


                PledgeLabel.AttributedText = BoldFirstLine(string.Format("${0}", source.Project.PledgeAmount),
                                                           string.Format("PLEDGED OF ${1}", source.Project.PledgeAmount, source.Project.Goal));
                BackersLabel.AttributedText = BoldFirstLine(string.Format("{0}", source.Project.Backers),
                                                            "BACKERS");
                DaysToGoLabel.AttributedText = BoldFirstLine(string.Format("{0}", source.Project.DaysToGo),
                                                             "DAYS TO GO");


                ProgressView.SetProgress(source.Project.PercentProgress, false);
                ContentView.BackgroundColor = UIColor.Clear;
            }
        void ShowSyncStatus()
        {
            if (showingSyncButton)
            {
                showingSyncButton = false;
                if (Progress == null)
                {
                    Progress = new UIProgressView(UIProgressViewStyle.Bar);
                    var frame = Progress.Frame;
                    var size  = new CGSize(View.Frame.Size.Width, frame.Height);
                    frame.Size     = size;
                    Progress.Frame = frame;
                    Progress.SetProgress(0f, false);
                }
                var progressItem = new UIBarButtonItem(Progress);
                progressItem.Enabled = false;

                View.InsertSubviewAbove(Progress, View.Subviews [0]);
            }
        }
Exemple #8
0
        public override void ObserveValue(NSString keyPath, NSObject ofObject, NSDictionary change, IntPtr context)
        {
            if ("estimatedProgress" == keyPath)
            {
                if (_webView.EstimatedProgress == 1.0)
                {
                    _loadBar.Progress = 0;
                    _loadBar.Hidden   = true;
                }
                else
                {
                    if (_loadBar.Hidden)
                    {
                        _loadBar.Hidden = false;
                    }

                    _loadBar.SetProgress((float)_webView.EstimatedProgress, true);
                }
            }
        }
        void ShowSyncStatus()
        {
            if (showingSyncButton) {
            showingSyncButton = false;
            if (Progress == null) {
              Progress = new UIProgressView (UIProgressViewStyle.Bar);
              var frame = Progress.Frame;
              var size = new SizeF (View.Frame.Size.Width, frame.Height);
              frame.Size = size;
              Progress.Frame = frame;
              Progress.SetProgress (0f, false);
            }
            var progressItem = new UIBarButtonItem (Progress);
            progressItem.Enabled = false;

            View.InsertSubviewAbove (Progress, View.Subviews [0]);
              }
        }
 private void SetProgress(double progress)
 {
     _progressView.Hidden = progress == default ? true : false;
     _progressView.SetProgress((float)progress, progress == default ? false : true);
 }
        // Update the progress bar value.
        public void UpdateProgress(float percentDone)
        {
            float progress = (float)(percentDone / 100.0);

            _progress.SetProgress(progress, true);
        }