123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482 |
- using MECF.Framework.Common.OperationCenter;
- using CyberX8_Core;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Text.RegularExpressions;
- 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
- {
- /// <summary>
- /// LoaderStationSideControl.xaml 的交互逻辑
- /// </summary>
- public partial class LoaderStationSideControl : UserControl
- {
- #region 属性
- public static readonly DependencyProperty ModuleNameProperty = DependencyProperty.Register(
- "ModuleName", typeof(string), typeof(LoaderStationSideControl),
- new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
- /// <summary>
- /// 模块名称
- /// </summary>
- public string ModuleName
- {
- get
- {
- return (string)this.GetValue(ModuleNameProperty);
- }
- set
- {
- this.SetValue(ModuleNameProperty, value);
- }
- }
- public static readonly DependencyProperty ModuleTitleProperty = DependencyProperty.Register(
- "ModuleTitle", typeof(string), typeof(LoaderStationSideControl),
- new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
- /// <summary>
- /// 标题
- /// </summary>
- public string ModuleTitle
- {
- get
- {
- return (string)this.GetValue(ModuleTitleProperty);
- }
- set
- {
- this.SetValue(ModuleTitleProperty, value);
- }
- }
- public static readonly DependencyProperty CommandProperty = DependencyProperty.Register(
- "OperationCommand", typeof(ICommand), typeof(LoaderStationSideControl),
- new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
- public ICommand OperationCommand
- {
- get
- {
- return (ICommand)this.GetValue(CommandProperty);
- }
- set
- {
- this.SetValue(CommandProperty, value);
- }
- }
- public static readonly DependencyProperty WaferPresentProperty = DependencyProperty.Register(
- "WaferPresent", typeof(bool), typeof(LoaderStationSideControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
- /// <summary>
- /// WaferPresent
- /// </summary>
- public bool WaferPresent
- {
- get
- {
- return (bool)this.GetValue(WaferPresentProperty);
- }
- set
- {
- this.SetValue(WaferPresentProperty, value);
- }
- }
- public static readonly DependencyProperty DoorUnlockedProperty = DependencyProperty.Register(
- "DoorUnlocked", typeof(bool), typeof(LoaderStationSideControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
- /// <summary>
- /// DoorUnlocked
- /// </summary>
- public bool DoorUnlocked
- {
- get
- {
- return (bool)this.GetValue(DoorUnlockedProperty);
- }
- set
- {
- this.SetValue(DoorUnlockedProperty, value);
- }
- }
- public static readonly DependencyProperty CRSVacuumProperty = DependencyProperty.Register(
- "CRSVacuum", typeof(bool), typeof(LoaderStationSideControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
- /// <summary>
- /// CRSVacuum
- /// </summary>
- public bool CRSVacuum
- {
- get
- {
- return (bool)this.GetValue(CRSVacuumProperty);
- }
- set
- {
- this.SetValue(CRSVacuumProperty, value);
- }
- }
- public static readonly DependencyProperty WhBladderedProperty = DependencyProperty.Register(
- "WhBladdered", typeof(bool), typeof(LoaderStationSideControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
- /// <summary>
- /// WhBladdered
- /// </summary>
- public bool WhBladdered
- {
- get
- {
- return (bool)this.GetValue(WhBladderedProperty);
- }
- set
- {
- this.SetValue(WhBladderedProperty, value);
- }
- }
- public static readonly DependencyProperty TransBladderedProperty = DependencyProperty.Register(
- "TransBladdered", typeof(bool), typeof(LoaderStationSideControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
- /// <summary>
- /// TransBladdered
- /// </summary>
- public bool TransBladdered
- {
- get
- {
- return (bool)this.GetValue(TransBladderedProperty);
- }
- set
- {
- this.SetValue(TransBladderedProperty, value);
- }
- }
- public static readonly DependencyProperty TransHighPresedProperty = DependencyProperty.Register(
- "TransHighPresed", typeof(bool), typeof(LoaderStationSideControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
- /// <summary>
- /// TransHighPresed
- /// </summary>
- public bool TransHighPresed
- {
- get
- {
- return (bool)this.GetValue(TransHighPresedProperty);
- }
- set
- {
- this.SetValue(TransHighPresedProperty, value);
- }
- }
- public static readonly DependencyProperty BernoulliBladderedProperty = DependencyProperty.Register(
- "BernoulliBladdered", typeof(bool), typeof(LoaderStationSideControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
- /// <summary>
- /// BernoulliBladdered
- /// </summary>
- public bool BernoulliBladdered
- {
- get
- {
- return (bool)this.GetValue(BernoulliBladderedProperty);
- }
- set
- {
- this.SetValue(BernoulliBladderedProperty, value);
- }
- }
- public static readonly DependencyProperty BernoulliN2Property = DependencyProperty.Register(
- "BernoulliN2", typeof(bool), typeof(LoaderStationSideControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
- /// <summary>
- /// BernoulliN2
- /// </summary>
- public bool BernoulliN2
- {
- get
- {
- return (bool)this.GetValue(BernoulliN2Property);
- }
- set
- {
- this.SetValue(BernoulliN2Property, value);
- }
- }
- public static readonly DependencyProperty DoorUpperLockedProperty = DependencyProperty.Register(
- "DoorUpperLocked", typeof(bool), typeof(LoaderStationSideControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
- /// <summary>
- /// DoorUpperLocked
- /// </summary>
- public bool DoorUpperLocked
- {
- get
- {
- return (bool)this.GetValue(DoorUpperLockedProperty);
- }
- set
- {
- this.SetValue(DoorUpperLockedProperty, value);
- }
- }
- public static readonly DependencyProperty DoorUpperUnlockedProperty = DependencyProperty.Register(
- "DoorUpperUnlocked", typeof(bool), typeof(LoaderStationSideControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
- /// <summary>
- /// DoorUpperUnlocked
- /// </summary>
- public bool DoorUpperUnlocked
- {
- get
- {
- return (bool)this.GetValue(DoorUpperUnlockedProperty);
- }
- set
- {
- this.SetValue(DoorUpperUnlockedProperty, value);
- }
- }
- public static readonly DependencyProperty DoorLowerLockedProperty = DependencyProperty.Register(
- "DoorLowerLocked", typeof(bool), typeof(LoaderStationSideControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
- /// <summary>
- /// DoorLowerLocked
- /// </summary>
- public bool DoorLowerLocked
- {
- get
- {
- return (bool)this.GetValue(DoorLowerLockedProperty);
- }
- set
- {
- this.SetValue(DoorLowerLockedProperty, value);
- }
- }
- public static readonly DependencyProperty DoorLowerUnlockedProperty = DependencyProperty.Register(
- "DoorLowerUnlocked", typeof(bool), typeof(LoaderStationSideControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
- /// <summary>
- /// DoorLowerUnlocked
- /// </summary>
- public bool DoorLowerUnlocked
- {
- get
- {
- return (bool)this.GetValue(DoorLowerUnlockedProperty);
- }
- set
- {
- this.SetValue(DoorLowerUnlockedProperty, value);
- }
- }
- public static readonly DependencyProperty CRSVacuumValueProperty = DependencyProperty.Register(
- "CRSVacuumValue", typeof(double), typeof(LoaderStationSideControl), new FrameworkPropertyMetadata(0.00, FrameworkPropertyMetadataOptions.AffectsRender));
- /// <summary>
- /// CRSVacuumValue
- /// </summary>
- public double CRSVacuumValue
- {
- get
- {
- return (double)this.GetValue(CRSVacuumValueProperty);
- }
- set
- {
- this.SetValue(CRSVacuumValueProperty, value);
- }
- }
- public static readonly DependencyProperty WhPressureValueProperty = DependencyProperty.Register(
- "WhPressureValue", typeof(double), typeof(LoaderStationSideControl), new FrameworkPropertyMetadata(0.00, FrameworkPropertyMetadataOptions.AffectsRender));
- /// <summary>
- /// WhPressureValue
- /// </summary>
- public double WhPressureValue
- {
- get
- {
- return (double)this.GetValue(WhPressureValueProperty);
- }
- set
- {
- this.SetValue(WhPressureValueProperty, value);
- }
- }
- public static readonly DependencyProperty TransRetractedProperty = DependencyProperty.Register(
- "TransRetracted", typeof(bool), typeof(LoaderStationSideControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
- /// <summary>
- /// Retracted
- /// </summary>
- public bool TransRetracted
- {
- get
- {
- return (bool)this.GetValue(TransRetractedProperty);
- }
- set
- {
- this.SetValue(TransRetractedProperty, value);
- }
- }
- public static readonly DependencyProperty BernoulliExtendProperty = DependencyProperty.Register(
- "BernoulliExtend", typeof(bool), typeof(LoaderStationSideControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
- /// <summary>
- /// BernoulliExtend
- /// </summary>
- public bool BernoulliExtend
- {
- get
- {
- return (bool)this.GetValue(BernoulliExtendProperty);
- }
- set
- {
- this.SetValue(BernoulliExtendProperty, value);
- }
- }
- /// <summary>
- /// BernoulliRetract
- /// </summary>
- public bool BernoulliRetract
- {
- get
- {
- return !(bool)this.GetValue(BernoulliExtendProperty);
- }
- }
- public static readonly DependencyProperty TranslationPresValueProperty = DependencyProperty.Register(
- "TranslationPresValue", typeof(double), typeof(LoaderStationSideControl), new FrameworkPropertyMetadata(0.00, FrameworkPropertyMetadataOptions.AffectsRender));
- /// <summary>
- /// TranslationPresValue
- /// </summary>
- public double TranslationPresValue
- {
- get
- {
- return (double)this.GetValue(TranslationPresValueProperty);
- }
- set
- {
- this.SetValue(TranslationPresValueProperty, value);
- }
- }
- public static readonly DependencyProperty BernoulliBladderPressureProperty = DependencyProperty.Register(
- "BernoulliBladderPressure", typeof(double), typeof(LoaderStationSideControl), new FrameworkPropertyMetadata(0.00, FrameworkPropertyMetadataOptions.AffectsRender));
- /// <summary>
- /// BernoulliBladderPressure
- /// </summary>
- public double BernoulliBladderPressure
- {
- get
- {
- return (double)this.GetValue(BernoulliBladderPressureProperty);
- }
- set
- {
- this.SetValue(BernoulliBladderPressureProperty, value);
- }
- }
- public static readonly DependencyProperty BernoulliPressureProperty = DependencyProperty.Register(
- "BernoulliPressure", typeof(double), typeof(LoaderStationSideControl), new FrameworkPropertyMetadata(0.00, FrameworkPropertyMetadataOptions.AffectsRender));
- /// <summary>
- /// BernoulliPressure
- /// </summary>
- public double BernoulliPressure
- {
- get
- {
- return (double)this.GetValue(BernoulliPressureProperty);
- }
- set
- {
- this.SetValue(BernoulliPressureProperty, value);
- }
- }
- #endregion
- /// <summary>
- /// 构造函数
- /// </summary>
- public LoaderStationSideControl()
- {
- InitializeComponent();
- }
- private void SavedPos_Click(object sender, RoutedEventArgs e)
- {
- if (OperationCommand != null)
- {
- //OperationCommand.Execute(new object[] { ModuleName, "Position", new object[] { "TargetPosition", SavedPosition } });
- }
- }
- #region 按钮
- private void DoorLockOn_Click(object sender, RoutedEventArgs e)
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DoorLockOn");
- }
- private void DoorLockOff_Click(object sender, RoutedEventArgs e)
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DoorLockOff");
- }
- private void VacuumOn_Click(object sender, RoutedEventArgs e)
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName}.VacuumOn");
- }
- private void VacuumOff_Click(object sender, RoutedEventArgs e)
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName}.VacuumOff");
- }
- private void WhBladderOn_Click(object sender, RoutedEventArgs e)
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName}.WhBladderOn");
- }
- private void WhBladderOff_Click(object sender, RoutedEventArgs e)
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName}.WhBladderOff");
- }
- private void TranlateBladderOn_Click(object sender, RoutedEventArgs e)
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName}.TransBladderOn");
- }
- private void TranlateBladderOff_Click(object sender, RoutedEventArgs e)
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName}.TransBladderOff");
- }
- private void TranlateHighPresOn_Click(object sender, RoutedEventArgs e)
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName}.TransHighOn");
- }
- private void TranlateHighPresOff_Click(object sender, RoutedEventArgs e)
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName}.TransHighOff");
- }
- private void BernoulliBladderOn_Click(object sender, RoutedEventArgs e)
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName}.BernoulliBladderOn");
- }
- private void BernoulliBladderOff_Click(object sender, RoutedEventArgs e)
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName}.BernoulliBladderOff");
- }
- private void BernoulliN2On_Click(object sender, RoutedEventArgs e)
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName}.BernoulliN2On");
- }
- private void BernoulliN2Off_Click(object sender, RoutedEventArgs e)
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName}.BernoulliN2Off");
- }
- #endregion
- }
- }
|