Esempio n. 1
0
        public void Execute()
        {
            this.Status = WorkItemStatus.Running;
            WorkItemStatusUpdated.Invoke(this, new WorkItemStatusUpdatedEventArgs(this.Status));

            WebPageDownload(this.Name);

            this.Status = WorkItemStatus.Completed;
            WorkItemStatusUpdated.Invoke(this, new WorkItemStatusUpdatedEventArgs(this.Status));
        }
Esempio n. 2
0
        public void Execute()
        {
            this.Status = WorkItemStatus.Running;
            WorkItemStatusUpdated.Invoke(this, new WorkItemStatusUpdatedEventArgs(this.Status));

            for (int i = 0; i < Duration; i++)
            {
                Thread.Sleep(100);
            }

            this.Status = WorkItemStatus.Completed;
            WorkItemStatusUpdated.Invoke(this, new WorkItemStatusUpdatedEventArgs(this.Status));
        }