123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Text.RegularExpressions;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Shapes;
- namespace Aitex.UI.RecipeEditor.View
- {
-
-
-
- public partial class RecipeInfoEditor : Window
- {
-
-
-
-
-
- public RecipeInfoEditor()
- {
- InitializeComponent();
-
-
- Loaded += new RoutedEventHandler(RecipeInfoEditor_Loaded);
- }
- void RecipeInfoEditor_Loaded(object sender, RoutedEventArgs e)
- {
-
-
-
-
-
-
-
-
-
-
-
-
- }
- private void Button_OK_Click(object sender, RoutedEventArgs e)
- {
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- private void Button_Cancel_Click(object sender, RoutedEventArgs e)
- {
- Close();
- }
- private void OnPreviewTextInput(object sender, TextCompositionEventArgs e)
- {
- e.Handled = !IsTextAllowed(e.Text);
- }
- private static bool IsTextAllowed(string text)
- {
- Regex regex = new Regex("[^0-9.-]+");
- return !regex.IsMatch(text);
- }
- }
- }
|