Exemplo n.º 1
0
        private TaskActionType objDownloadJob_TaskEnd(ITaskResult objTaskResult, int intIndex)
        {
            timerUpdateProgress.Enabled = false;

            TaskActionType enuTaskActionType = TaskActionType.Continue;

            if (objTaskResult.Result == TaskResultType.Failed)
            {
                enuTaskActionType = DownloadFailedMessage.ShowMessage(objTaskResult);
            }

            this.ThreadSafe(new MethodInvoker(delegate()
            {
                timerUpdateProgress.Enabled = false;

                UpdateOverallProgress(_intTaskCount, _intTaskIndex);

                ListViewItem objListViewItem = listViewStatus.Items[_intTaskIndex - 1];
                if (objListViewItem != null)
                {
                    objListViewItem.SubItems[1].Text = objTaskResult.Result.ToString();
                    listViewStatus.EnsureVisible(objListViewItem.Index);
                }

                UpdateCurrentProgress(progressBarCurrent.Maximum, progressBarCurrent.Maximum);
            }));

            _objCurrentDownloadStats = null;

            return(enuTaskActionType);
        }
Exemplo n.º 2
0
 public DownloadRequestSession(DownloadRequest objDownloadRequest, JobTicket objJobTicket)
     : base()
 {
     DownloadRequest = objDownloadRequest;
     JobTicket       = objJobTicket;
     DownloadStats   = new DownloadStats(objDownloadRequest, objJobTicket.StartTime);
 }
Exemplo n.º 3
0
        private void objDownloadJob_TaskProgressChanged(ITaskStats objTaskStats)
        {
            IDownloadStats objStats = (IDownloadStats)objTaskStats;

            _objCurrentDownloadStats = (DownloadStats)objStats;
        }