mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 22:46:58 +00:00
ImageLoader
This commit is contained in:
parent
61a772d02b
commit
5282046c31
3 changed files with 11 additions and 18 deletions
|
|
@ -157,21 +157,5 @@ namespace MapControl
|
|||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
private static Task<ImageSource[]> LoadImagesAsync(Uri uri1, Uri uri2, IProgress<double> progress)
|
||||
{
|
||||
IProgress<double> progress1 = null;
|
||||
IProgress<double> progress2 = null;
|
||||
|
||||
if (progress != null)
|
||||
{
|
||||
var p1 = 0d;
|
||||
var p2 = 0d;
|
||||
progress1 = new Progress<double>(p => { p1 = p; progress.Report((p1 + p2) / 2d); });
|
||||
progress2 = new Progress<double>(p => { p2 = p; progress.Report((p1 + p2) / 2d); });
|
||||
}
|
||||
|
||||
return Task.WhenAll(LoadImageAsync(uri1, progress1), LoadImageAsync(uri2, progress2));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue