예제 #1
0
 public FiltersViewModel(IMergingService mergingService,
                         ProjectMembersSetsViewModel projectMembersSetsViewModel,
                         CurrentUserViewModel currentUserViewModel)
 {
     _projectMembersSetsViewModel         = projectMembersSetsViewModel;
     _areFiltersEnabled                   = mergingService.IsMergingCompleted;
     mergingService.MergingCompleted     += OnProjectPathChanged;
     currentUserViewModel.CurrentUserSet += CurrentUserViewModelOnCurrentUserSet;
     _currentUser = currentUserViewModel.CurrentUser;
 }
예제 #2
0
        public ProjectQueryService(IStorageService <Project> storageService,
                                   IMergingService mergingService)
        {
            _storageService = storageService;

            mergingService.MergingCompleted += InitializeDataFromStorage;
            if (mergingService.IsMergingCompleted)
            {
                InitializeDataFromStorage();
            }
        }
예제 #3
0
        public QueryService(IStorageService <TModel> storageService, IMergingService mergingService)
        {
            _storageService  = storageService;
            _recentlyChanged = new HashSet <object>();
            _recentlyDeleted = new HashSet <object>();

            mergingService.MergingCompleted += InitializeDataFromStorage;

            _data = new Dictionary <object, TModel>();
            InitializeDataFromStorage();
        }
예제 #4
0
        public ButtonsViewModel(IRepositoryService repositoryService, IMergingService mergingService)
        {
            _isHistoryBeingResolved = false;
            _repositoryService      = repositoryService;

            _resolveHistoryCommand = new RelayCommand(OnResolveHistoryCommand);
            _addTaskStateCommand   = new RelayCommand(OnAddTaskStateCommand);
            _setCurrentUserCommand = new RelayCommand(OnSetCurrentUserCommand);

            mergingService.MergingCompleted += OnProjectPathChanged;
            _areButtonsEnabled = mergingService.IsMergingCompleted;
        }
예제 #5
0
        public MainViewModel(IProjectPathsReadonlyService projectPathsService,
                             RegistryViewModel registryViewModel,
                             IMergingService mergingService)
        {
            _isTaskBoardVisible          = false;
            _isMergingToolVisible        = false;
            _isProjectInitializerVisible = true;

            _isTaskBoardVisible = projectPathsService.IsProjectPathChosen;
            projectPathsService.ProjectPathChanged += OnProjectPathChanged;
            mergingService.MergingCompleted        += MergingServiceOnMergingCompleted;
            registryViewModel.InitializeRegistry();
        }
예제 #6
0
        public MergingViewModel(IMergingService mergingService,
                                IProjectPathsReadonlyService projectPathsService,
                                IRepositoryService repositoryService,
                                IStorageService <TaskState> taskStateStorageService)
        {
            _mergingService          = mergingService;
            _repositoryService       = repositoryService;
            _taskStateStorageService = taskStateStorageService;
            _isLoading         = mergingService.IsMergingCompleted;
            _isOkButtonEnabled = false;
            _okCommand         = new RelayCommand(OnOkCommand);

            projectPathsService.ProjectPathChanged += ProjectPathsServiceOnProjectPathChanged;
            mergingService.MergingConflictsAquired += MergingServiceOnMergingConflictsAquired;
        }