StockerModifyView.xaml.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Navigation;
  14. using System.Windows.Shapes;
  15. namespace FurnaceUI.Views.Operations
  16. {
  17. /// <summary>
  18. /// WaferModifyView.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class StockerModifyView : UserControl
  21. {
  22. public StockerModifyView()
  23. {
  24. InitializeComponent();
  25. }
  26. private void Slot_TextChanged(object sender, TextChangedEventArgs e)
  27. {
  28. TextBox tb = sender as TextBox;
  29. if (string.IsNullOrEmpty(tb.Text))
  30. {
  31. tb.BorderBrush = Brushes.Red;
  32. return;
  33. }
  34. if (Convert.ToInt32(tb.Text) > 26 || Convert.ToInt32(tb.Text) < 1)
  35. tb.BorderBrush = Brushes.Red;
  36. else
  37. tb.BorderBrush = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromArgb(0xFF, 0x1B, 0x1B, 0x1B));
  38. }
  39. }
  40. }