Esempio n. 1
0
        public OpenRepoViewModel(
            IOpenRepoService openRepoService,
            IRecentReposService recentReposService,
            IThemeService themeService)
        {
            this.openRepoService    = openRepoService;
            this.recentReposService = recentReposService;
            this.themeService       = themeService;
            Rect = DefaultOpenBounds;

            RecentFiles = GetRecentFiles();
        }
Esempio n. 2
0
        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;
        }