WaferDialogView.xaml.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. using MECF.Framework.Common.OperationCenter;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Text.RegularExpressions;
  7. using System.Threading.Tasks;
  8. using System.Windows;
  9. using System.Windows.Controls;
  10. using System.Windows.Data;
  11. using System.Windows.Documents;
  12. using System.Windows.Input;
  13. using System.Windows.Media;
  14. using System.Windows.Media.Imaging;
  15. using System.Windows.Navigation;
  16. using System.Windows.Shapes;
  17. using CyberX8_MainPages.ViewModels;
  18. namespace CyberX8_MainPages.Views
  19. {
  20. /// <summary>
  21. /// WaferDialogView.xaml 的交互逻辑
  22. /// </summary>
  23. public partial class WaferDialogView : Window
  24. {
  25. public bool? AlignFlag { get { return canalign.IsChecked; } set { canalign.IsChecked = value; } }
  26. public bool? CoolingFlag { get { return cancooling.IsChecked; } set { cancooling.IsChecked = value; } }
  27. public string Angle { get { return alignangel.Text; } set { alignangel.Text = value; } }
  28. public string CoolingTime { get { return coolingtime.Text; } set { coolingtime.Text = value; } }
  29. public WaferDialogView()
  30. {
  31. InitializeComponent();
  32. }
  33. private void Button_Click(object sender, RoutedEventArgs e)
  34. {
  35. DialogResult = true;
  36. }
  37. private void Button_Click_1(object sender, RoutedEventArgs e)
  38. {
  39. DialogResult = false;
  40. }
  41. private void needcooling_Checked(object sender, RoutedEventArgs e)
  42. {
  43. coolingtime.IsEnabled = true;
  44. }
  45. private void needcooling_unChecked(object sender, RoutedEventArgs e)
  46. {
  47. coolingtime.IsEnabled = false;
  48. }
  49. private void needalign_Checked(object sender, RoutedEventArgs e)
  50. {
  51. alignangel.IsEnabled = true;
  52. }
  53. private void needalign_unChecked(object sender, RoutedEventArgs e)
  54. {
  55. alignangel.IsEnabled = false;
  56. }
  57. private void TextBox_PreviewTextInput(object sender, System.Windows.Input.TextCompositionEventArgs e)
  58. {
  59. e.Handled = new Regex("[^0-9.]+").IsMatch(e.Text);
  60. }
  61. }
  62. }