LongoMatch.Services.RenderingJobsManager.MainLoopOnProgress C# (CSharp) Method

MainLoopOnProgress() private method

private MainLoopOnProgress ( float progress ) : void
progress float
return void
        private void MainLoopOnProgress(float progress)
        {
            if (progress > (float)EditorState.START && progress <= (float)EditorState.FINISHED
                && progress > stateBar.Fraction) {
                UpdateProgress (progress);
            }

            if (progress == (float)EditorState.CANCELED) {
                Log.Debug ("Job was cancelled");
                currentJob.State = JobState.Cancelled;
                CloseAndNext ();
            } else if (progress == (float)EditorState.START) {
                Log.Debug ("Job started");
                currentJob.State = JobState.Running;
                stateBar.JobRunning = true;
                UpdateProgress (progress);
            } else if (progress == (float)EditorState.FINISHED) {
                Log.Debug ("Job finished successfully");
                if (currentJob is EditionJob) {
                    videoEditor.Progress -= OnProgress;
                } else {
                    videoConverter.Progress -= OnProgress;
                }
                UpdateProgress (progress);
                currentJob.State = JobState.Finished;
                CloseAndNext ();
            } else if (progress == (float)EditorState.ERROR) {
                HandleError ();
            }
        }