public OpenRepoViewModel( IOpenRepoService openRepoService, IRecentReposService recentReposService, IThemeService themeService) { this.openRepoService = openRepoService; this.recentReposService = recentReposService; this.themeService = themeService; Rect = DefaultOpenBounds; RecentFiles = GetRecentFiles(); }
public RepositoryViewModel( WorkingFolder workingFolder, IDiffService diffService, ICommandLine commandLine, IViewModelService viewModelService, ICommitsService commitsService, IRepositoryService repositoryService, IGitFetchService gitFetchService, IThemeService themeService, IOpenRepoService openRepoService, IRecentReposService recentReposService, IMessage message, IProgressService progressService, Func <CommitDetailsViewModel> commitDetailsViewModelProvider) { this.workingFolder = workingFolder; this.diffService = diffService; this.commandLine = commandLine; this.viewModelService = viewModelService; this.commitsService = commitsService; this.repositoryService = repositoryService; this.gitFetchService = gitFetchService; this.themeService = themeService; this.openRepoService = openRepoService; this.recentReposService = recentReposService; this.message = message; this.progress = progressService; VirtualItemsSource = new RepositoryVirtualItemsSource(Branches, Merges, Commits, OpenRepos); filterTriggerTimer.Tick += FilterTrigger; filterTriggerTimer.Interval = FilterDelay; CommitDetailsViewModel = commitDetailsViewModelProvider(); repositoryService.RepositoryUpdated += (s, e) => OnRepositoryUpdated(); repositoryService.RepositoryErrorChanged += (s, e) => FetchErrorText = e.ErrorText; }