using MECF.Framework.Common.CommonData.SRD; using MECF.Framework.Common.Equipment; using MECF.Framework.Common.OperationCenter; using MECF.Framework.Common.RecipeCenter; 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 CyberX8_Themes.UserControls { /// /// SRDSideControl.xaml 的交互逻辑 /// public partial class SRDSideControl : UserControl { public SRDSideControl() { InitializeComponent(); } #region 属性 public static readonly DependencyProperty ModuleNameProperty = DependencyProperty.Register( "ModuleName", typeof(string), typeof(SRDSideControl), new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender)); /// /// 模块名称 /// public string ModuleName { get { return (string)this.GetValue(ModuleNameProperty); } set { this.SetValue(ModuleNameProperty, value); } } public static readonly DependencyProperty CommonDataProperty = DependencyProperty.Register( "CommonData", typeof(SrdCommonData), typeof(SRDSideControl), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender)); /// /// CommonData /// public SrdCommonData CommonData { get { return (SrdCommonData)this.GetValue(CommonDataProperty); } set { this.SetValue(CommonDataProperty, value); } } public static readonly DependencyProperty LoaderDiEnableProperty = DependencyProperty.Register( "LoaderDiEnable", typeof(bool), typeof(SRDSideControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender)); /// /// Loader DI /// public bool LoaderDiEnable { get { return (bool)this.GetValue(LoaderDiEnableProperty); } set { this.SetValue(LoaderDiEnableProperty, value); } } public static readonly DependencyProperty SelectedRecipeNodeProperty = DependencyProperty.Register( "SelectedRecipeNode", typeof(RecipeNode), typeof(SRDSideControl), new FrameworkPropertyMetadata(new RecipeNode(), FrameworkPropertyMetadataOptions.AffectsRender)); /// /// 当前选中recipe节点 /// public RecipeNode SelectedRecipeNode { get { return (RecipeNode)this.GetValue(SelectedRecipeNodeProperty); } set { this.SetValue(SelectedRecipeNodeProperty, value); } } public static readonly DependencyProperty CurrentOperationModeProperty = DependencyProperty.Register( "CurrentOperationMode", typeof(string), typeof(SRDSideControl)); /// /// CurrentOperationMode /// public string CurrentOperationMode { get { return (string)this.GetValue(CurrentOperationModeProperty); } set { this.SetValue(CurrentOperationModeProperty, value); } } public static readonly DependencyProperty WaferIDProperty = DependencyProperty.Register( "WaferID", typeof(string), typeof(SRDSideControl)); /// /// WaferID /// public string WaferID { get { return (string)this.GetValue(WaferIDProperty); } set { this.SetValue(WaferIDProperty, value); } } public static readonly DependencyProperty IsPresenceTestingProperty = DependencyProperty.Register( "IsPresenceTesting", typeof(bool), typeof(SRDSideControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender)); /// /// Loader DI /// public bool IsPresenceTesting { get { return (bool)this.GetValue(IsPresenceTestingProperty); } set { this.SetValue(IsPresenceTestingProperty, value); } } #endregion private void N2On_Click(object sender, RoutedEventArgs e) { InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Common.N2On"); } private void N2Off_Click(object sender, RoutedEventArgs e) { InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Common.N2Off"); } private void ChuckVacuumOff_Click(object sender, RoutedEventArgs e) { InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Common.ChuckVacuumOff"); } private void ChuckVacuumOn_Click(object sender, RoutedEventArgs e) { InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Common.ChuckVacuumOn"); } private void LoaderDIOff_Click(object sender, RoutedEventArgs e) { InvokeClient.Instance.Service.DoOperation($"System.Facilities.LoaderDiDisable"); } private void LoaderDIOn_Click(object sender, RoutedEventArgs e) { InvokeClient.Instance.Service.DoOperation($"System.Facilities.LoaderDiEnable"); } private void WaterOff_Click(object sender, RoutedEventArgs e) { InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Common.WaterOff"); } private void WaterOn_Click(object sender, RoutedEventArgs e) { InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Common.WaterOn"); } private void ChuckATMOn_Click(object sender, RoutedEventArgs e) { InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Common.ChuckATMOn"); } private void ChuckATMOff_Click(object sender, RoutedEventArgs e) { InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Common.ChuckATMOff"); } private void LiftUpOn_Click(object sender, RoutedEventArgs e) { InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Common.LiftUpOn"); } private void LiftUpOff_Click(object sender, RoutedEventArgs e) { InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Common.LiftUpOff"); } } }