using MECF.Framework.Common.CommonData.Metal; using MECF.Framework.Common.CommonData.Prewet; 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 CyberX8_Themes.UserControls { /// /// MetalSHUIControl.xaml 的交互逻辑 /// public partial class MetalSHUIControl : UserControl { public MetalSHUIControl() { InitializeComponent(); } public static readonly DependencyProperty ModuleNameProperty = DependencyProperty.Register( "ModuleName", typeof(string), typeof(MetalSHUIControl), new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender)); /// /// 模块名称 /// public string ModuleName { get { return (string)this.GetValue(ModuleNameProperty); } set { this.SetValue(ModuleNameProperty, value); } } public static readonly DependencyProperty MetalDataProperty = DependencyProperty.Register( "MetalData", typeof(StandardHotMetalDeviceData), typeof(MetalSHUIControl), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender)); /// /// MetalDeviceData /// public StandardHotMetalDeviceData MetalData { get { return (StandardHotMetalDeviceData)this.GetValue(MetalDataProperty); } set { this.SetValue(MetalDataProperty, value); } } public static readonly DependencyProperty IsErrorProerty = DependencyProperty.Register( "IsError", typeof(bool), typeof(MetalSHUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender)); /// /// 工艺腔体是否error /// public bool IsError { get { return (bool)this.GetValue(IsErrorProerty); } set { this.SetValue(IsErrorProerty, value); } } public static readonly DependencyProperty TankColorLevelProperty = DependencyProperty.Register( "TankColorLevel", typeof(int), typeof(MetalSHUIControl), new FrameworkPropertyMetadata(2, FrameworkPropertyMetadataOptions.AffectsRender)); /// /// TankColorLevel 用于储水罐变色 /// public int TankColorLevel { get { return (int)this.GetValue(TankColorLevelProperty); } set { this.SetValue(TankColorLevelProperty, value); } } public static readonly DependencyProperty IsClampValveOpenProperty = DependencyProperty.Register( "IsClampValveOpen", typeof(bool), typeof(MetalSHUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender)); /// /// ClampValve状态 /// public bool IsClampValveOpen { get { return (bool)this.GetValue(IsClampValveOpenProperty); } set { this.SetValue(IsClampValveOpenProperty, value); } } public static readonly DependencyProperty IsCellCirculationValveOnProperty = DependencyProperty.Register( "IsCellCirculationValveOn", typeof(bool), typeof(MetalSHUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender)); /// /// CellCirculationValve状态(true:cell flow,false:cell bypass) /// public bool IsCellCirculationValveOn { get { return (bool)this.GetValue(IsCellCirculationValveOnProperty); } set { this.SetValue(IsCellCirculationValveOnProperty, value); } } public static readonly DependencyProperty IsCellPumpOnProperty = DependencyProperty.Register( "IsCellPumpOn", typeof(bool), typeof(MetalSHUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender)); /// /// CellPump状态 /// public bool IsCellPumpOn { get { return (bool)this.GetValue(IsCellPumpOnProperty); } set { this.SetValue(IsCellPumpOnProperty, value); } } public static readonly DependencyProperty YaxleDataProperty = DependencyProperty.Register( "YaxleData", typeof(double), typeof(MetalSHUIControl), new FrameworkPropertyMetadata(170.00, FrameworkPropertyMetadataOptions.AffectsRender)); /// /// YaxleData Linmot Y轴位置 /// public double YaxleData { get { return (double)this.GetValue(YaxleDataProperty); } set { this.SetValue(YaxleDataProperty, value); } } public static readonly DependencyProperty CellFlowProperty = DependencyProperty.Register( "CellFlow", typeof(double), typeof(MetalSHUIControl), new FrameworkPropertyMetadata((double)0, FrameworkPropertyMetadataOptions.AffectsRender)); /// /// Cell Flow /// public double CellFlow { get { return (double)this.GetValue(CellFlowProperty); } set { this.SetValue(CellFlowProperty, value); } } public static readonly DependencyProperty IsWaferHolderProerty = DependencyProperty.Register( "IsWaferHolder", typeof(bool), typeof(MetalSHUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender)); /// /// 工艺腔体是否存在WaferHolder /// public bool IsWaferHolder { get { return (bool)this.GetValue(IsWaferHolderProerty); } set { this.SetValue(IsWaferHolderProerty, value); } } /// /// Clamp Valve /// /// /// private void OpenClampValve_Click(object sender, RoutedEventArgs e) { InvokeClient.Instance.Service.DoOperation($"{ModuleName}.ClampOn"); } private void CloseClampValve_Click(object sender, RoutedEventArgs e) { InvokeClient.Instance.Service.DoOperation($"{ModuleName}.ClampOff"); } /// /// Cell Circulation Valve(三向阀) /// /// /// /// 打开Cell Flow(关闭Cell Bypass) private void OpenCellFlow_Click(object sender, RoutedEventArgs e) { InvokeClient.Instance.Service.DoOperation($"{ModuleName}.CellSwitchToFlow"); } /// /// 打开CellBypass(关闭Cell Flow) /// /// /// private void OpenCellBypass_Click(object sender, RoutedEventArgs e) { InvokeClient.Instance.Service.DoOperation($"{ModuleName}.CellSwitchToBypass"); } } }