private ViewModel GetDefaultViewModel(SelectProjectViewModelFactory SelectProjectViewModelFactory)
        {
            if (string.IsNullOrWhiteSpace(_launchParameters.ProjectFileName))
                return SelectProjectViewModelFactory.GetViewModel();

            return _mainViewModelFactory.GetInstance(GetFirmwareVersionViewModel(_launchParameters.ProjectFileName,
                                                                                 _launchParameters.VersionMajor,
                                                                                 _launchParameters.VersionMinor,
                                                                                 _launchParameters.VersionLabel,
                                                                                 _launchParameters.ReleaseDate),
                                                     _loadProjectService.LoadProject(_launchParameters.ProjectFileName));
        }
 public RootViewModelFactory(MainViewModelFactory MainViewModelFactory, SelectProjectViewModelFactory SelectProjectViewModelFactory,
                             IEventAggregator EventAggregator, ILaunchParameters LaunchParameters, ILoadProjectService LoadProjectService,
                             IRecentProjectsService RecentProjectsService, IPackageSavingService PackageSavingService)
 {
     _mainViewModelFactory = MainViewModelFactory;
     _eventAggregator = EventAggregator;
     _selectProjectViewModelFactory = SelectProjectViewModelFactory;
     _launchParameters = LaunchParameters;
     _loadProjectService = LoadProjectService;
     _recentProjectsService = RecentProjectsService;
     _packageSavingService = PackageSavingService;
 }
        public RootViewModel(MainViewModelFactory MainViewModelFactory, SelectProjectViewModelFactory SelectProjectViewModelFactory,
                             IEventAggregator EventAggregator, ILaunchParameters LaunchParameters, ILoadProjectService LoadProjectService,
                             IRecentProjectsService RecentProjectsService, IPackageSavingService PackageSavingService)
        {
            _mainViewModelFactory = MainViewModelFactory;
            _launchParameters = LaunchParameters;
            _loadProjectService = LoadProjectService;
            _recentProjectsService = RecentProjectsService;
            _packageSavingService = PackageSavingService;

            ActualViewModel = GetDefaultViewModel(SelectProjectViewModelFactory);
            EventAggregator.GetEvent<ProjectLoadedEvent>().Subscribe(ReloadViewModel);
        }