コード例 #1
0
        private void ReadConfiguration()
        {
            AvailableKeys = Enum.GetNames(typeof(Keys)).ToList();

            // to setup a key for the keyboard hook
            HookedKey = _appConfigProvider.GetConfig().HookedKeyCode;

            // initial setup of preview window
            _previewUpdateTask.Execute((() => new Point(CoordinateX, CoordinateY), DisableHookCommand.CanExecute),
                                       CancellationToken.None);

            _screenResolution = Win32ApiHelper.GetScreenResolution();

            try
            {
                _hookedColor = ColorHelper.FromRgb(_appConfigProvider.GetConfig().HookedRgbColorCode);
            }
            catch (Exception e)
            {
                _hookedColor = Constants.GtaButtonColor;
                Logger.Error(e, "Couldn't parse rgb code");
            }
        }