void ReleaseDesignerOutlets()
 {
     if (imgViewCover != null)
     {
         imgViewCover.Dispose();
         imgViewCover = null;
     }
     if (lblArtist != null)
     {
         lblArtist.Dispose();
         lblArtist = null;
     }
     if (lblDownloaded != null)
     {
         lblDownloaded.Dispose();
         lblDownloaded = null;
     }
     if (lblSongTitle != null)
     {
         lblSongTitle.Dispose();
         lblSongTitle = null;
     }
     if (lblWebsite != null)
     {
         lblWebsite.Dispose();
         lblWebsite = null;
     }
     if (progressBar != null)
     {
         progressBar.Dispose();
         progressBar = null;
     }
 }
        public UIProgressiveImageView()
        {
            imageView = new UIImageView();
            progressView = new UIProgressView(UIProgressViewStyle.Default);

            Design();
        }
Example #3
0
        protected override void OnDetached()
        {
            //restore the old color
            UIProgressView uiSwitch = (UIProgressView)Control;

            uiSwitch.ProgressTintColor = oldColor;
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            View.BackgroundColor = UIColor.White;

            if (session == null)
            {
                session = InitBackgroundSession();
            }


            var root = new UIView(new CGRect(20, 20, this.View.Frame.Width, this.View.Frame.Height));

            DocumentName = new UILabel(new CGRect(50, 50, this.View.Frame.Width / 2, 50))
            {
                Text          = FileName,
                TextAlignment = UITextAlignment.Center
            };
            ProgressView = new UIProgressView(new CGRect(20, 120, this.View.Frame.Width - 100, 20));

            root.Add(DocumentName);
            root.Add(ProgressView);
            View.AddSubview(root);
            ProgressView.Progress = 0;
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            this.View.BackgroundColor = UIColor.LightGray;

            if (session == null) {
                session = CreateBackgroundSession ();
            }

            btnStart = new UIButton (UIButtonType.RoundedRect);
            btnStart.SetTitle ("Start", UIControlState.Normal);
            btnStart.Frame = new RectangleF (100, 50, 100, 50);
            this.View.AddSubview (btnStart);

            float width = this.View.Bounds.Width - 100;

            prgView = new UIProgressView(new RectangleF(50,125,width,35));
            this.View.AddSubview (prgView);

            imgView = new UIImageView (new RectangleF (50, 200, width, width));
            this.View.AddSubview (imgView);

            prgView.Progress = 0;
            imgView.Hidden = false;
            prgView.Hidden = true;

            btnStart.TouchUpInside += Start;
        }
