Beispiel #1
0
        private void DeleteSelectedJob()
        {
            var jobToDelete = (DistributedJob)JobListBox.SelectedItem;


            P2PEditor.GuiLogMessage(
                string.Format(Properties.Resources.Deleting_job__0____1___, jobToDelete.Name, jobToDelete.Guid),
                NotificationLevel.Info);

            var backgroundCreationWorker = new JobDeletionWorker(JobListManager, jobToDelete);

            backgroundCreationWorker.RunWorkerCompleted += BackgroundDeletionWorkerCompleted;
            backgroundCreationWorker.RunWorkerAsync();
        }
Beispiel #2
0
        private void DeleteSelectedJob()
        {
            var jobToDelete = (DistributedJob)JobListBox.SelectedItem;

            if (jobToDelete == null || jobToDelete.Owner != P2PSettings.Default.PeerName)
            {
                return;
            }

            P2PEditor.GuiLogMessage(
                string.Format("Deleting job {0} ({1}).", jobToDelete.Name, jobToDelete.Guid),
                NotificationLevel.Info);

            var backgroundCreationWorker = new JobDeletionWorker(JobListManager, jobToDelete);

            backgroundCreationWorker.RunWorkerCompleted += BackgroundDeletionWorkerCompleted;
            backgroundCreationWorker.RunWorkerAsync();
        }