using MECF.Framework.Common.OperationCenter;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
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.Navigation;
using System.Windows.Shapes;
using CyberX8_MainPages.ViewModels;

namespace CyberX8_MainPages.Views
{
    /// <summary>
    /// WaferDialogView.xaml 的交互逻辑
    /// </summary>
    public partial class WaferDialogView : Window
    {
        public bool? AlignFlag { get { return canalign.IsChecked; } set { canalign.IsChecked = value; } }
        public bool? CoolingFlag { get { return cancooling.IsChecked; } set { cancooling.IsChecked = value; } }
        public string Angle { get { return alignangel.Text; } set { alignangel.Text = value; } }
        public string CoolingTime { get { return coolingtime.Text; } set { coolingtime.Text = value; } }

        public WaferDialogView()
        {
            InitializeComponent();
            
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = true;
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            DialogResult = false;
        }

        private void needcooling_Checked(object sender, RoutedEventArgs e)
        {
            coolingtime.IsEnabled = true;
        }

        private void needcooling_unChecked(object sender, RoutedEventArgs e)
        {
            coolingtime.IsEnabled = false;
        }

        private void needalign_Checked(object sender, RoutedEventArgs e)
        {
            alignangel.IsEnabled = true;
        }

        private void needalign_unChecked(object sender, RoutedEventArgs e)
        {
            alignangel.IsEnabled = false;
        }

        private void TextBox_PreviewTextInput(object sender, System.Windows.Input.TextCompositionEventArgs e)
        {
            e.Handled = new Regex("[^0-9.]+").IsMatch(e.Text);
        }


    }
}