Example #6
0
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            if (!_disposed)
            {
                if (_message != null)
                {
                    _message.Dispose();
                }
                _message = null;
                if (_indicator != null)
                {
                    _indicator.Dispose();
                }
                _indicator = null;
                if (_progress != null)
                {
                    _progress.Dispose();
                }
                _progress = null;

                _disposed = true;
            }
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();
            normalButton = GetButton (new CGRect (10, 120, 295, 48),
                                      FoodyTheme.SharedTheme.ButtonImage,
                                      "Standard Button");
            View.AddSubview (normalButton);

            pressedButton = GetButton (new CGRect (10, 190, 295, 48),
                                       FoodyTheme.SharedTheme.PressedButtonImage,
                                       "Button Pressed");
            View.AddSubview (pressedButton);

            label = new UILabel (new CGRect (15, 40, 400, 30));
            FoodyTheme.Apply (label);
            label.Text = "Label";
            View.AddSubview (label);

            var paddingView = new UIView (new CGRect (0, 0, 5, 20));
            TextField.LeftView = paddingView;
            TextField.LeftViewMode = UITextFieldViewMode.Always;
            TextField.ShouldReturn = TextFieldShouldReturn;
            TextField.Background = FoodyTheme.SharedTheme.TextFieldBackground;

            progress = new UIProgressView (new CGRect (13, 300, 292, 10));
            progress.Progress = 0.5f;
            View.AddSubview (progress);

            slider = new UISlider (new CGRect (10, 330, 298, 10));
            slider.Value = 0.5f;
            slider.ValueChanged += HandleValueChanged;
            View.AddSubview (slider);

            FoodyTheme.Apply (View);
        }
		public SongsViewController ()
		{
			Title = "Songs";
			TableView.Source = new ViewModelDataSource<Song> {
				CellForItem = (tv,item) => {
					var cell = tv.DequeueReusableCell<SongCell>(SongCell.Key);
					cell.Song = item;
					return cell;
				},
				ViewModel = (viewModel = new SongsViewModel()),
			};

			TableView.TableHeaderView = progressView = new UIProgressView (UIProgressViewStyle.Bar) {
				Alpha = 0f
			};

			progressView.SizeToFit ();

			viewModel.ItemsChanged += (sender, e) => 
				InvokeOnMainThread(() => {
					Console.WriteLine("Reloading the TableView.");
					TableView.ReloadData();
				});

			viewModel.SongsUpdated += progress => 
				InvokeOnMainThread(() => {
					Console.WriteLine("{0:P}", progress);
					progressView.Progress = progress;
					progressView.Alpha = progress >= 1f ? 0 : 1;
				});

		}
        public SongsViewController()
        {
            Title            = "Songs";
            TableView.Source = new ViewModelDataSource <Song> {
                CellForItem = (tv, item) => {
                    var cell = tv.DequeueReusableCell <SongCell>(SongCell.Key);
                    cell.Song = item;
                    return(cell);
                },
                ViewModel = (viewModel = new SongsViewModel()),
            };

            TableView.TableHeaderView = progressView = new UIProgressView(UIProgressViewStyle.Bar)
            {
                Alpha = 0f
            };

            progressView.SizeToFit();

            viewModel.ItemsChanged += (sender, e) =>
                                      InvokeOnMainThread(() => {
                Console.WriteLine("Reloading the TableView.");
                TableView.ReloadData();
            });

            viewModel.SongsUpdated += progress =>
                                      InvokeOnMainThread(() => {
                Console.WriteLine("{0:P}", progress);
                progressView.Progress = progress;
                progressView.Alpha    = progress >= 1f ? 0 : 1;
            });
        }
		void ReleaseDesignerOutlets ()
		{
			if (lblAvgWaitTitle != null) {
				lblAvgWaitTitle.Dispose ();
				lblAvgWaitTitle = null;
			}
			if (lblCompleted != null) {
				lblCompleted.Dispose ();
				lblCompleted = null;
			}
			if (lblIncidentTitle != null) {
				lblIncidentTitle.Dispose ();
				lblIncidentTitle = null;
			}
			if (lblTeamLead != null) {
				lblTeamLead.Dispose ();
				lblTeamLead = null;
			}
			if (lblWaitTime != null) {
				lblWaitTime.Dispose ();
				lblWaitTime = null;
			}
			if (pvCompletedBar != null) {
				pvCompletedBar.Dispose ();
				pvCompletedBar = null;
			}
			if (pvWaitTimeBar != null) {
				pvWaitTimeBar.Dispose ();
				pvWaitTimeBar = null;
			}
		}
 public PhotoPlaceholderCollectionViewCell(IntPtr handle) : base(handle)
 {
     progressView       = new UIProgressView();
     progressView.Frame = new CGRect(0, 95, 200, 10);
     progressView.SetProgress(0.1f, false);
     AddSubview(progressView);
 }
		public PeliculaCelda (NSString cellid) : base (UITableViewCellStyle.Default, cellid)
		{
			SelectionStyle = UITableViewCellSelectionStyle.Default;
			ContentView.BackgroundColor = UIColor.White;

			Imagen = new UIImageView ();


			Titulo = new UILabel () {
				Font = UIFont.FromName ("Helvetica-Bold", 12f),
				BackgroundColor = UIColor.Clear
			};


			Director = new UILabel () {
				Font = UIFont.FromName ("Helvetica", 10f),
				BackgroundColor = UIColor.Clear
			};

			Duracion = new UILabel () { 
				Font = UIFont.FromName ("Helvetica", 8f),
				TextColor = UIColor.Gray,
				BackgroundColor = UIColor.Clear
			};


			Puntuacion = new UIProgressView () { 
				ProgressTintColor = UIColor.Yellow
			};

			ContentView.AddSubviews (new UIView[]{ Titulo, Director, Imagen, Duracion, Puntuacion });
		}
        protected override void OnAttached()
        {
            UIProgressView         progressBar = (UIProgressView)Control;
            ProgressBarColorEffect effect      = (ProgressBarColorEffect)Element.Effects.FirstOrDefault(e => e is ProgressBarColorEffect);

            oldColor = progressBar.ProgressTintColor;
            progressBar.ProgressTintColor = effect.Color.ToUIColor();
        }
        public static void SetHeight(this UIProgressView progressView, float height)
        {
            progressView.Transform = CGAffineTransform.MakeScale(1.0f, height);

            progressView.Subviews.ToList().ForEach(subview =>
            {
                subview.Layer.CornerRadius  = height / 2.0f;
                subview.Layer.MasksToBounds = true;
            });
        }
		public override void ViewDidLoad ()
		{	
			base.ViewDidLoad ();
			Title = "Appearance";
		
			// Create the buttons and TextView to run the sample code
			//btnBlack = UIButton.FromType(UIButtonType.RoundedRect);
			btnBlack.Frame = new CGRect(10,50,145,50);
			btnBlack.SetTitle("Black theme", UIControlState.Normal);
			
			//btnBlue = UIButton.FromType(UIButtonType.RoundedRect);
			btnBlue.Frame = new CGRect(165,50,145,50);
			btnBlue.SetTitle("Blue theme", UIControlState.Normal);
			
			//slider = new UISlider(new RectangleF(10,110,300, 30));
			slider.Value = 0.75f;			
			//slider2 = new UISlider(new RectangleF(10,260,300, 30));
			slider2.Value = 0.5f;
			
			progress = new UIProgressView(new CGRect(10, 150, 300, 30));
			progress.Progress = 0.35f;
			progress2 = new UIProgressView(new CGRect(10, 300, 300, 30));
			progress2.Progress = 0.85f;
			

			// setting the values directly OVERRIDES the Appearance defaults
			slider2.ThumbTintColor = UIColor.FromRGB (0,127,70); // dark green
			slider2.MinimumTrackTintColor = UIColor.FromRGB (66,255,63);
			slider2.MaximumTrackTintColor = UIColor.FromRGB (197,255,132);

			progress2.ProgressTintColor = UIColor.FromRGB (66,255,63);
			progress2.TrackTintColor = UIColor.FromRGB (197,255,132);
			



			overrideLabel = new UILabel(new CGRect(10, 220, 310, 30));
			overrideLabel.Text = "Overridden values are always observed";
			overrideLabel.BackgroundColor = UIColor.Clear;



			
			// Add the controls to the view
			Add(btnBlack);
			Add(btnBlue);
					
			Add(slider);
			Add(slider2);
	
			Add (progress);
			Add (progress2);

			Add (overrideLabel);
		}
Example #16
0
        public void InitWithFrame()
        {
            RectangleF frame = new RectangleF(10, 10, 100, 100);

            using (UIProgressView pv = new UIProgressView(frame)) {
                Assert.That(pv.Frame.X, Is.EqualTo(frame.X), "X");
                Assert.That(pv.Frame.Y, Is.EqualTo(frame.Y), "Y");
                Assert.That(pv.Frame.Width, Is.EqualTo(frame.Width), "Width");
                // Height is set by the ProgressView (e.g. 9 for the iPhone)
            }
        }
 void HandleShowActivityButtonTouchUpInside (object sender, EventArgs e)
 {
     _progressView = new UIProgressView ();         
     _progressView.Frame = new RectangleF (0, 0, View.Frame.Width - 20, 100);
     _progressView.Center = View.Center;
     _progressView.Style = UIProgressViewStyle.Default;
     
     View.AddSubview (_progressView);
     
     Thread t = new Thread (DoSomethingElse);
     t.Start ();
 }
