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; }
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); }