public ProjectSettingsViewModel(IConfigAreaRepository configAreaRepository, IConfigProjectRepository configProjectRepository,
                                        IConfigProjectsLibRepository configProjectsLibRepository)
        {
            this.configAreaRepository        = configAreaRepository;
            this.configProjectRepository     = configProjectRepository;
            this.configProjectsLibRepository = configProjectsLibRepository;
            configProjectMessenger           = ConfigProjectMessenger.Instance;
            loadData();

            SelectProjectChangeCommand = new CustomCommand(SelectProjectChange, CanSelectProjectChange);
            AddProjectCommand          = new CustomCommand(AddProject, CanAddProject);
            SaveCommand = new CustomCommand(Save, CanSave);
            // MessengerConfigProject.Default.Register<ConfigProject>(this, OnConfigProjectReceived);
            //MessengerConfigProject.Default.Register<UpdateListMessageConfigProject>(this, OnConfigProjectUpdated);
        }
        public MainListViewModel(ICandidateRepository CandidateRepository, IConfigProjectsLibRepository configProjectsLibRepository,
                                 IConfigProjectsCandidateRepository configProjectsCandidateRepository, IConfigAreaRepository configAreaRepository,
                                 IConfigProjectRepository configProjectRepository, IConfigCompanyRepository configCompanyRepository,
                                 ICandidateCompanyRepository candidateCompanyRepository,
                                 IConfigCompanyProjectRepository configCompanyProjectRepository, IDialogService dialogService)
        {
            this.candidateRepository               = CandidateRepository;
            this.configProjectsLibRepository       = configProjectsLibRepository;
            this.configProjectsCandidateRepository = configProjectsCandidateRepository;
            this.configAreaRepository              = configAreaRepository;
            this.configProjectRepository           = configProjectRepository;
            this.configCompanyRepository           = configCompanyRepository;
            this.candidateCompanyRepository        = candidateCompanyRepository;
            this.configCompanyProjectRepository    = configCompanyProjectRepository;
            this.dialogService     = dialogService;
            configProjectMessenger = ConfigProjectMessenger.Instance;
            configProjectMessenger.ConfigProjectChanged += OnConfigProjectChanged;
            DocumentToAction      = new Document();
            AllProjectsSelected   = true;
            AllAreasSelected      = true;
            AllCompaniesSelected  = true;
            CombinedRefreshNeeded = true;

            App.splashScreen.AddMessage("Loading data");
            //App.splashScreen.UpdateProgress(0);
            #region loadData
            try
            {
                LoadData();
            }
            catch (Exception e)
            {
            }
            #endregion


            App.splashScreen.AddMessage("Loading views");
            #region loadView
            try
            {
                LoadViews();
            }
            catch (Exception e)
            {
            }
            #endregion
            //App.splashScreen.UpdateProgress(70);
            App.splashScreen.AddMessage("Matching data");
            addConfigsToCandidates();
            App.splashScreen.AddMessage("Matching data completed");
            //App.splashScreen.UpdateProgress(90);
            #region commandsInitialisation
            App.splashScreen.AddMessage("commandsInitialisation");
            CommandsInitialisation();
            App.splashScreen.AddMessage("commandsInitialisation completed");
            //App.splashScreen.UpdateProgress(95);
            #endregion

            MessengerCandidate.Default.Register <UpdateListMessage>(this, OnUpdateListMessageReceived);
            MessengerCompany.Default.Register <List <CandidateCompany> >(this, OnCompanyReceived);
            //MessengerConfigProject.Default.Register<UpdateListMessageConfigProject>(this, OnConfigProjectReceived);
            MessengerCandidateCollection.Default.Register <ObservableCollection <Candidate> >(this, OnCandidateCollectionReceived);
            MessengerDocument.Default.Register <UpdateDocument>(this, OnUpdateDocumentMessageReceived);
            //MessengerConfigProject.Default.Register<ConfigProject>(this, OnConfigProjectReceived);

            App.splashScreen.AddMessage("Done!");
            //App.splashScreen.UpdateProgress(100);

            App.splashScreen.LoadComplete();
        }