예제 #1
0
        private void Start()
        {
            RegisterHotKeys(_data.AppData.AppKeys);

            _isRunning = true;
            Indication.On();
        }
예제 #2
0
        private void Stop()
        {
            UnregisterHotKeys();

            if (_data.Clicker?.State == State.Running)
            {
                _data.Clicker?.Stop();
            }

            Indication.Off();
            _isRunning = false;
        }
예제 #3
0
        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);
        }