Example #18
0
        public UIProgressView AddProgressView(string name, UIColor backgroundColor)
        {
            var progressView = new UIProgressView();

            progressView.BackgroundColor = backgroundColor;
            progressView.Frame           = DefaultFrame();
            progressView.TranslatesAutoresizingMaskIntoConstraints = false;
            OurConstraints.ViewNames.Add(new NSString(name));
            OurConstraints.Views.Add(progressView);
            this.Add(progressView);
            return(progressView);
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            Title = "Appearance";

            // Create the buttons and TextView to run the sample code
            //btnBlack = UIButton.FromType(UIButtonType.RoundedRect);
            btnBlack.Frame = new CGRect(10, 50, 145, 50);
            btnBlack.SetTitle("Black theme", UIControlState.Normal);

            //btnBlue = UIButton.FromType(UIButtonType.RoundedRect);
            btnBlue.Frame = new CGRect(165, 50, 145, 50);
            btnBlue.SetTitle("Blue theme", UIControlState.Normal);

            //slider = new UISlider(new RectangleF(10,110,300, 30));
            slider.Value = 0.75f;
            //slider2 = new UISlider(new RectangleF(10,260,300, 30));
            slider2.Value = 0.5f;

            progress           = new UIProgressView(new CGRect(10, 150, 300, 30));
            progress.Progress  = 0.35f;
            progress2          = new UIProgressView(new CGRect(10, 300, 300, 30));
            progress2.Progress = 0.85f;


            // setting the values directly OVERRIDES the Appearance defaults
            slider2.ThumbTintColor        = UIColor.FromRGB(0, 127, 70);     // dark green
            slider2.MinimumTrackTintColor = UIColor.FromRGB(66, 255, 63);
            slider2.MaximumTrackTintColor = UIColor.FromRGB(197, 255, 132);

            progress2.ProgressTintColor = UIColor.FromRGB(66, 255, 63);
            progress2.TrackTintColor    = UIColor.FromRGB(197, 255, 132);



            overrideLabel                 = new UILabel(new CGRect(10, 220, 310, 30));
            overrideLabel.Text            = "Overridden values are always observed";
            overrideLabel.BackgroundColor = UIColor.Clear;



            // Add the controls to the view
            Add(btnBlack);
            Add(btnBlue);

            Add(slider);
            Add(slider2);

            Add(progress);
            Add(progress2);

            Add(overrideLabel);
        }
Example #20
0
        void HandleShowActivityButtonTouchUpInside(object sender, EventArgs e)
        {
            _progressView        = new UIProgressView();
            _progressView.Frame  = new RectangleF(0, 0, View.Frame.Width - 20, 100);
            _progressView.Center = View.Center;
            _progressView.Style  = UIProgressViewStyle.Default;

            View.AddSubview(_progressView);

            Thread t = new Thread(DoSomethingElse);

            t.Start();
        }
Example #21
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            _progressView = new UIProgressView();

            _progressView.SetStyleId("sample-progress");
            View.SetStyleClass("sample-background");

            _progressView.Progress = 0.5f;

            View.AddSubview(_progressView);
        }
Example #22
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            View.BackgroundColor = UIColor.White;

            Title = ViewModel.Title;

#pragma warning disable XI0002 // Notifies you from using newer Apple APIs when targeting an older OS version
            if (UIDevice.CurrentDevice.CheckSystemVersion(11, 0))
            {
                NavigationItem.LargeTitleDisplayMode = UINavigationItemLargeTitleDisplayMode.Never;
            }
#pragma warning restore XI0002 // Notifies you from using newer Apple APIs when targeting an older OS version

            var shareButton = new UIBarButtonItem(UIBarButtonSystemItem.Action, OnShareButtonClick);
            NavigationItem.RightBarButtonItem = shareButton;

            var webConfig = new WKWebViewConfiguration();
            _webView = new WKWebView(CGRect.Empty, webConfig)
            {
                TranslatesAutoresizingMaskIntoConstraints = false,
                NavigationDelegate = this,
                UIDelegate         = this
            };
            View.AddSubview(_webView);

            var constraints = new[]
            {
                _webView.LeadingAnchor.ConstraintEqualTo(View.LeadingAnchor),
                _webView.TopAnchor.ConstraintEqualTo(View.TopAnchor),
                _webView.TrailingAnchor.ConstraintEqualTo(View.TrailingAnchor),
                _webView.BottomAnchor.ConstraintEqualTo(View.BottomAnchor)
            };

            View.AddConstraints(constraints);

            _loadBar = new UIProgressView(UIProgressViewStyle.Bar)
            {
                TranslatesAutoresizingMaskIntoConstraints = false
            };
            _loadBar.SizeToFit();

            View.AddSubview(_loadBar);

            var guide = this.GetCompatibleLayoutGuide();
            _loadBar.LeadingAnchor.ConstraintEqualTo(View.LeadingAnchor).Active   = true;
            _loadBar.TopAnchor.ConstraintEqualTo(guide.TopAnchor).Active          = true;
            _loadBar.TrailingAnchor.ConstraintEqualTo(View.TrailingAnchor).Active = true;

            _webView.LoadRequest(new NSUrlRequest(NSUrl.FromString(ViewModel.StoryUrl)));
        }
Example #23
0
        public static ISourceItemBindingBuilder <TSourceItem, float> BindDefault <TSourceItem>(
            [NotNull] this BindingSet <TSourceItem> bindingSet,
            [CanBeNull] UIProgressView progressView,
            bool animated = true)
            where TSourceItem : class
        {
            if (bindingSet == null)
            {
                throw new ArgumentNullException(nameof(bindingSet));
            }

            return(bindingSet.Bind(progressView)
                   .For(v => v.NotNull().SetProgressBinding(animated)));
        }
