private void OnJobFinished(
     object sender,
     JobFinishedEventArgs args
     )
 {
     Invoke(new GuiUpdateCallback(UpdateControls));
 }
 private void RegisterJobFinished(
     object sender,
     JobFinishedEventArgs args
     )
 {
     NumberJobsFinished++;
 }
        private void SyncRelationshipJobFinished(object sender, JobFinishedEventArgs e)
        {
            SyncJob job = e.Job as SyncJob;

            if (job == null)
            {
                return;
            }

            if (job.JobResult == JobResult.NotRun)
            {
                return;
            }

            this.ReloadChildren();
        }
示例#4
0
        private void HandleJobFinished(object sender, JobFinishedEventArgs args)
        {
            // If a sync job finished, it should match the current sync job view model
            Debug.Assert(this.ActiveJob.Job == args.Job, "this.ActiveJob.Job == args.Job");

            if (this.ActiveJob.Job is SyncJob || this.ActiveJob.Job is RestoreJob)
            {
                App.DispatcherInvoke(() => { this.SyncJobHistory.Insert(0, this.ActiveJob); });
            }

            this.UpdateStatusDescription();

            this.CalculateRelationshipMetadataAsync().Wait();

            this.JobFinished?.Invoke(sender, args);

            this.ActiveJob = null;
        }
示例#5
0
        private void OnJobFinished(
            object sender,
            JobFinishedEventArgs args
            )
        {
            NativeMethods.AllowSleepMode();

            WriteToLogFile();

            if (JobFinished != null)
            {
                JobFinished(this, args);
            }

            if (IsBatchProcessRunning)
            {
                PerformBatchProcess();
            }
        }
示例#6
0
 private void OnJobFinished_Default(object sender, JobFinishedEventArgs e)
 {
     Console.WriteLine($"Job Finished at {DateTime.Now}, {e.SongHash.Substring(0, 4)}: {e.JobSuccessful}");
 }