| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 | using MECF.Framework.Common.CommonData.Prewet;using MECF.Framework.Common.OperationCenter;using System;using System.Collections.Generic;using System.Drawing;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.Animation;using System.Windows.Media.Imaging;using System.Windows.Media.Media3D;using System.Windows.Navigation;using System.Windows.Shapes;using static System.Net.Mime.MediaTypeNames;namespace PunkHPX8_Themes.UserControls{    /// <summary>    /// PrewetUIControl.xaml 的交互逻辑    /// </summary>    public partial class PrewetUIControl : UserControl    {        public PrewetUIControl()        {            InitializeComponent();        }        public static readonly DependencyProperty ModuleNameProperty = DependencyProperty.Register(           "ModuleName", typeof(string), typeof(PrewetUIControl),           new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// 模块名称        /// </summary>        public string ModuleName        {            get            {                return (string)this.GetValue(ModuleNameProperty);            }            set            {                this.SetValue(ModuleNameProperty, value);            }        }        public static readonly DependencyProperty PumpDataProperty = DependencyProperty.Register(          "PumpData", typeof(PrewetPumpData), typeof(PrewetUIControl), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// PumpData        /// </summary>        public PrewetPumpData PumpData        {            get            {                return (PrewetPumpData)this.GetValue(PumpDataProperty);            }            set            {                this.SetValue(PumpDataProperty, value);            }        }        public static readonly DependencyProperty IsErrorProerty = DependencyProperty.Register(            "IsError",typeof(bool), typeof(PrewetUIControl), new FrameworkPropertyMetadata(false,FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// 工艺腔体是否error        /// </summary>        public bool IsError        {            get            {                return (bool)this.GetValue(IsErrorProerty);            }            set            {                this.SetValue(IsErrorProerty, value);            }        }        public static readonly DependencyProperty IsWaferHolderProerty = DependencyProperty.Register(            "IsWaferHolder", typeof(bool), typeof(PrewetUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// 工艺腔体是否存在WaferHolder        /// </summary>        public bool IsWaferHolder        {            get            {                return (bool)this.GetValue(IsWaferHolderProerty);            }            set            {                this.SetValue(IsWaferHolderProerty, value);            }        }        public static readonly DependencyProperty TankColorLevelProperty = DependencyProperty.Register(         "TankColorLevel", typeof(int), typeof(PrewetUIControl), new FrameworkPropertyMetadata(2, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// TankColorLevel 用于储水罐变色        /// </summary>        public int TankColorLevel        {            get            {                return (int)this.GetValue(TankColorLevelProperty);            }            set            {                this.SetValue(TankColorLevelProperty, value);            }        }        public static readonly DependencyProperty IsPumpValvaOpenProperty = DependencyProperty.Register(        "IsPumpValvaOpen", typeof(bool), typeof(PrewetUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// IsPumpValvaOpen        /// </summary>        public bool IsPumpValvaOpen        {            get            {                return (bool)this.GetValue(IsPumpValvaOpenProperty);            }            set            {                this.SetValue(IsPumpValvaOpenProperty, value);            }        }        public static readonly DependencyProperty YaxleDataProperty = DependencyProperty.Register(        "YaxleData", typeof(double), typeof(PrewetUIControl), new FrameworkPropertyMetadata(170.00, FrameworkPropertyMetadataOptions.AffectsRender));        /// <summary>        /// YaxleData Linmot Y轴位置        /// </summary>        public double YaxleData        {            get            {                return (double)this.GetValue(YaxleDataProperty);            }            set            {                this.SetValue(YaxleDataProperty, value);            }        }        private void OpenPumpValve_Click(object sender, RoutedEventArgs e)        {            InvokeClient.Instance.Service.DoOperation($"Prewet1.PumpValveOn");        }        private void ClosePumpValve_Click(object sender, RoutedEventArgs e)        {            InvokeClient.Instance.Service.DoOperation($"Prewet1.PumpValveOff");        }    }}
 |