Example #24
0
        public async Task ShowProgressDialogAsync(bool isDeterministic, Func <IProgressDialog, CancellationToken, Task> action, string title, string message, string cancelButtonText)
        {
            using (var tokenSource = new CancellationTokenSource())
            {
                message = string.IsNullOrEmpty(message) ? "\n\n" : message + "\n\n";

                using (var alert = UIAlertController.Create(title, message, UIAlertControllerStyle.Alert))
                {
                    UIProgressView progressView = null;
                    if (isDeterministic)
                    {
                        progressView          = new UIProgressView(new CGRect(30F, 80F, 200F, 2F));
                        progressView.Style    = UIProgressViewStyle.Bar;
                        progressView.Progress = 0.0F;
                        alert.View.AddSubview(progressView);
                    }
                    else
                    {
                        var activityIndicator = new UIActivityIndicatorView(UIActivityIndicatorViewStyle.Gray);
                        activityIndicator.Frame = new CGRect(121F, 56F, 37F, 37F);
                        activityIndicator.StartAnimating();
                        alert.View.AddSubview(activityIndicator);
                    }

                    if (!string.IsNullOrEmpty(cancelButtonText))
                    {
                        alert.AddAction(UIAlertAction.Create(cancelButtonText, UIAlertActionStyle.Cancel, _ => tokenSource.Cancel()));
                    }

                    UIApplication.SharedApplication.KeyWindow.RootViewController.PresentViewController(alert, true, null);

                    try
                    {
                        var progressDialog   = new ProgressDialog(alert, progressView);
                        var cancelationToken = tokenSource.Token;
                        await action(progressDialog, cancelationToken);
                    }
                    catch (OperationCanceledException)
                    {
                    }
                    finally
                    {
                        if (!tokenSource.IsCancellationRequested)
                        {
                            await alert.DismissViewControllerAsync(true);
                        }
                    }
                }
            }
        }
			public ProjectElementCell(NSString key) : base(UITableViewCellStyle.Default, key)
			{
				SelectionStyle = UITableViewCellSelectionStyle.None;
				ElementBackground = new UIImageView(Resources.ProjectBackground);



				HeaderImage = new UIImageView();
				HeaderImage.Layer.CornerRadius = 4f;
				HeaderImage.ClipsToBounds = true;

				TitleLabel = new UILabel() 
				{
					Font = Fonts.BoldPrimaryFont(14f),
					TextColor = Colors.PrimaryTextColor,
					TextAlignment = UITextAlignment.Center,
					Lines = 2
				};

				ProgressView = new UIProgressView(UIProgressViewStyle.Bar);

				PledgeLabel = new UILabel() 
				{
					Lines = 2,
					Font = Fonts.PrimaryFont(10f),
					TextColor = Colors.SecondaryTextColor
				};

				BackersLabel = new UILabel() 
				{
					Lines = 2,
					Font = Fonts.PrimaryFont(10f),
					TextColor = Colors.SecondaryTextColor
				};

				DaysToGoLabel = new UILabel() 
				{
					Lines = 2,
					Font = Fonts.PrimaryFont(10f),
					TextColor = Colors.SecondaryTextColor
				};

				PlayButtonImage = new UIImageView(Resources.PlayButton);
				PlayButtonImage.ContentMode = UIViewContentMode.Center;
				PlayButtonImage.Alpha = 1f;

				ElementBackground.AddSubviews(HeaderImage, TitleLabel, ProgressView, PledgeLabel, BackersLabel, DaysToGoLabel, PlayButtonImage);
				ContentView.AddSubviews(ElementBackground);

			}
Example #26
0
            public ProjectElementCell(NSString key) : base(UITableViewCellStyle.Default, key)
            {
                SelectionStyle    = UITableViewCellSelectionStyle.None;
                ElementBackground = new UIImageView(Resources.ProjectBackground);



                HeaderImage = new UIImageView();
                HeaderImage.Layer.CornerRadius = 4f;
                HeaderImage.ClipsToBounds      = true;

                TitleLabel = new UILabel()
                {
                    Font          = Fonts.BoldPrimaryFont(14f),
                    TextColor     = Colors.PrimaryTextColor,
                    TextAlignment = UITextAlignment.Center,
                    Lines         = 2
                };

                ProgressView = new UIProgressView(UIProgressViewStyle.Bar);

                PledgeLabel = new UILabel()
                {
                    Lines     = 2,
                    Font      = Fonts.PrimaryFont(10f),
                    TextColor = Colors.SecondaryTextColor
                };

                BackersLabel = new UILabel()
                {
                    Lines     = 2,
                    Font      = Fonts.PrimaryFont(10f),
                    TextColor = Colors.SecondaryTextColor
                };

                DaysToGoLabel = new UILabel()
                {
                    Lines     = 2,
                    Font      = Fonts.PrimaryFont(10f),
                    TextColor = Colors.SecondaryTextColor
                };

                PlayButtonImage             = new UIImageView(Resources.PlayButton);
                PlayButtonImage.ContentMode = UIViewContentMode.Center;
                PlayButtonImage.Alpha       = 1f;

                ElementBackground.AddSubviews(HeaderImage, TitleLabel, ProgressView, PledgeLabel, BackersLabel, DaysToGoLabel, PlayButtonImage);
                ContentView.AddSubviews(ElementBackground);
            }
Example #27
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            var targetSize = tweetImageInfo.OriginalDimensions;
            var scale      = UIScreen.MainScreen.Scale;

            if (scale != 1)
            {
                targetSize.Height /= scale;
                targetSize.Width  /= scale;
            }

            progressView = new UIProgressView(new CGRect(0, 0, View.Bounds.Width, 4));
            progressView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleBottomMargin;
            progressView.TintColor        = UIColor.Yellow;
            progressView.Progress         = 0;

            imageView                   = new UIImageView(new CGRect(0, 0, targetSize.Width, targetSize.Height));
            imageView.ContentMode       = UIViewContentMode.ScaleAspectFill;
            imageView.ClipsToBounds     = true;
            imageView.BackgroundColor   = UIColor.Gray;
            scrollView                  = new UIScrollView(View.Bounds);
            scrollView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
            scrollView.BackgroundColor  = UIColor.Black;

            doubleTapGuestureRecognizer = new UITapGestureRecognizer(DoubleTapTriggered);
            doubleTapGuestureRecognizer.NumberOfTapsRequired = 2;
            imageView.Image = null;

            imageView.AddGestureRecognizer(doubleTapGuestureRecognizer);
            imageView.UserInteractionEnabled = true;
            scrollView.Delegate         = this;
            scrollView.MinimumZoomScale = 0.01f;             // start VERY small
            scrollView.MaximumZoomScale = 2.0f;
            scrollView.ContentSize      = targetSize;

            View.AddSubview(scrollView);
            View.AddSubview(progressView);
            scrollView.AddSubview(imageView);
            scrollView.ZoomToRect(imageView.Frame, false);
            scrollView.MinimumZoomScale = scrollView.ZoomScale;             // readjust minimum
            if (scrollView.MinimumZoomScale > scrollView.MaximumZoomScale)
            {
                scrollView.MaximumZoomScale = scrollView.MinimumZoomScale;
            }
            DidZoom(scrollView);
            Load();
        }
