/// <summary> /// Displays a process to the user. /// </summary> /// <param name="owner">The owner to set for the window.</param> /// <param name="host">The process worker to display.</param> public void Display(object?owner, IProcessWorker host) { host.CheckNotNull(nameof(host)); if (!AppExited) { UIItem?ui = null; if (host.Options.JobId != null) { ui = _uiList.FirstOrDefault(u => u.JobId.Equals(host.Options.JobId)); } if (ui != null) { ui.Value.DisplayTask(host); } else { var title = !string.IsNullOrEmpty(host.Options.Title) ? host.Options.Title : "Process Running"; CreateUI(owner, title, true).DisplayTask(host); } } }