Artemis.ViewModels.Flyouts.FlyoutSettingsViewModel.KeyboardUpdater C# (CSharp) Méthode

KeyboardUpdater() private méthode

Takes proper action when the selected keyboard is changed in the UI
private KeyboardUpdater ( object sender, PropertyChangedEventArgs e ) : void
sender object
e System.ComponentModel.PropertyChangedEventArgs
Résultat void
        private void KeyboardUpdater(object sender, PropertyChangedEventArgs e)
        {
            if (e.PropertyName != "SelectedKeyboardProvider")
                return;

            _logger.Debug("Handling SelectedKeyboard change in UI");
            var keyboard = MainManager.DeviceManager.KeyboardProviders
                .FirstOrDefault(k => k.Name == SelectedKeyboardProvider);
            if (keyboard != null)
            {
                MainManager.DeviceManager.EnableKeyboard(keyboard);
                MainManager.LoopManager.StartAsync();
            }
            else
                MainManager.DeviceManager.ReleaseActiveKeyboard(true);
        }