public YapaTheme(IMainViewModel viewModel, YapaThemeSettings settings, IPomodoroEngine engine, ISettings globalSettings, IPomodoroRepository pomodoroRepository, PomodoroEngineSettings engineSettings) : base(viewModel) { ViewModel = viewModel; Settings = settings; _pomodoroRepository = pomodoroRepository; _engineSettings = engineSettings; InitializeComponent(); TimerFlush = (Storyboard)TryFindResource("FlashTimer"); AfterBreakTimerFlush = (Storyboard)TryFindResource("AfterBreakFlashTimer"); PomodorosCompleted = 0; ViewModel.Engine.PropertyChanged += Engine_PropertyChanged; ViewModel.Engine.OnPomodoroCompleted += Engine_OnPomodoroCompleted; ViewModel.Engine.OnStarted += StopAnimation; ViewModel.Engine.OnStopped += StopAnimation; globalSettings.PropertyChanged += _globalSettings_PropertyChanged; DataContext = this; UpdateAppSize(); PhaseChanged(); UpdateStatusText(); UpdateCompletedPomodoroCount(); PropertyChanged += YapaTheme_PropertyChanged; UpdateDisplayedTime(); UpdateSecondVisibility(); }
public Dashboard(IPomodoroEngine engine, IPomodoroRepository itemRepository, PomodoroEngineSettings engineSettings) { _itemRepository = itemRepository; _engineSettings = engineSettings; _engine = engine; _engine.OnPomodoroCompleted += _engine_OnPomodoroCompleted; }
public MainWindow(IMainViewModel viewModel, MotivationalThemeSettings settings, PomodoroEngineSettings baseSettings, IPomodoroRepository pomodoroRepository, ISettings globalSettings) : base(viewModel) { ViewModel = viewModel; _settings = settings; _baseSettings = baseSettings; _pomodoroRepository = pomodoroRepository; _globalSettings = globalSettings; InitializeComponent(); globalSettings.PropertyChanged += _globalSettings_PropertyChanged; DataContext = this; // Initialize Pomodoro session ResetPomodoroPeriod(); ViewModel.Engine.PropertyChanged += Engine_PropertyChanged; ViewModel.Engine.OnPomodoroCompleted += Engine_OnPomodoroCompleted; ViewModel.Engine.OnStarted += EngineOnOnStarted; UpdateCompletedPomodoroCount(); UpdateTime(); }
// this is handled through dependency injection public PomodoroController(IPomodoroRepository pomodoros, IActivityRepository activities) { _pomodoros = pomodoros; _activities = activities; }
public AboutPage(IPomodoroRepository pomodoroRepository) { _pomodoroRepository = pomodoroRepository; InitializeComponent(); }