Example #28
0
        public void Show(string title, int steps)
        {
            Title = title;
            Show ();
            // Spinner - add after Show() or we have no Bounds.

            _progressView = new UIProgressView(UIProgressViewStyle.Default);
            _progressView.Frame = new RectangleF (15, Bounds.Height - 50, Bounds.Width - 30, 30);

            step = 1.0f / steps;

            _progressView.Progress = 0;

            AddSubview (_progressView);
        }
Example #29
0
        public override void LoadView()
        {
            // Create the views.
            View = new UIView {
                BackgroundColor = UIColor.White
            };

            _myMapView = new MapView();
            _myMapView.TranslatesAutoresizingMaskIntoConstraints = false;

            _generateButton         = new UIBarButtonItem();
            _generateButton.Title   = "Generate geodatabase";
            _generateButton.Enabled = false;

            UIToolbar toolbar = new UIToolbar();

            toolbar.TranslatesAutoresizingMaskIntoConstraints = false;
            toolbar.Items = new[]
            {
                new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace),
                _generateButton,
                new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace)
            };

            _progressBar = new UIProgressView();
            _progressBar.TranslatesAutoresizingMaskIntoConstraints = false;

            // Add the views.
            View.AddSubviews(_myMapView, toolbar, _progressBar);

            // Lay out the views.
            NSLayoutConstraint.ActivateConstraints(new[]
            {
                _myMapView.TopAnchor.ConstraintEqualTo(View.SafeAreaLayoutGuide.TopAnchor),
                _myMapView.LeadingAnchor.ConstraintEqualTo(View.LeadingAnchor),
                _myMapView.TrailingAnchor.ConstraintEqualTo(View.TrailingAnchor),
                _myMapView.BottomAnchor.ConstraintEqualTo(toolbar.TopAnchor),

                toolbar.BottomAnchor.ConstraintEqualTo(View.SafeAreaLayoutGuide.BottomAnchor),
                toolbar.LeadingAnchor.ConstraintEqualTo(View.LeadingAnchor),
                toolbar.TrailingAnchor.ConstraintEqualTo(View.TrailingAnchor),

                _progressBar.TopAnchor.ConstraintEqualTo(_myMapView.TopAnchor),
                _progressBar.HeightAnchor.ConstraintEqualTo(8),
                _progressBar.LeadingAnchor.ConstraintEqualTo(View.LeadingAnchor),
                _progressBar.TrailingAnchor.ConstraintEqualTo(View.TrailingAnchor)
            });
        }
Example #30
0
        public void Show(string title, int steps)
        {
            Title = title;
            Show();
            // Spinner - add after Show() or we have no Bounds.

            _progressView       = new UIProgressView(UIProgressViewStyle.Default);
            _progressView.Frame = new RectangleF(15, Bounds.Height - 50, Bounds.Width - 30, 30);


            step = 1.0f / steps;

            _progressView.Progress = 0;

            AddSubview(_progressView);
        }
		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();
			Title = "Calibration";

			progressBar = new UIProgressView (UIProgressViewStyle.Default) {
				AutoresizingMask = UIViewAutoresizing.FlexibleMargins
			};

			// Populate the regions for the beacons we're interested in calibrating.
			rangedRegions = new List<CLBeaconRegion> ();

			foreach (NSUuid uuid in Defaults.SupportedProximityUuids) {
				var region = new CLBeaconRegion (uuid, uuid.AsString ());
				rangedRegions.Add (region);
			}
		}
Example #32
0
        public BlackViewController(IntPtr handle) : base(handle)
        {
            var style = UIButton.AppearanceWhenContainedIn(typeof(PlainView));

            style.SetTitleColor(UIColor.Black, UIControlState.Normal);

            var style1 = UISlider.AppearanceWhenContainedIn(typeof(PlainView));

            style1.ThumbTintColor        = UIColor.DarkGray;
            style1.MaximumTrackTintColor = UIColor.Gray;
            style1.MinimumTrackTintColor = UIColor.LightGray;

            var style2 = UIProgressView.AppearanceWhenContainedIn(typeof(PlainView));

            style2.ProgressTintColor = UIColor.DarkGray;
            style2.TrackTintColor    = UIColor.LightGray;
        }
Example #33
0
        public void Show(string title)
        {
            InvokeOnMainThread(delegate() {
                Title = title;

                progress          = new UIProgressView();
                progress.Frame    = new RectangleF(30f, 80f, 225f, 80f);
                progress.Style    = UIProgressViewStyle.Default;
                progress.Progress = 0;
                AddSubview(progress);

                Show();

                UIApplication.SharedApplication.NetworkActivityIndicatorVisible = true;
            }
                               );
        }
		void ReleaseDesignerOutlets ()
		{
			if (scrollView != null) {
				scrollView.Dispose ();
				scrollView = null;
			}

			if (textInput != null) {
				textInput.Dispose ();
				textInput = null;
			}

			if (nativePB != null) {
				nativePB.Dispose ();
				nativePB = null;
			}
		}
