コード例 #1
0
 protected virtual void ClearDownload(ClearMessage msg)
 {
 }
コード例 #2
0
 protected virtual void ClearDownload(ClearMessage msg)
 {
 }
コード例 #3
0
 /// <summary>
 /// Clears a selected task
 /// </summary>
 /// <param name="msg"></param>
 protected override void ClearDownload(ClearMessage msg)
 {
     foreach (var task in DownloadingItems.Where(task => task.DataContext == msg.DownloadItemViewModel).ToList())
     {
         var viewModel = (DownloadItemViewModel)task.DataContext;
         viewModel.Dispose();
         DownloadingItems.Remove(task);
     }
 }
コード例 #4
0
 /// <summary>
 /// Should be called upon application shutdown to cancel any ongoing downloads
 /// </summary>
 /// <param name="msg"></param>
 protected override void ClearDownload(ClearMessage msg)
 {
     // No specified 'DownloadItemViewModel' means that all instances of it should be canceled
     if (msg.DownloadItemViewModel == null)
     {
         Cancel();
         Dispose();
         videoDownloader = null;
     }
 }