private void Start() { RegisterHotKeys(_data.AppData.AppKeys); _isRunning = true; Indication.On(); }
private void Stop() { UnregisterHotKeys(); if (_data.Clicker?.State == State.Running) { _data.Clicker?.Stop(); } Indication.Off(); _isRunning = false; }
protected override Task ExecuteAsync(CancellationToken stoppingToken) { _data.LoadApplicationConfig(); if (_data.AppData != null) { if (_data.AppData.OpenUiOnStartup) { OpenUi(); } RegisterHotKeys(_data.AppData.AppKeys); Indication.Run(_data.AppData); } HotKeysCycle(stoppingToken); LifeCycle(stoppingToken); return(Task.CompletedTask); }