}//FillBrainstormings

                public void FillTrainings(OptionsPanel optionsPanel)
                {
                        optionsPanel.ShowButtons();
                        this.Children.Clear();
                        //List<Model.AdvancedTask> trains = _chief.SelectTrainings();


                        List<Model.AdvancedTask> trains = new Sorter().Sort(_chief, UIStates.ON_TRAINING);

                        if(trains.Count != 0)
                        {
                                foreach (Model.AdvancedTask item in trains)
                                {
                                        SingleAdvancedTaskPanel training = new SingleAdvancedTaskPanel(item);
                                        _trainingList.Add(training);
                                        training.MouseDown += Trainings_MouseDown;
                                        this.Children.Add(training);
                                }
                        }
                        else
                        {
                                this.Children.Add(new EmptyTaskPanel(ControlsValues.TRAINING));

                        }
                      
                }//FillTrainings()
                public ContentPanel(string name, HeaderPanel headerPanel)
                {
                        //Setting properties
                        this.Height = Dimensions.GetHeight()*0.75;
                        this.Margin = new System.Windows.Thickness(0, 10, 0, 0);
                        this.Orientation = System.Windows.Controls.Orientation.Horizontal;

                        //Setting fields
                        RightPanelCoordinator coord = new RightPanelCoordinator(this);
                        _taskPanel = new TaskPanel(_detailsPanel,name,coord);        
                        _optionsPanel = new OptionsPanel(_taskPanel);                        

                        _rightPanel = _optionsPanel;
                        _firstLoad = true;
                        _isOnOptions = true;
                        _projectName = name;
                        _scroller = new ScrollViewer();
                        _headerPanel = headerPanel;

                        //Adding children
                        _scroller.Content = _taskPanel;
                        this.Children.Add(_scroller);
                        this.Children.Add(_rightPanel);

                        //Loading Brainstormings on beginning by default
                        LoadBrainstorming();
                }
                public void FillBrainstormings(OptionsPanel optionsPanel)
                {
                        optionsPanel.HideButtons();
                        this.Children.Clear();
                        
                        List<Model.Task> brains = _chief.SelectBrainstormings();

                        if(brains.Count != 0 )
                        {
                                foreach (Model.Task item in brains)
                                {
                                        SingleTaskPanel brainStorming = new SingleTaskPanel(item);
                                        _brainstormingList.Add(brainStorming);
                                        brainStorming.MouseDown += brainStorming_MouseDown;
                                        this.Children.Add(brainStorming);
                                }
                        }
                        else
                        {
                                this.Children.Add(new EmptyTaskPanel(ControlsValues.BRAINSTORMING));
                        }
                       
                }//FillBrainstormings
                }//FillTrainings()

                public void FillAssignments(OptionsPanel optionsPanel)
                {
                        optionsPanel.ShowButtons();
                        this.Children.Clear();
                        List<Model.AdvancedTask> assignments = new Sorter().Sort(_chief, UIStates.ON_ASSIGNMENT);

                        if(assignments.Count != 0)
                        {
                                foreach (Model.AdvancedTask item in assignments)
                                {

                                        SingleAdvancedTaskPanel assignment = new SingleAdvancedTaskPanel(item);
                                        _assignmentsList.Add(assignment);
                                        assignment.MouseDown += Assignments_MouseDown;
                                        this.Children.Add(assignment);
                                }
                        }

                        else
                        {
                                this.Children.Add(new EmptyTaskPanel(ControlsValues.ASSIGNMENTS));

                        }
                       
                }//FillAssignments()
                }//FillAssignments()

                public void FillMaintenances(OptionsPanel optionsPanel)
                {
                        optionsPanel.ShowButtons();
                        this.Children.Clear();
                        List<Model.AdvancedTask> maintenances = new Sorter().Sort(_chief, UIStates.ON_MAINTENANCE);

                        if(maintenances.Count != 0)
                        {
                                foreach (Model.AdvancedTask item in maintenances)
                                {

                                        SingleAdvancedTaskPanel maintenance = new SingleAdvancedTaskPanel(item);
                                        _maintenancesList.Add(maintenance);
                                        maintenance.MouseDown += Maintenances_MouseDown;
                                        this.Children.Add(maintenance);
                                }
                        }
                        else
                        {
                                this.Children.Add(new EmptyTaskPanel(ControlsValues.MAINTENANCE));

                        }
                      
                }//FillAssignments()