Ejemplo n.º 1
0
 /// <summary>
 /// Handles the on job started.
 /// </summary>
 /// <param name="job">Job.</param>
 public static void HandleOnJobStarted(Job job)
 {
     JOBS.Add(
         new JobDisplay(
             job,
             string.Format("Job #{0} {1}", JOBS.Count + 1, JobDisplay.GetJobType(job))));
 }
Ejemplo n.º 2
0
    /// <summary>
    /// Renders the job.
    /// </summary>
    /// <param name="job">Job.</param>
    private void RenderJob(JobDisplay job)
    {
        if (null != job)
        {
            job.Refresh();

            using (var jobSection = new JuneHorizontalSection()) {
                using (var labelSection = new JuneVerticalSection()) {
                    GUIStyle style = new GUIStyle(EditorStyles.boldLabel);
                    if (_JOB_COLOUR.ContainsKey(job))
                    {
                        style.normal.textColor = _JOB_COLOUR[job];
                    }

                    EditorGUILayout.LabelField(job.Name, style);
                    EditorGUILayout.LabelField("Current", job.Content, style);
                    EditorGUILayout.LabelField("Paused", job.IsPaused.ToString(), style);
                }

                using (var isEnabled = new JuneDisabledGroup(isDisabled: false == job.ShouldRefresh)) {
                    if (GUILayout.Button(job.PausePlayButtonText))
                    {
                        job.TogglePause();
                    }
                }
            }
        }
    }