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; }
public TrayService( App app, MainService mainService, ConfigService config, BackgroundWorkerService backgroundWorker, ThemeService theme) { this.app = app; this.mainService = mainService; this.config = config; this.backgroundWorker = backgroundWorker; this.theme = theme; this.config.Changed += new EventHandler(config_Changed); this.theme.OnChangedTheme += Theme_OnChangedTheme; app.Exit += new ExitEventHandler(app_Exit); mainService.OnLeaveEvent += MainService_OnLeaveEvent; mainService.OnStart += MainService_OnStart;; backgroundWorker.DoWork += BackgroundWorker_DoWork; backgroundWorker.OnCompleted += BackgroundWorker_OnCompleted; notifyIcon = new System.Windows.Forms.NotifyIcon(); }