Ejemplo n.º 1
0
 private void DeceideIfRetrospectiveIsAvailable(CcdLevel currentLevel)
 {
     if (currentLevel.Level != Level.Black && currentLevel.Level != Level.White)
     {
         RetrospectiveAvailable = true;
     }
 }
Ejemplo n.º 2
0
        public Navigator(IRegionManager regionManager, IEventAggregator eventAggregator, CcdLevel currentLevel)
        {
            _regionManager = regionManager;
            _currentLevel  = currentLevel;

            eventAggregator.GetEvent <RetrospectiveDoneEvent>().Subscribe(NavigateToShowAdviceView);
            eventAggregator.GetEvent <AdviceGivenEvent>().Subscribe(o => NavigateToCorrectCcdLevelsView());
            currentLevel.Advanced += (s, e) => NavigateToCorrectCcdLevelsView();
        }
Ejemplo n.º 3
0
        public HeaderViewModel(IEventAggregator eventAggregator, CcdLevel currentLevel)
        {
            _logger.Trace("Wiring events");
            _beginRetrospectiveEvent = eventAggregator.GetEvent <BeginRetrospectiveEvent>();

            eventAggregator.GetEvent <AdviceGivenEvent>().Subscribe(_ => DeceideIfRetrospectiveIsAvailable(currentLevel));
            currentLevel.Advanced += (s, e) => DeceideIfRetrospectiveIsAvailable(currentLevel);

            DeceideIfRetrospectiveIsAvailable(currentLevel);
        }
Ejemplo n.º 4
0
        public AdviceViewModel(IEventAggregator eventAggregator,
                               IRepository repository,
                               IRalfWestphal ralfWestphal,
                               CcdLevel currentLevel)
        {
            _repository   = repository;
            _ralfWestphal = ralfWestphal;
            _currentLevel = currentLevel;

            _logger.Trace("Wiring events");
            _adviceGivenEvent = eventAggregator.GetEvent <AdviceGivenEvent>();

            QueryRalfWestphal();
        }
Ejemplo n.º 5
0
        private void Initialize()
        {
            Retrospectives = _persister.Load();
            var lastRetrospective = Retrospectives.FirstOrDefault();

            if (lastRetrospective == null)
            {
                _currentLevel = new CcdLevel(Level.Black);
            }
            else
            {
                _currentLevel = lastRetrospective.Clone();
            }
        }
Ejemplo n.º 6
0
        public CcdLevelsViewModel(IEventAggregator eventAggregator, CcdLevel currentLevel)
        {
            _currentLevel           = currentLevel;
            _currentLevel.Advanced += (s, e) =>
            {
                _logger.Trace("Principles and Practices have updated - tell it to the view.");
                OnPropertyChanged("CurrentLevel");
                OnPropertyChanged("Principles");
                OnPropertyChanged("Practices");
            };

            _logger.Trace("Wiring events");
            _retrospectiveDoneEvent = eventAggregator.GetEvent <RetrospectiveDoneEvent>();

            eventAggregator.GetEvent <BeginRetrospectiveEvent>().Subscribe(x =>
            {
                _logger.Trace("Let's begin the retrospective - switch to evaluation-mode");
                EvaluationVisible = true;
            });
        }
Ejemplo n.º 7
0
 public BlackLevelViewModel(CcdLevel currentLevel)
 {
     _currentLevel = currentLevel;
 }
Ejemplo n.º 8
0
 public WhiteLevelViewModel(CcdLevel currentLevel)
 {
     _currentLevel = currentLevel;
 }
Ejemplo n.º 9
0
        public PersistService(IRepository repository, IEventAggregator eventAggregator, CcdLevel currentLevel)
        {
            _repository = repository;

            currentLevel.Advanced += (s, e) => PersistData(null);
            eventAggregator.GetEvent <AdviceGivenEvent>().Subscribe(PersistData);
        }