public void Recreate() { lvi = new DownloadWorkerItem(this, currentDownload.TitleName); lvi.Speed = "Waiting"; if (progressValue > 100) { progressValue = 100; } lvi.Progress = progressValue; timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromSeconds(1); timer.Tick += Timer_Tick; if (status == WorkerStatus.Running) { Start(); } else if (status == WorkerStatus.Downloaded) { Unpack(); } else if (status == WorkerStatus.Completed) { lvi.Speed = ""; lvi.Status = "Completed"; } }
public DownloadWorker(Item itm) { currentDownload = itm; lvi = new DownloadWorkerItem(this, itm.TitleName); lvi.Speed = "Waiting"; //isRunning = false; //isCanceled = false; //isCompleted = false; timer.Interval = TimeSpan.FromSeconds(1); timer.Tick += Timer_Tick; status = WorkerStatus.Queued; }