Exemple #1
0
 public void TransferredEvent(UpdateJob transferredJob)
 {
     if (OnJobTransferred != null)
     {
         OnJobTransferred.Invoke(this, new UpdateJobEventArgs(transferredJob));
     }
 }
Exemple #2
0
 public void ModificationEvent(UpdateJob modifiedJob)
 {
     if (OnJobModification != null)
     {
         OnJobModification.Invoke(this, new UpdateJobEventArgs(modifiedJob));
     }
 }
Exemple #3
0
 public void ErrorEvent(UpdateJob errorJob, IBackgroundCopyError errorInfo)
 {
     if (OnJobError != null)
     {
         OnJobError.Invoke(this, new UpdateJobErrorEventArgs(errorJob, errorInfo));
     }
 }
        public UpdateJob CreateJob(String jobName, String description, Int64 retryPeriod, Int64 retryDelay)
        {
            IBackgroundCopyJob newJob;
            GUID newJobID;

            try
            {
                copyManager.CreateJob(jobName, BG_JOB_TYPE.BG_JOB_TYPE_DOWNLOAD, out newJobID, out newJob);
                UpdateJob myJob = new UpdateJob(newJob);
                myJob.Description = description;

                //if (retryPeriod != DEFAULT_RETRY_PERIOD)
                myJob.NoProgressTimeout = DEFAULT_RETRY_PERIOD;

                //if (retryDelay != DEFAULT_RETRY_DELAY)
                myJob.MinimumRetryDelay = DEFAULT_RETRY_DELAY;

                return(myJob);
            }
            catch (COMException ex)
            {
                throw new Exception(String.Format("Error Creating Job ({0}).", ex.Message));
            }
        }
Exemple #5
0
 public UpdateJobEventArgs(UpdateJob job)
 {
     CopyJob     = job;
     DisplayName = job.DisplayName;
 }
Exemple #6
0
 public void AddJob(UpdateJob jobToMonitor)
 {
     AddJob(jobToMonitor, JobNotificationType.JobError | JobNotificationType.JobTransferred);
 }
Exemple #7
0
 public void AddJob(UpdateJob jobToMonitor, JobNotificationType notifyType)
 {
     jobToMonitor.NotifyInterface = callback;
     jobToMonitor.NotifyFlags     = notifyType;
 }
Exemple #8
0
 public UpdateJobErrorEventArgs(UpdateJob eventJob, IBackgroundCopyError errorInfo) : base(eventJob)
 {
     this.errorInfo = errorInfo;
 }