Example #35
0
        private void SetupUserInterface()
        {
            _progressView = new UIProgressView()
            {
                Progress = (float)Player.Progress
            };
            AddSubview(_progressView);

            _infoPanel = new UIControl();
            _infoPanel.TouchUpInside -= InfoPanelTouchUpInside;
            _infoPanel.TouchUpInside += InfoPanelTouchUpInside;
            AddSubview(_infoPanel);

            _coverImage = new UIImageView();
            _infoPanel.AddSubview(_coverImage);

            _titleLabel = new UILabel()
            {
                LineBreakMode = UILineBreakMode.TailTruncation
            };
            _infoPanel.AddSubview(_titleLabel);

            _artistLabel = new UILabel()
            {
                LineBreakMode = UILineBreakMode.TailTruncation,
                Font          = UIFont.SystemFontOfSize(11)
            };
            _infoPanel.AddSubview(_artistLabel);

            _playButton = new UIButton();
            _playButton.TouchUpInside -= PlayButtonTouchUpInside;
            _playButton.TouchUpInside += PlayButtonTouchUpInside;
            AddSubview(_playButton);

            _playNextButton = new UIButton();
            _playNextButton.TouchUpInside -= PlayNextButtonTouchUpInside;
            _playNextButton.TouchUpInside += PlayNextButtonTouchUpInside;
            _playNextButton.Enabled        = false;
            AddSubview(_playNextButton);

            _bottomBorder = new UIView
            {
                BackgroundColor = UIColor.SeparatorColor
            };
            AddSubview(_bottomBorder);
        }
Example #36
0
        public BlueViewController(IntPtr handle) : base(handle)
        {
            var style = UIButton.AppearanceWhenContainedIn(typeof(PlainView));

            style.SetTitleColor(UIColor.Blue, UIControlState.Normal);

            var style1 = UISlider.AppearanceWhenContainedIn(typeof(PlainView));

            style1.ThumbTintColor        = UIColor.Blue;
            style1.MaximumTrackTintColor = UIColor.FromRGB(0, 114, 255);
            style1.MinimumTrackTintColor = UIColor.FromRGB(0, 255, 255);

            var style2 = UIProgressView.AppearanceWhenContainedIn(typeof(PlainView));

            style2.ProgressTintColor = UIColor.FromRGB(150, 221, 255);
            style2.TrackTintColor    = UIColor.FromRGB(211, 255, 243);
        }
 void ReleaseDesignerOutlets()
 {
     if (btnStartDownload != null)
     {
         btnStartDownload.Dispose();
         btnStartDownload = null;
     }
     if (imgView != null)
     {
         imgView.Dispose();
         imgView = null;
     }
     if (progressView != null)
     {
         progressView.Dispose();
         progressView = null;
     }
 }
 void ShowSyncStatusLegacy()
 {
     if (showingSyncButton)
     {
         showingSyncButton = false;
         if (Progress == null)
         {
             Progress = new UIProgressView(UIProgressViewStyle.Bar);
             var frame = Progress.Frame;
             var size  = new CGSize(View.Frame.Size.Width / 4f, frame.Height);
             frame.Size     = size;
             Progress.Frame = frame;
         }
         var progressItem = new UIBarButtonItem(Progress);
         progressItem.Enabled             = false;
         NavigationItem.LeftBarButtonItem = progressItem;
     }
 }
Example #39
0
        public PlainView()
        {
            slider      = new UISlider();
            progress    = new UIProgressView();
            plainButton = UIButton.FromType(UIButtonType.RoundedRect);
            plainButton.SetTitle("Plain Button", UIControlState.Normal);

            plainButton.Frame = new CGRect(20, 150, 130, 40);
            slider.Frame      = new CGRect(20, 190, 250, 20);
            progress.Frame    = new CGRect(20, 230, 250, 20);

            slider.Value      = 0.75f;
            progress.Progress = 0.35f;

            AddSubview(plainButton);
            AddSubview(slider);
            AddSubview(progress);
        }
        public PlainView()
        {
            plainButton = UIButton.FromType(UIButtonType.RoundedRect);
            plainButton.SetTitle ("Plain Button", UIControlState.Normal);
            slider = new UISlider();
            progress = new UIProgressView();

            plainButton.Frame = new CGRect(20, 150, 130, 40);
            slider.Frame = new CGRect(20, 190, 250, 20);
            progress.Frame = new CGRect(20, 230, 250, 20);

            slider.Value = 0.75f;

            progress.Progress = 0.35f;

            Add (plainButton);
            Add (slider);
            Add (progress);
        }
Example #41
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            Title = "Calibration";

            progressBar = new UIProgressView(UIProgressViewStyle.Default)
            {
                AutoresizingMask = UIViewAutoresizing.FlexibleMargins
            };

            // Populate the regions for the beacons we're interested in calibrating.
            rangedRegions = new List <CLBeaconRegion> ();

            foreach (NSUuid uuid in Defaults.SupportedProximityUuids)
            {
                var region = new CLBeaconRegion(uuid, uuid.AsString());
                rangedRegions.Add(region);
            }
        }
 void ReleaseDesignerOutlets()
 {
     if (btnDownload != null) {
         btnDownload.Dispose ();
         btnDownload = null;
     }
     if (btnStop != null) {
         btnStop.Dispose ();
         btnStop = null;
     }
     if (lblFilename != null) {
         lblFilename.Dispose ();
         lblFilename = null;
     }
     if (progressView != null) {
         progressView.Dispose ();
         progressView = null;
     }
 }
        UIProgressView Progreso;        //Indicador de progreso de lo leido

        public CustomLibroCell(NSString cellid) : base(UITableViewCellStyle.Default, cellid)
        {
            //Establecemos el color de seleccion de nuestra celda
            SelectionStyle = UITableViewCellSelectionStyle.Gray;

            //Establecemos el color de fondo de nuestra celda
            ContentView.BackgroundColor = UIColor.FromRGB(224, 223, 213);

            //Inicializamos el imagenview
            Imagen = new UIImageView();

            //Inicializamos las etiquetas de nuestra celda, aplciamos algunos estilos en el tipo de letra
            //y cambiamos el color

            Titulo = new UILabel()
            {
                Font            = UIFont.FromName("Helvetica-Bold", 12f),
                BackgroundColor = UIColor.Clear
            };

            Autor = new UILabel()
            {
                Font            = UIFont.FromName("Helvetica", 10f),
                BackgroundColor = UIColor.Clear
            };

            Paginas = new UILabel()
            {
                Font            = UIFont.FromName("Helvetica", 8f),
                TextColor       = UIColor.FromRGB(150, 148, 143),
                BackgroundColor = UIColor.Clear
            };

            //Inicializamos nuestro ProgressView y le establecemos un color personalizado
            Progreso = new UIProgressView()
            {
                ProgressTintColor = UIColor.FromRGB(239, 196, 17)
            };

            //Agregamos todas la vistas inicializadas a nuestra celda
            ContentView.AddSubviews(new UIView[] { Titulo, Autor, Imagen, Progreso, Paginas });
        }
