private void DeceideIfRetrospectiveIsAvailable(CcdLevel currentLevel) { if (currentLevel.Level != Level.Black && currentLevel.Level != Level.White) { RetrospectiveAvailable = true; } }
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(); }
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); }
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(); }
private void Initialize() { Retrospectives = _persister.Load(); var lastRetrospective = Retrospectives.FirstOrDefault(); if (lastRetrospective == null) { _currentLevel = new CcdLevel(Level.Black); } else { _currentLevel = lastRetrospective.Clone(); } }
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; }); }
public BlackLevelViewModel(CcdLevel currentLevel) { _currentLevel = currentLevel; }
public WhiteLevelViewModel(CcdLevel currentLevel) { _currentLevel = currentLevel; }
public PersistService(IRepository repository, IEventAggregator eventAggregator, CcdLevel currentLevel) { _repository = repository; currentLevel.Advanced += (s, e) => PersistData(null); eventAggregator.GetEvent <AdviceGivenEvent>().Subscribe(PersistData); }