Beispiel #1
0
 private void AtbxAddProductName_OnTextChanged(object sender, RoutedEventArgs e)
 {
     if (atbxAddProductName.Text.All(chr => char.IsLetter(chr) || char.IsNumber(chr) || char.IsWhiteSpace(chr)))
     {
         oldtext = atbxAddProductName.Text;
         var autoComplete = _autocomplete.AutoCompleteProduct(atbxAddProductName.Text);
         atbxAddProductName.ItemsSource = autoComplete;
     }
     else
     {
         atbxAddProductName.Text = oldtext;
         System.Windows.MessageBox.Show("Der kan kun skrives bogstaverne fra a til å og tallene fra 0 til 9",
                                        "ERROR", MessageBoxButton.OK);
     }
 }
Beispiel #2
0
        private void atbxAddProductName_TextChanged(object sender, RoutedEventArgs routedEventArgs)
        {
            var autoComplete = _autocomplete.AutoCompleteProduct(atbxAddProductName.Text);

            atbxAddProductName.ItemsSource = autoComplete;
        }
Beispiel #3
0
        private void AutoBox_OnTextChanged(object sender, RoutedEventArgs routedEventArgs)
        {
            var autoComplete = _autocomplete.AutoCompleteProduct(atbxFindProduct.Text);

            atbxFindProduct.ItemsSource = autoComplete;
        }