/// <summary> /// The OnPauseDownloadCalled. /// </summary> /// <param name="model">The model<see cref="DownloadItemModel"/>.</param> internal void OnPauseDownloadCalled(DownloadItemModel model) { if (!(model is OperationModel operationModel)) { return; } var operation = operationModel.Operation; var status = operation.Status; if (status != OperationStatus.Paused && status != OperationStatus.Queued && status != OperationStatus.Working) { return; } if (status == OperationStatus.Paused) { operation.Resume(); model.PauseText = "Pause"; } else { operation.Pause(); model.PauseText = "Resume"; } }
private void WatchRelease(DownloadItemModel downloadRelease) { ChangePage( "Player", new ReleaseLinkModel { ReleaseId = downloadRelease.ReleaseId } ); }
private async void DeleteFiles(DownloadItemModel item) { await m_DownloadService.RemoveDownloadRelease(item.ReleaseId); RefreshDownloadItems(); }
/// <summary> /// The OnCancelDownloadCalled. /// </summary> /// <param name="model">The model<see cref="DownloadItemModel"/>.</param> internal void OnCancelDownloadCalled(DownloadItemModel model) { model.Dispose(); this.DownloadItemModels.Remove(model); }