public void AddDown(Uri uri, StorageFile file) { Count++; DownLoadEntity entity = new DownLoadEntity() { Name = Count.ToString(), Uri = uri.ToString(), ReceiveBytes = 0 }; DownLoadList.Add(entity); DownLoadHelp.AddDownLoader(uri, file); }
private async void Ini() { IReadOnlyList <DownloadOperation> items = await DownLoadHelp.GetCurrentDownLoader(); foreach (var item in items) { Count++; if (DownLoadList != null) { DownLoadEntity entity = new DownLoadEntity() { Name = Count.ToString(), Uri = item.RequestedUri.ToString(), ReceiveBytes = (long)item.Progress.BytesReceived }; DownLoadList.Add(entity); } } }