| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 | using MECF.Framework.Common.OperationCenter;using System;using System.Collections.Generic;using System.Linq;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>    /// VPWCellStatusControl.xaml 的交互逻辑    /// </summary>    public partial class VPWCellStatusControl : UserControl    {        public VPWCellStatusControl()        {            InitializeComponent();        }        public static readonly DependencyProperty ModuleNameProperty = DependencyProperty.Register(         "ModuleName", typeof(string), typeof(VPWCellStatusControl), new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// 模块名称        /// </summary>        public string ModuleName        {            get            {                return (string)this.GetValue(ModuleNameProperty);            }            set            {                this.SetValue(ModuleNameProperty, value);            }        }        public static readonly DependencyProperty MachineStateProperty = DependencyProperty.Register(            "MachineState", typeof(string), typeof(VPWCellStatusControl), new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// MachineState        /// </summary>        public string MachineState        {            get            {                return (string)this.GetValue(MachineStateProperty);            }            set            {                this.SetValue(MachineStateProperty, value);            }        }        public static readonly DependencyProperty WaterPressureProperty = DependencyProperty.Register(            "WaterPressure", typeof(double), typeof(VPWCellStatusControl), new FrameworkPropertyMetadata(0.0, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// WaterPressure        /// </summary>        public double WaterPressure        {            get            {                return (double)this.GetValue(WaterPressureProperty);            }            set            {                this.SetValue(WaterPressureProperty, value);            }        }        public static readonly DependencyProperty PressureTargetProperty = DependencyProperty.Register(            "PressureTarget", typeof(double), typeof(VPWCellStatusControl), new FrameworkPropertyMetadata(0.0, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// PressureTarget        /// </summary>        public double PressureTarget        {            get            {                return (double)this.GetValue(PressureTargetProperty);            }            set            {                this.SetValue(PressureTargetProperty, value);            }        }        public static readonly DependencyProperty ChamberOpenProperty = DependencyProperty.Register(           "ChamberOpen", typeof(bool), typeof(VPWCellStatusControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// ChamberOpen        /// </summary>        public bool ChamberOpen        {            get            {                return (bool)this.GetValue(ChamberOpenProperty);            }            set            {                this.SetValue(ChamberOpenProperty, value);            }        }        public static readonly DependencyProperty ChamberCloseProperty = DependencyProperty.Register(    "ChamberClose", typeof(bool), typeof(VPWCellStatusControl), new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// ChamberClose        /// </summary>        public bool ChamberClose        {            get            {                return (bool)this.GetValue(ChamberCloseProperty);            }            set            {                this.SetValue(ChamberCloseProperty, value);            }        }        public static readonly DependencyProperty InputRotationSpeedProperty = DependencyProperty.Register(            "InputRotationSpeed", typeof(int), typeof(VPWCellStatusControl), 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(VPWCellStatusControl), new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// InputRotationTime        /// </summary>        public int InputRotationTime        {            get            {                return (int)this.GetValue(InputRotationTimeProperty);            }            set            {                this.SetValue(InputRotationTimeProperty, value);            }        }        public static readonly DependencyProperty WaferSizeProperty = DependencyProperty.Register(    "WaferSize", typeof(int), typeof(VPWCellStatusControl), new FrameworkPropertyMetadata(200, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// WaferSize        /// </summary>        public int WaferSize        {            get            {                return (int)this.GetValue(WaferSizeProperty);            }            set            {                this.SetValue(WaferSizeProperty, value);            }        }        private void ChamberOpen_Click(object sender, RoutedEventArgs e)        {            InvokeClient.Instance.Service.DoOperation($"VPWMain1.ChamberDown");        }        private void ChamberClose_Click(object sender, RoutedEventArgs e)        {            InvokeClient.Instance.Service.DoOperation($"VPWMain1.ChamberUp");        }        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");        }    }}
 |