Example #44
0
		UIProgressView Progreso;//Indicador de progreso de lo leido

		public CustomLibroCell (NSString cellid): base (UITableViewCellStyle.Default,cellid)
		{
			//Establecemos el color de seleccion de nuestra celda
			SelectionStyle = UITableViewCellSelectionStyle.Gray;

			//Establecemos el color de fondo de nuestra celda
			ContentView.BackgroundColor = UIColor.FromRGB (224, 223, 213);

			//Inicializamos el imagenview 
			Imagen = new UIImageView ();

			//Inicializamos las etiquetas de nuestra celda, aplciamos algunos estilos en el tipo de letra 
			//y cambiamos el color

			Titulo = new UILabel (){ 
				Font= UIFont.FromName("Helvetica-Bold",12f),
				BackgroundColor=UIColor.Clear
			};

			Autor = new UILabel (){ 
				Font= UIFont.FromName("Helvetica",10f),
				BackgroundColor=UIColor.Clear
			};

			Paginas = new UILabel (){ 
				Font= UIFont.FromName("Helvetica",8f),
				TextColor=UIColor.FromRGB(150,148,143),
				BackgroundColor=UIColor.Clear
			};

			//Inicializamos nuestro ProgressView y le establecemos un color personalizado
			Progreso = new UIProgressView (){ 
				ProgressTintColor=UIColor.FromRGB (239, 196, 17)

			};

			//Agregamos todas la vistas inicializadas a nuestra celda
			ContentView.AddSubviews (new UIView[]{Titulo,Autor,Imagen,Progreso,Paginas});



		}
        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]);
            }
        }
Example #46
0
        void ReleaseDesignerOutlets()
        {
            if (scrollView != null)
            {
                scrollView.Dispose();
                scrollView = null;
            }

            if (textInput != null)
            {
                textInput.Dispose();
                textInput = null;
            }

            if (nativePB != null)
            {
                nativePB.Dispose();
                nativePB = null;
            }
        }
        public void Initialize()
        {
            _saveCount = 0;
            _newFeedCount = 0;

            Delegate = new AlertViewDelegate(this);
            AddButton("Stop");
            Title = "Getting the latest feeds\nPlease wait...\n\n";
            base.Show();

            // Progress bar.
            _progressView = new UIProgressView();
            _progressView.Frame = new RectangleF((Bounds.Width / 2) - 50, 75, 100, 30);
            _progressView.Progress = 0;
            _progressView.Alpha = 0f;
            AddSubview(_progressView);

            // Activity indicator, which dissapears once the download is complete
            _activityIndicator = new UIActivityIndicatorView(UIActivityIndicatorViewStyle.White);
            _activityIndicator.Frame = new RectangleF((Bounds.Width / 2) -7, 75, 15, 15);
            _activityIndicator.StartAnimating();
            AddSubview(_activityIndicator);
        }
		public SongsViewController ()
		{
			Title = "Songs";
			TableView.Source = new ViewModelDataSource<Song> {
				CellForItem = (tv,item) => {
					var cell = tv.DequeueReusableCell<SongCell>(SongCell.Key);
					cell.Song = item;
					return cell;
				},
				ViewModel = (viewModel = new SongsViewModel()),
			};

			TableView.TableHeaderView = progressView = new UIProgressView (UIProgressViewStyle.Bar) {
				Alpha = 0f
			};

			progressView.SizeToFit ();

			viewModel.ItemsChanged += (sender, e) => {
				// TODO: Step 2b - update UI 1/sec vs. each notification
				if ((DateTime.Now - lastUpdate).TotalSeconds >= 1) {
					InvokeOnMainThread(() => {
						Console.WriteLine("Reloading the TableView.");
						TableView.ReloadData();
					});
					lastUpdate = DateTime.Now;
				}
			};

			viewModel.SongsUpdated += progress => 
				InvokeOnMainThread(() => {
					Console.WriteLine("{0:P}", progress);
					progressView.Progress = progress;
					progressView.Alpha = progress >= 1f ? 0 : 1;
				});

		}
		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();
			
			AddBackground ();

			// Add our different styles of RadialProgressViews
            bigRadialProgressView = new RadialProgressView ();
            bigRadialProgressView.LabelTextDelegate = (val) => Math.Floor(100-val*100).ToString().PadLeft(2, '0');
			bigRadialProgressView.Center = new CGPoint (View.Center.X, View.Center.Y - 100);
			bigRadialProgressView.AutoresizingMask = UIViewAutoresizing.FlexibleMargins;
			View.AddSubview (bigRadialProgressView);

			smallRadialProgressView = new RadialProgressView (progressType: RadialProgressViewStyle.Small);
			smallRadialProgressView.ProgressColor = UIColor.Gray;
			smallRadialProgressView.Center = new CGPoint (bigRadialProgressView.Frame.Left / 2, bigRadialProgressView.Center.Y);
			smallRadialProgressView.AutoresizingMask = UIViewAutoresizing.FlexibleMargins;
			View.AddSubview (smallRadialProgressView);

            tinyRadialProgressView = new RadialProgressView (progressType: RadialProgressViewStyle.Tiny);
			tinyRadialProgressView.ProgressColor = UIColor.White;
			tinyRadialProgressView.Center = new CGPoint (bigRadialProgressView.Frame.Right + (View.Frame.Width - bigRadialProgressView.Frame.Right) / 2, bigRadialProgressView.Center.Y);
			tinyRadialProgressView.AutoresizingMask = UIViewAutoresizing.FlexibleMargins;
			View.AddSubview (tinyRadialProgressView);

			standardProgressView = new UIProgressView (UIProgressViewStyle.Bar);
			standardProgressView.Frame = new CGRect (30, bigRadialProgressView.Frame.Bottom + 80, View.Frame.Width - 60, 10);
			standardProgressView.AutoresizingMask = UIViewAutoresizing.FlexibleBottomMargin | UIViewAutoresizing.FlexibleTopMargin | UIViewAutoresizing.FlexibleWidth;
			View.AddSubview (standardProgressView);

			startProgressButton = UIButton.FromType (UIButtonType.RoundedRect);
			startProgressButton.Frame = new CGRect (50, standardProgressView.Frame.Bottom + 40, View.Frame.Width - 100, 30);
			startProgressButton.SetTitle ("Start Progress", UIControlState.Normal);
			startProgressButton.AutoresizingMask = UIViewAutoresizing.FlexibleBottomMargin | UIViewAutoresizing.FlexibleTopMargin | UIViewAutoresizing.FlexibleWidth;
			startProgressButton.TouchUpInside += OnStartProgressTapped;
			View.AddSubview (startProgressButton);
		}
