Beispiel #1
0
 public TomatoService(
     ConfigService config,
     BackgroundWorkerService backgroundWorker,
     TrayService tray,
     SoundService sound)
 {
     this.config           = config;
     this.backgroundWorker = backgroundWorker;
     this.tray             = tray;
     this.sound            = sound;
 }
Beispiel #2
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();
 }
 public StatisticService(
     App app,
     BackgroundWorkerService backgroundWorker)
 {
     this.app = app;
     this.backgroundWorker = backgroundWorker;
     this.app.Exit += app_Exit;
     statisticList = new StatisticListModel();
     statisticList.Data = new List<StatisticModel>();
     xmlPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
         dir,
         "statistic.xml");
 }
Beispiel #4
0
        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();
        }