Exemple #1
0
        public LocalePurifier()
        {
            _settingsReader = new SettingsReader();

            _registryPurifier      = new RegistryKeyLocalePurifier(_settingsReader);
            _inputLanguagePurifier = new InputLanguagePurifier(_settingsReader);

            //_keyboardLayoutSpy = new KeyboardLayoutSpy();
            //KeyboardSurveillanceThread = new Thread(_keyboardLayoutSpy.Surveillance);

            _registryChangeMonitor = new RegistryChangeMonitor(
                $@"HKEY_USERS\{Utilities.SID}\Keyboard Layout\Preload");

            Purify += OnPurify;

            _registryChangeMonitor.Changed += (sender, args) =>
            {
                Console.WriteLine("Registry keys changed!");
                Purify?.Invoke(sender, new PurifyEventArgs());
            };
        }
 public RegistryChangeEventArgs(RegistryChangeMonitor monitor)
 {
     this.Monitor = monitor;
 }