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(); }
public AuthService(TaskExecutionService taskExecutionService, WindowService windowService) { _taskExecutionService = taskExecutionService; _windowService = windowService; }
public HistoryService(TaskExecutionService taskExecutionService, DatabaseService databaseService) { _taskExecutionService = taskExecutionService; _databaseService = databaseService; }