/// <summary>
        /// Combo box event of main menu xmls changed
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MainMenuDatabases_CurrentChanged(object sender, System.EventArgs e)
        {
            SelectedMainMenuItem = (MainMenuItemViewModel)MainMenuDatabases.CurrentItem;

            if (_selectedService.CurrentMainMenu == null)
            {
                return;
            }

            _selectedService.CurrentMainMenu = SelectedMainMenuItem.Name;

            _eventAggregator.GetEvent <MainMenuSelectedEvent>().Publish(_selectedService.CurrentMainMenu);
        }
        public MainMenuViewModel(ISettingsHypermint settingsRepo, IEventAggregator ea,
                                 IHyperspinManager hyperspinManager,
                                 ISelectedService selectedService,
                                 IHyperspinXmlDataProvider dataProvider)
        {
            _settingsRepo     = settingsRepo;
            _selectedService  = selectedService;
            _eventAggregator  = ea;
            _dataProvider     = dataProvider;
            _hyperspinManager = hyperspinManager;

            //Init the collections used
            MainMenuItemViewModels            = new ObservableCollection <MainMenuItemViewModel>();
            SelectedMainMenuItem              = new MainMenuItemViewModel();
            MainMenuDatabases                 = new ListCollectionView(MainMenuItemViewModels);
            MainMenuDatabases.CurrentChanged += MainMenuDatabases_CurrentChanged;
            OpenFolderCommand                 = new DelegateCommand <string>(OnOpenDirectory);

            SetMainMenuDatabases("Main Menu");
        }