Esempio n. 1
0
 private void OnFinished(ShareJobFinishedEventArgs ea)
 {
     if (!finished)
     {
         Finished?.Invoke(this, ea);
         finished = true;
     }
 }
Esempio n. 2
0
        public async Task Execute()
        {
            try
            {
                string url = await InnerExecute();

                OnFinished(new ShareJobFinishedEventArgs(this, url));
            }
            catch (Exception e)
            {
                OnFinished(ShareJobFinishedEventArgs.Error(this, e.Message));
            }
        }
Esempio n. 3
0
        private void NextJob_Finished(object sender, ShareJobFinishedEventArgs e)
        {
            IShareJob job = (IShareJob)sender;

            if (e.ErrorMessage != null)
            {
                JobFinished?.Invoke(this, new ShareJobQueueStatusEventArgs(job, "Failed: " + e.ErrorMessage, true));
            }
            else
            {
                JobFinished?.Invoke(this, new ShareJobQueueStatusEventArgs(job, "Finished"));
            }
        }
Esempio n. 4
0
 public void Cancel()
 {
     OnFinished(ShareJobFinishedEventArgs.Cancel(this));
 }