| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271 | using Aitex.Core.Common;using MECF.Framework.Common.OperationCenter;using System;using System.Collections.Generic;using System.Linq;using System.Reflection;using System.Text;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;namespace PunkHPX8_Themes.UserControls{    /// <summary>    /// PlatingCellStatusControl.xaml 的交互逻辑    /// </summary>    public partial class PlatingCellStatusControl : UserControl    {        public PlatingCellStatusControl()        {            InitializeComponent();        }        public static readonly DependencyProperty ModuleNameProperty = DependencyProperty.Register(         "ModuleName", typeof(string), typeof(PlatingCellStatusControl), new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// 模块名称        /// </summary>        public string ModuleName        {            get            {                return (string)this.GetValue(ModuleNameProperty);            }            set            {                this.SetValue(ModuleNameProperty, value);            }        }        public static readonly DependencyProperty ChemistryProperty = DependencyProperty.Register(           "Chemistry", typeof(string), typeof(PlatingCellStatusControl), new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// Chemistry        /// </summary>        public string Chemistry        {            get            {                return (string)this.GetValue(ChemistryProperty);            }            set            {                this.SetValue(ChemistryProperty, value);            }        }        public static readonly DependencyProperty VerticalStationProperty = DependencyProperty.Register(            "VerticalStation", typeof(string), typeof(PlatingCellStatusControl), new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// VerticalStation        /// </summary>        public string VerticalStation        {            get            {                return (string)this.GetValue(VerticalStationProperty);            }            set            {                this.SetValue(VerticalStationProperty, value);            }        }        public static readonly DependencyProperty WaferSizeListProperty = DependencyProperty.Register(            "WaferSizeList", typeof(List<int>), typeof(PlatingCellStatusControl), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        ///WaferSizeList        /// </summary>        public List<int> WaferSizeList        {            get            {                return (List<int>)this.GetValue(WaferSizeListProperty);            }            set            {                this.SetValue(WaferSizeListProperty, value);            }        }        public static readonly DependencyProperty SelectedWaferSizeProperty = DependencyProperty.Register(         "SelectedWaferSize", typeof(int), typeof(PlatingCellStatusControl), new FrameworkPropertyMetadata(150, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        ///SelectedWaferSize        /// </summary>        public int SelectedWaferSize        {            get            {                return (int)this.GetValue(SelectedWaferSizeProperty);            }            set            {                this.SetValue(SelectedWaferSizeProperty, value);            }        }        public static readonly DependencyProperty ClamshellSensorProperty = DependencyProperty.Register(            "ClamshellSensor", typeof(double), typeof(PlatingCellStatusControl), new FrameworkPropertyMetadata(0.0, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// ClamshellSensor        /// </summary>        public double ClamshellSensor        {            get            {                return (double)this.GetValue(ClamshellSensorProperty);            }            set            {                this.SetValue(ClamshellSensorProperty, value);            }        }        public static readonly DependencyProperty IsClamshellOpenProperty = DependencyProperty.Register(           "IsClamshellOpen", typeof(bool), typeof(PlatingCellStatusControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// IsClamshellOpen        /// </summary>        public bool IsClamshellOpen        {            get            {                return (bool)this.GetValue(IsClamshellOpenProperty);            }            set            {                this.SetValue(IsClamshellOpenProperty, value);            }        }        public static readonly DependencyProperty IsClamshellCloseProperty = DependencyProperty.Register(           "IsClamshellClose", typeof(bool), typeof(PlatingCellStatusControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// IsClamshellClose        /// </summary>        public bool IsClamshellClose        {            get            {                return (bool)this.GetValue(IsClamshellCloseProperty);            }            set            {                this.SetValue(IsClamshellCloseProperty, value);            }        }        public static readonly DependencyProperty IsAngleTiltProperty = DependencyProperty.Register(          "IsAngleTilt", typeof(bool), typeof(PlatingCellStatusControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// IsAngleTilt        /// </summary>        public bool IsAngleTilt        {            get            {                return (bool)this.GetValue(IsAngleTiltProperty);            }            set            {                this.SetValue(IsAngleTiltProperty, value);            }        }        public static readonly DependencyProperty IsAngleVerticalProperty = DependencyProperty.Register(         "IsAngleVertical", typeof(bool), typeof(PlatingCellStatusControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// IsAngleVertical        /// </summary>        public bool IsAngleVertical        {            get            {                return (bool)this.GetValue(IsAngleVerticalProperty);            }            set            {                this.SetValue(IsAngleVerticalProperty, value);            }        }        public static readonly DependencyProperty InputRotationSpeedProperty = DependencyProperty.Register(           "InputRotationSpeed", typeof(int), typeof(PlatingCellStatusControl), new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// InputRotationSpeed        /// </summary>        public int InputRotationSpeed        {            get            {                return (int)this.GetValue(InputRotationSpeedProperty);            }            set            {                this.SetValue(InputRotationSpeedProperty, value);            }        }        public static readonly DependencyProperty InputRotationTimeProperty = DependencyProperty.Register(           "InputRotationTime", typeof(int), typeof(PlatingCellStatusControl), new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// InputRotationTime        /// </summary>        public int InputRotationTime        {            get            {                return (int)this.GetValue(InputRotationTimeProperty);            }            set            {                this.SetValue(InputRotationTimeProperty, value);            }        }        private void ClamshellOpen_Click(object sender, RoutedEventArgs e)        {            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.ClamShellOpen");        }        private void ClamshellClose_Click(object sender, RoutedEventArgs e)        {            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.ClamShellClose");        }        private void AngleTilt_Click(object sender, RoutedEventArgs e)        {            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.HeadtTilt");        }        private void AngleVertical_Click(object sender, RoutedEventArgs e)        {            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.HeadVertical");        }        private void RotationStart_Click(object sender, RoutedEventArgs e)        {            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StartRotation", InputRotationSpeed, InputRotationTime);        }        private void RotationStop_Click(object sender, RoutedEventArgs e)        {            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.StopRotation");        }        private void WaferSize_SelectionChanged(object sender, SelectionChangedEventArgs e)        {            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.SetPlatingCellWaferSize", cbox.SelectedItem.ToString());        }    }}
 |