public SelectProjectViewModelFactory(IEventAggregator EventAggregator, ILoadProjectService LoadProjectService, IRecentProjectsService RecentProjectsService, RecentProjectViewModelFactory RecentProjectViewModelFactory) { _eventAggregator = EventAggregator; _loadProjectService = LoadProjectService; _recentProjectsService = RecentProjectsService; _recentProjectViewModelFactory = RecentProjectViewModelFactory; }
public SelectProjectViewModel(ILoadProjectService LoadProjectService, IEventAggregator EventAggregator, IList<RecentProjectViewModel> RecentProjects) { this.RecentProjects = RecentProjects; _loadProjectService = LoadProjectService; _eventAggregator = EventAggregator; OpenFileRequest = new InteractionRequest<OpenFileInteractionContext>(); LoadProjectCommand = new DelegateCommand(Load); }
public ProjectViewModel GetInstance(PackageProject Project, string ProjectFileName, string RootDirectory, ILoadProjectService LoadProjectService) { List<TargetViewModel> targets = Project.Components.SelectMany(c => c.Targets.Select(t => new TargetViewModel(_indexHelper.GetCellName(t.Cell), _indexHelper.GetModuleName(t.Cell, t.Module)))) .Distinct(TargetViewModel.Comparer) .ToList(); string name = Path.GetFileName(ProjectFileName); return new ProjectViewModel(Project, name, ProjectFileName, RootDirectory, targets, LoadProjectService, _eventAggregator); }
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 RecentProjectViewModel(string Name, string Directory, string FilePath, string LastVersion, IEventAggregator EventAggregator, ILoadProjectService LoadProjectService) { this.Name = Name; this.Directory = Directory; this.LastVersion = LastVersion; _filePath = FilePath; _eventAggregator = EventAggregator; _loadProjectService = LoadProjectService; LoadCommand = new DelegateCommand(Load, CanLoad); }
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); }
public ProjectViewModel(PackageProject Project, string Name, string FilePath, string ProjectRoot, ICollection<TargetViewModel> Targets, ILoadProjectService LoadProjectService, IEventAggregator EventAggregator) { _loadProjectService = LoadProjectService; _eventAggregator = EventAggregator; this.Name = Name; _project = Project; this.FilePath = FilePath; this.Targets = Targets; this.ProjectRoot = ProjectRoot; LoadProjectCommand = new DelegateCommand(LoadProject); OpenFileRequest = new InteractionRequest<OpenFileInteractionContext>(); }
public RecentProjectViewModelFactory(IEventAggregator EventAggregator, ILoadProjectService LoadProjectService) { _eventAggregator = EventAggregator; _loadProjectService = LoadProjectService; }