Example #50
0
		protected override void LayoutContent (UIView container, ContentSet content, LayoutSet layout)
		{
			_message = new UITextView ();
			_message.Frame = new RectangleF (layout.margin, layout.offset + 2, layout.contentWidth, 40);
			_message.Editable = false;
			_message.Text = D.PLAESE_WAIT_DATA_IS_LOADED;
			_message.TextColor = LogonController.GRAY;
			_message.BackgroundColor = UIColor.Clear;
			_message.TextAlignment = UITextAlignment.Center;
			_message.Font = UIFont.FromName ("Arial", 12);
			container.AddSubview (_message);

			UIView indicatorContainer = new UIView ();
			indicatorContainer.Frame = new RectangleF (layout.margin, _message.Frame.Bottom + 2, layout.contentWidth, 20);
			indicatorContainer.BackgroundColor = UIColor.White;
			indicatorContainer.Layer.BorderColor = LogonController.GRAY.CGColor;
			indicatorContainer.Layer.BorderWidth = 1;
			indicatorContainer.Layer.CornerRadius = layout.cornerRadius;
			indicatorContainer.Layer.MasksToBounds = true;
			indicatorContainer.ClipsToBounds = true;

			_indicator = new UIProgressView ();
			_indicator.Frame = new RectangleF (10, 8, indicatorContainer.Frame.Width - 20, indicatorContainer.Frame.Height - 15);
			_indicator.TintColor = BaseColor;
			indicatorContainer.AddSubview (_indicator);
			container.AddSubview (indicatorContainer);

			_progress = new UILabel ();
			_progress.Frame = new RectangleF (layout.margin, indicatorContainer.Frame.Bottom + 2, layout.contentWidth, 40);
			_progress.BackgroundColor = UIColor.Clear;
			_progress.TextColor = LogonController.GRAY;
			_progress.Text = "";
			_progress.TextAlignment = UITextAlignment.Center;
			container.AddSubview (_progress);

		}
 void ShowSyncStatusLegacy()
 {
     if (showingSyncButton) {
     showingSyncButton = false;
     if (Progress == null) {
       Progress = new UIProgressView (UIProgressViewStyle.Bar);
       var frame = Progress.Frame;
       var size = new SizeF (View.Frame.Size.Width / 4f, frame.Height);
       frame.Size = size;
       Progress.Frame = frame;
     }
     var progressItem = new UIBarButtonItem (Progress);
     progressItem.Enabled = false;
     NavigationItem.LeftBarButtonItem = progressItem;
       }
 }
        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]);
              }
        }
 public UIProgressView AddProgressView(string name, UIColor backgroundColor)
 {
     var progressView = new UIProgressView ();
     progressView.BackgroundColor = backgroundColor;
     progressView.Frame = DefaultFrame ();
     progressView.TranslatesAutoresizingMaskIntoConstraints = false;
     OurConstraints.ViewNames.Add (new NSString (name));
     OurConstraints.Views.Add (progressView);
     this.Add (progressView);
     return progressView;
 }
 public void Include(UIProgressView progress)
 {
     progress.Progress = progress.Progress + 1;
 }
Example #55
0
		public void CreateProgView()
		{
			this.progView = new UIProgressView (new RectangleF (500, 700, 100, 50));
			this.progView.Progress = 0f;
			this.vIncrementBy = (float)(0.2);
			this.View.AddSubview (this.progView);
		}
Example #56
0
 /// <summary>
 /// Apply this theme to a specific view.
 /// </summary>
 public static void Apply(UIProgressView view, string options = null)
 {
 }
Example #57
0
 /// <summary>
 /// Apply this theme to all views with the given appearance.
 /// </summary>
 public static void Apply(UIProgressView.UIProgressViewAppearance appearance, string options = null)
 {
 }
Example #58
0
        public void Show(string title)
        {
            InvokeOnMainThread (delegate() {

                Title = title;

                progress = new UIProgressView ();
                progress.Frame = new RectangleF (30f, 80f, 225f, 80f);
                progress.Style = UIProgressViewStyle.Default;
                progress.Progress = 0;
                AddSubview (progress);

                Show ();

                UIApplication.SharedApplication.NetworkActivityIndicatorVisible = true;
            }
            );
        }
        public override void ViewDidUnload()
        {
            base.ViewDidUnload ();
            ReleaseDesignerOutlets ();

            slider.ValueChanged -= HandleValueChanged;
            slider.Dispose ();
            slider = null;

            progress.Dispose ();
            progress = null;

            normalButton.Dispose ();
            normalButton = null;

            pressedButton.Dispose ();
            pressedButton = null;

            label.Dispose ();
            label = null;
        }
		List<Task<int>> CreateTaskForEachFileToDownload()
		{
			List<Task<int>> tasks = new List<Task<int>>(ListOfImages.Length);

			for (int idx =0; idx< ListOfImages.Length; idx++)
			{
				CGRect frame = new CGRect(20f, 276f + idx * 20f, 280f, 2f);
				UIProgressView pb = new UIProgressView(frame);
				Add(pb);

				Progress<DownloadBytesProgress> progressReporter = new Progress<DownloadBytesProgress>();
				progressReporter.ProgressChanged += (s, e) => 
				{
					pb.Progress = e.PercentComplete;
				};

				Task<int> task = GetBytes(ListOfImages[idx], cancellationTokenSource.Token, progressReporter);
				tasks.Add(task);
			}

			return tasks;
		}