Exemplo n.º 1
0
        public PreAlertService(ConfigService config,
                               MainService main,
                               ResetService reset,
                               StatisticService statistic,
                               SoundService sound)
        {
            this.config    = config;
            this.main      = main;
            this.reset     = reset;
            this.statistic = statistic;
            this.sound     = sound;

            main.OnReStartTimer  += Main_OnReStartTimer;
            main.OnReset         += Main_OnReset;
            main.OnLeaveEvent    += Main_OnLeaveEvent;
            main.OnComeBackEvent += Main_OnComeBackEvent;
            main.OnPause         += Main_OnPause;
            main.OnStart         += Main_OnStart;
            config.Changed       += Config_Changed;
            reset.ResetStart     += Reset_ResetStart;
            reset.ResetCompleted += Reset_ResetCompleted;

            preAlertTimer       = new DispatcherTimer();
            preAlertTimer.Tick += new EventHandler(preAlertTimer_Tick);
        }
Exemplo n.º 2
0
 public TomatoService(
     ConfigService config,
     BackgroundWorkerService backgroundWorker,
     TrayService tray,
     SoundService sound)
 {
     this.config           = config;
     this.backgroundWorker = backgroundWorker;
     this.tray             = tray;
     this.sound            = sound;
 }
Exemplo n.º 3
0
 public TomatoService(
     ConfigService config,
     BackgroundWorkerService backgroundWorker,
     TrayService tray,
     SoundService sound)
 {
     this.config           = config;
     this.backgroundWorker = backgroundWorker;
     this.tray             = tray;
     this.sound            = sound;
     timerWatcher          = new Stopwatch();
 }
Exemplo n.º 4
0
        public PreAlertService(ConfigService config,
                               MainService main,
                               RestService reset,
                               StatisticService statistic,
                               SoundService sound)
        {
            this.config    = config;
            this.main      = main;
            this.reset     = reset;
            this.statistic = statistic;
            this.sound     = sound;

            main.OnReStartTimer += Main_OnReStartTimer;
            main.OnReset        += Main_OnReset;
            main.OnLeaveEvent   += Main_OnLeaveEvent;
            main.OnPause        += Main_OnPause;
            main.OnStart        += Main_OnStart;
            config.Changed      += Config_Changed;
            reset.RestStart     += Reset_ResetStart;
            reset.RestCompleted += Reset_ResetCompleted;
        }