예제 #1
0
		public PhotoProgress StartImport ()
		{
			PhotoImport = new PhotoImport (imageURL);

			PhotoImport.Progress.CompletedUnitCountChanged += FractionComepletedChanged?.Invoke;
			PhotoImport.Start ((img, error) => {
				if (img != null)
					Image = img;
				else
					ReportError (error);

				PhotoImport.Progress.CompletedUnitCountChanged -= FractionComepletedChanged?.Invoke;
				PhotoImport = null;
				FractionComepletedChanged?.Invoke (null, null);
			});

			return PhotoImport.Progress;
		}
예제 #2
0
        public PhotoProgress StartImport()
        {
            PhotoImport = new PhotoImport(imageURL);

            PhotoImport.Progress.CompletedUnitCountChanged += FractionComepletedChanged?.Invoke;
            PhotoImport.Start((img, error) => {
                if (img != null)
                {
                    Image = img;
                }
                else
                {
                    ReportError(error);
                }

                PhotoImport.Progress.CompletedUnitCountChanged -= FractionComepletedChanged?.Invoke;
                PhotoImport = null;
                FractionComepletedChanged?.Invoke(null, null);
            });

            return(PhotoImport.Progress);
        }