using OpenSEMI.ClientBase; 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; using Venus_Core; namespace Venus_Themes.UserControls { /// /// VenusSETM.xaml 的交互逻辑 /// public partial class VenusSETM : UserControl { public VenusSETM() { InitializeComponent(); } public static readonly DependencyProperty VCEIsInstalledProperty = DependencyProperty.Register( "VCEIsInstalled", typeof(bool), typeof(VenusSETM)); public bool VCEIsInstalled { get => (bool)GetValue(VCEIsInstalledProperty); set =>SetValue(VCEIsInstalledProperty, value); } public static readonly DependencyProperty PMAIsInstalledProperty = DependencyProperty.Register( "PMAIsInstalled", typeof(bool), typeof(VenusSETM)); public bool PMAIsInstalled { get => (bool)GetValue(PMAIsInstalledProperty); set => SetValue(PMAIsInstalledProperty, value); } public static readonly DependencyProperty PMBIsInstalledProperty = DependencyProperty.Register( "PMBIsInstalled", typeof(bool), typeof(VenusSETM)); public bool PMBIsInstalled { get => (bool)GetValue(PMBIsInstalledProperty); set => SetValue(PMBIsInstalledProperty, value); } public static readonly DependencyProperty PMCIsInstalledProperty = DependencyProperty.Register( "PMCIsInstalled", typeof(bool), typeof(VenusSETM), new PropertyMetadata(true, OnDataPropertyChanged)); public static readonly DependencyProperty PAWaferProperty = DependencyProperty.Register( "PAWafer", typeof(WaferInfo), typeof(VenusSETM)); public WaferInfo PAWafer { get => (WaferInfo)GetValue(PAWaferProperty); set => SetValue(PAWaferProperty, value); } private static void OnDataPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { if (d is VenusSETM setm) { if ((bool)e.NewValue) { setm.VPAligner.SetValue(Canvas.LeftProperty, 84.0); setm.VPAligner.SetValue(Canvas.TopProperty, 240.0); } else { setm.VPAligner.SetValue(Canvas.LeftProperty, 222.0); setm.VPAligner.SetValue(Canvas.TopProperty, 75.0); } } } public bool PMCIsInstalled { get => (bool)GetValue(PMCIsInstalledProperty); set { SetValue(PMCIsInstalledProperty, value); } } public static readonly DependencyProperty VPAIsShowProperty = DependencyProperty.Register( "VPAIsShow", typeof(bool), typeof(VenusSETM)); public bool VPAIsShow { get => (bool)GetValue(VPAIsShowProperty); set => SetValue(VPAIsShowProperty, value); } public static readonly DependencyProperty PMADoorIsOpenProperty = DependencyProperty.Register( "PMADoorIsOpen", typeof(bool), typeof(VenusSETM)); public bool PMADoorIsOpen { get => (bool)GetValue(PMADoorIsOpenProperty); set => SetValue(PMADoorIsOpenProperty, value); } public static readonly DependencyProperty PMBDoorIsOpenProperty = DependencyProperty.Register( "PMBDoorIsOpen", typeof(bool), typeof(VenusSETM)); public bool PMBDoorIsOpen { get => (bool)GetValue(PMBDoorIsOpenProperty); set => SetValue(PMBDoorIsOpenProperty, value); } public static readonly DependencyProperty PMCDoorIsOpenProperty = DependencyProperty.Register( "PMCDoorIsOpen", typeof(bool), typeof(VenusSETM)); public bool PMCDoorIsOpen { get => (bool)GetValue(PMCDoorIsOpenProperty); set => SetValue(PMCDoorIsOpenProperty, value); } public static readonly DependencyProperty VCEDoorIsOpenProperty = DependencyProperty.Register( "VCEDoorIsOpen", typeof(bool), typeof(VenusSETM)); public bool VCEDoorIsOpen { get => (bool)GetValue(VCEDoorIsOpenProperty); set => SetValue(VCEDoorIsOpenProperty, value); } } public class Door : DependencyObject { public static bool GetIsOpen(DependencyObject obj) => (bool)obj.GetValue(IsOpenProperty); public static void SetIsOpen(DependencyObject obj, bool value) => obj.SetValue(IsOpenProperty, value); public static readonly DependencyProperty IsOpenProperty = DependencyProperty.Register( "IsOpen", typeof(bool), typeof(Door)); } }