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 ResetService(StatisticService statistic,
                     ConfigService config)
 {
     this.statistic = statistic;
     this.config    = config;
     //初始化计时器
     timer          = new DispatcherTimer();
     timer.Tick    += new EventHandler(timer_Tick);
     timer.Interval = new TimeSpan(0, 0, 1);
 }
Exemplo n.º 3
0
 public MainService(App app,
                    ScreenService screen,
                    ConfigService config,
                    CacheService cache,
                    StatisticService statistic)
 {
     this.screen    = screen;
     this.config    = config;
     this.cache     = cache;
     this.statistic = statistic;
     app.Exit      += new ExitEventHandler(app_Exit);
 }
Exemplo n.º 4
0
 public MainService(App app,
                    ScreenService screen,
                    ConfigService config,
                    CacheService cache,
                    StatisticService statistic)
 {
     this.screen    = screen;
     this.config    = config;
     this.cache     = cache;
     this.statistic = statistic;
     app.Exit      += new ExitEventHandler(app_Exit);
     SystemEvents.PowerModeChanged += new PowerModeChangedEventHandler(OnPowerModeChanged);
 }
Exemplo n.º 5
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;
        }