private void HotkeyTextBox_LosingFocus(object sender, RoutedEventArgs e)
        {
            if (lastValidSettings != null && (lastValidSettings.IsValid() || lastValidSettings.IsEmpty()))
            {
                HotkeySettings = lastValidSettings.Clone();
            }

            HotkeyTextBox.Text = hotkeySettings.ToString();
            if (AutomationPeer.ListenerExists(AutomationEvents.PropertyChanged))
            {
                TextBoxAutomationPeer peer =
                    FrameworkElementAutomationPeer.FromElement(HotkeyTextBox) as TextBoxAutomationPeer;
                string textBoxChangeActivityId = "textBoxChangedOnLosingFocus";

                if (peer != null)
                {
                    peer.RaiseNotificationEvent(
                        AutomationNotificationKind.ActionCompleted,
                        AutomationNotificationProcessing.ImportantMostRecent,
                        HotkeyTextBox.Text,
                        textBoxChangeActivityId);
                }
            }

            _isActive = false;
        }
Ejemplo n.º 2
0
        private void HotkeyTextBox_LosingFocus(object sender, RoutedEventArgs e)
        {
            if (internalSettings.IsValid() || internalSettings.IsEmpty())
            {
                HotkeySettings = internalSettings;
            }

            HotkeyTextBox.Text = hotkeySettings.ToString();
        }
        private void HotkeyTextBox_LosingFocus(object sender, RoutedEventArgs e)
        {
            if (lastValidSettings != null && (lastValidSettings.IsValid() || lastValidSettings.IsEmpty()))
            {
                HotkeySettings = lastValidSettings.Clone();
            }

            HotkeyTextBox.Text = hotkeySettings.ToString();
            _isActive          = false;
        }
Ejemplo n.º 4
0
 private static bool ComboIsValid(HotkeySettings settings)
 {
     if (settings != null && (settings.IsValid() || settings.IsEmpty()))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }