bool CancelDownloadButtonCanExecute(object parameter)
        {
            if (parameter is null)
            {
                return(false);
            }
            DownloadAbstract dl = (DownloadAbstract)parameter;

            return(dl.State != DownloadState.DownloadCompleted);
        }
        bool PauseDownloadButtonCommandCanExecute(object parameter)
        {
            if (parameter is null)
            {
                return(false);
            }
            DownloadAbstract dl = (DownloadAbstract)parameter;

            return(dl.Pausable);
        }
 void CancelDownloadButtonCommandExecute(object parameter)
 {
     if (parameter != null)
     {
         DownloadAbstract dl = (DownloadAbstract)parameter;
         if (dl is DownloadTestItem)
         {
             dl.Progress = 0;
         }
         else
         {
             dl.CancelRetryDownload();
         }
     }
 }
 void PauseDownloadButtonCommandExecute(object parameter)
 {
     if (parameter != null)
     {
         DownloadAbstract dl = (DownloadAbstract)parameter;
         if (dl is DownloadTestItem)
         {
             dl.Progress++;
         }
         else
         {
             dl.PauseResumeDownload();
         }
     }
 }