Exemple #1
0
        public UpdaterService(TaskExecutionService taskExecutionService, WindowService windowService)
        {
            _taskExecutionService = taskExecutionService;
            _windowService        = windowService;

            // Events
            _webService.ProgressChanged += (sender, args) => Progress = args.Progress;

            // Timer
            _timer.Interval = TimeSpan.FromHours(1).TotalMilliseconds;
            _timer.Elapsed += (sender, args) => PerformUpdate();
        }
        public TaskFileBufferService(TaskExecutionService taskExecutionService)
        {
            _taskExecutionService = taskExecutionService;

            // Set up watcher
            string dir  = Path.GetDirectoryName(FileSystem.TaskBufferFilePath);
            string file = Path.GetFileName(FileSystem.TaskBufferFilePath);

            _watcher = new FileSystemWatcher(dir, file)
            {
                IncludeSubdirectories = false,
                NotifyFilter          = NotifyFilters.LastWrite | NotifyFilters.CreationTime | NotifyFilters.FileName
            };

            // Events
            _watcher.Changed += (sender, args) => ParseBufferFile();
            DispatcherHelper.UIDispatcher.InvokeSafeAsync(() => Application.Current.Exit += (sender, args) => DumpQueue()).Forget();
        }
Exemple #3
0
 public AuthService(TaskExecutionService taskExecutionService, WindowService windowService)
 {
     _taskExecutionService = taskExecutionService;
     _windowService        = windowService;
 }
Exemple #4
0
 public HistoryService(TaskExecutionService taskExecutionService, DatabaseService databaseService)
 {
     _taskExecutionService = taskExecutionService;
     _databaseService      = databaseService;
 }