public ContentDisplayManager(JobWindowList jobForWindow, List<Agent> availableAgents, Job_Configuration configuration)
        {
            this.jobForWindow = jobForWindow;
            this.configuration = configuration;

            this.workingAgents = new List<WorkingAgent>();
            this.agentSelectors = new Dictionary<Job, AgentSelector>();

            foreach (Job job in jobForWindow.Jobs)
            {
                AgentSelector selector = new AgentSelector(job, availableAgents);
                selector.OnAgentNotReachable += Selector_OnAgentNotReachable;

                this.agentSelectors[job] = selector;
            }

            this.Running = false;
        }
        private void ToAction_Click(object sender, RoutedEventArgs e)
        {
            if (this.timelines.Sum(x => x.Items.Count) > 0)
            {
                this.Tab2.IsEnabled = false;
                this.Tab3.IsSelected = true;
                this.Tab3.IsEnabled = true;

                foreach (TimeLineControl tlc in this.timelines)
                {
                    JobWindowList jwl = new JobWindowList();
                    jwl.WindowLayoutNumber = tlc.WindowLayoutId;
                    jwl.Looping = tlc.Loop;
                    int i = 1;             
                    foreach (TimeLineItemVM tlivm in tlc.Items)
                    {
                        jwl.Jobs.Add(new Job() { Duration = tlivm.Duration, Resource = tlivm.Resource, OrderingNumber = i });
                        i++;
                    }

                    this.job.JobLists.Add(tlc.WindowLayoutId, jwl);                    
                }
            }
            else
            {
                MessageBox.Show("Der Job enthält keine Elemente!", "Info", MessageBoxButton.OK, MessageBoxImage.Information);
            }
        }