|
@@ -1,299 +1,355 @@
|
|
|
-using Aitex.Core.UI.MVVM;
|
|
|
-using CyberX8_Core;
|
|
|
-using CyberX8_MainPages.Roles;
|
|
|
-using CyberX8_MainPages.Views;
|
|
|
-using MECF.Framework.Common.ControlDataContext;
|
|
|
-using MECF.Framework.Common.DataCenter;
|
|
|
-using MECF.Framework.Common.Equipment;
|
|
|
-using MECF.Framework.Common.OperationCenter;
|
|
|
-using MECF.Framework.Common.Utilities;
|
|
|
-using OpenSEMI.ClientBase.Command;
|
|
|
-using Prism.Mvvm;
|
|
|
-using System;
|
|
|
-using System.Collections.Generic;
|
|
|
-using System.Collections.ObjectModel;
|
|
|
-using System.Linq;
|
|
|
-using System.Reflection;
|
|
|
-using System.Text;
|
|
|
-using System.Threading.Tasks;
|
|
|
-using System.Windows.Forms;
|
|
|
-using System.Windows.Input;
|
|
|
-using System.Windows.Threading;
|
|
|
-
|
|
|
-namespace CyberX8_MainPages.ViewModels
|
|
|
-{
|
|
|
- public class RobotCycleViewModel : BindableBase
|
|
|
- {
|
|
|
-
|
|
|
- #region 内部变量
|
|
|
- /// <summary>
|
|
|
- /// 选择的LP
|
|
|
- /// </summary>
|
|
|
- private ModuleName _selectedLPName = ModuleName.LP1;
|
|
|
- private ModuleName _selectedAlignerName = ModuleName.Aligner1;
|
|
|
- /// <summary>
|
|
|
- /// 选择的Dummy
|
|
|
- /// </summary>
|
|
|
- private ModuleName _selectedDummyName = ModuleName.Dummy1;
|
|
|
- private ModuleName _selectedSrdName = ModuleName.SRD1;
|
|
|
- private ModuleName _selectedPufName = ModuleName.PUF1;
|
|
|
- /// <summary>
|
|
|
- /// 输入的Cycle次数
|
|
|
- /// </summary>
|
|
|
- private int _inPutCycleTimes = 1;
|
|
|
- /// <summary>
|
|
|
- /// Align调整角度度数
|
|
|
- /// </summary>
|
|
|
- private int _inPutAlignDegree = 0;
|
|
|
- /// <summary>
|
|
|
- /// 当前正在执行第几次Cycle
|
|
|
- /// </summary>
|
|
|
- private int _currentCycle;
|
|
|
- /// <summary>
|
|
|
- /// 是否选中dummy
|
|
|
- /// </summary>
|
|
|
- private bool _isDummySelected = false;
|
|
|
- /// <summary>
|
|
|
- /// 是否选中srd
|
|
|
- /// </summary>
|
|
|
+using Aitex.Core.UI.MVVM;
|
|
|
+using CyberX8_Core;
|
|
|
+using CyberX8_MainPages.Roles;
|
|
|
+using CyberX8_MainPages.Views;
|
|
|
+using MECF.Framework.Common.ControlDataContext;
|
|
|
+using MECF.Framework.Common.DataCenter;
|
|
|
+using MECF.Framework.Common.Equipment;
|
|
|
+using MECF.Framework.Common.OperationCenter;
|
|
|
+using MECF.Framework.Common.Utilities;
|
|
|
+using OpenSEMI.ClientBase.Command;
|
|
|
+using Prism.Mvvm;
|
|
|
+using System;
|
|
|
+using System.Collections.Generic;
|
|
|
+using System.Collections.ObjectModel;
|
|
|
+using System.Linq;
|
|
|
+using System.Reflection;
|
|
|
+using System.Text;
|
|
|
+using System.Threading.Tasks;
|
|
|
+using System.Windows.Forms;
|
|
|
+using System.Windows.Input;
|
|
|
+using System.Windows.Threading;
|
|
|
+
|
|
|
+namespace CyberX8_MainPages.ViewModels
|
|
|
+{
|
|
|
+ public class RobotCycleViewModel : BindableBase
|
|
|
+ {
|
|
|
+
|
|
|
+ #region 内部变量
|
|
|
+ /// <summary>
|
|
|
+ /// 选择的LP
|
|
|
+ /// </summary>
|
|
|
+ private ModuleName _selectedLPName = ModuleName.LP1;
|
|
|
+ private ModuleName _selectedAlignerName = ModuleName.Aligner1;
|
|
|
+ /// <summary>
|
|
|
+ /// 选择的Dummy
|
|
|
+ /// </summary>
|
|
|
+ private ModuleName _selectedDummyName = ModuleName.Dummy1;
|
|
|
+ private ModuleName _selectedSrdName = ModuleName.SRD1;
|
|
|
+ private ModuleName _selectedPufName = ModuleName.PUF1;
|
|
|
+ /// <summary>
|
|
|
+ /// 输入的Cycle次数
|
|
|
+ /// </summary>
|
|
|
+ private int _inPutCycleTimes = 1;
|
|
|
+ /// <summary>
|
|
|
+ /// Align调整角度度数
|
|
|
+ /// </summary>
|
|
|
+ private int _inPutAlignDegree = 0;
|
|
|
+ /// <summary>
|
|
|
+ /// 当前正在执行第几次Cycle
|
|
|
+ /// </summary>
|
|
|
+ private int _currentCycle;
|
|
|
+ /// <summary>
|
|
|
+ /// 是否选中dummy
|
|
|
+ /// </summary>
|
|
|
+ private bool _isDummySelected = false;
|
|
|
+ /// <summary>
|
|
|
+ /// 是否选中srd
|
|
|
+ /// </summary>
|
|
|
private bool _isSrdSelected = false ;
|
|
|
- /// <summary>
|
|
|
- /// 是否选中puf
|
|
|
- /// </summary>
|
|
|
- private bool _isPufSelected = false;
|
|
|
- #region 系统数据
|
|
|
- /// <summary>
|
|
|
- /// 定时器
|
|
|
- /// </summary>
|
|
|
- DispatcherTimer _timer;
|
|
|
- /// <summary>
|
|
|
- /// 查询后台数据集合
|
|
|
- /// </summary>
|
|
|
- private List<string> _rtDataKeys = new List<string>();
|
|
|
- /// <summary>
|
|
|
- /// rt查询key数值字典
|
|
|
- /// </summary>
|
|
|
- private Dictionary<string, object> _rtDataValueDic = new Dictionary<string, object>();
|
|
|
- #endregion
|
|
|
- #endregion
|
|
|
-
|
|
|
- #region 属性
|
|
|
- public ModuleName SelectedLPName
|
|
|
- {
|
|
|
- get { return _selectedLPName; }
|
|
|
- set { SetProperty(ref _selectedLPName, value); }
|
|
|
- }
|
|
|
- public ModuleName SelectedAlignerName
|
|
|
- {
|
|
|
- get { return _selectedAlignerName; }
|
|
|
- set { SetProperty(ref _selectedAlignerName, value); }
|
|
|
- }
|
|
|
- public ModuleName SelectedDummyName
|
|
|
- {
|
|
|
- get { return _selectedDummyName; }
|
|
|
- set { SetProperty(ref _selectedDummyName, value); }
|
|
|
- }
|
|
|
- public ModuleName SelectedSrdName
|
|
|
- {
|
|
|
- get { return _selectedSrdName; }
|
|
|
- set { SetProperty(ref _selectedSrdName, value); }
|
|
|
+ /// <summary>
|
|
|
+ /// 是否选中puf
|
|
|
+ /// </summary>
|
|
|
+ private bool _isPufSelected = false;
|
|
|
+
|
|
|
+ private bool _isSrd1Checked = true;
|
|
|
+ private bool _isSrd2Checked = false;
|
|
|
+ private bool _isDummy1Checked = true;
|
|
|
+ private bool _isDummy2Checked = false;
|
|
|
+ #region 系统数据
|
|
|
+ /// <summary>
|
|
|
+ /// 定时器
|
|
|
+ /// </summary>
|
|
|
+ DispatcherTimer _timer;
|
|
|
+ /// <summary>
|
|
|
+ /// 查询后台数据集合
|
|
|
+ /// </summary>
|
|
|
+ private List<string> _rtDataKeys = new List<string>();
|
|
|
+ /// <summary>
|
|
|
+ /// rt查询key数值字典
|
|
|
+ /// </summary>
|
|
|
+ private Dictionary<string, object> _rtDataValueDic = new Dictionary<string, object>();
|
|
|
+ #endregion
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 属性
|
|
|
+ public ModuleName SelectedLPName
|
|
|
+ {
|
|
|
+ get { return _selectedLPName; }
|
|
|
+ set { SetProperty(ref _selectedLPName, value); }
|
|
|
+ }
|
|
|
+ public ModuleName SelectedAlignerName
|
|
|
+ {
|
|
|
+ get { return _selectedAlignerName; }
|
|
|
+ set { SetProperty(ref _selectedAlignerName, value); }
|
|
|
+ }
|
|
|
+ public ModuleName SelectedDummyName
|
|
|
+ {
|
|
|
+ get { return _selectedDummyName; }
|
|
|
+ set { SetProperty(ref _selectedDummyName, value); }
|
|
|
+ }
|
|
|
+ public ModuleName SelectedSrdName
|
|
|
+ {
|
|
|
+ get { return _selectedSrdName; }
|
|
|
+ set { SetProperty(ref _selectedSrdName, value); }
|
|
|
+ }
|
|
|
+ public ModuleName SelectedPufName
|
|
|
+ {
|
|
|
+ get { return _selectedPufName; }
|
|
|
+ set { SetProperty(ref _selectedPufName, value); }
|
|
|
}
|
|
|
- public ModuleName SelectedPufName
|
|
|
- {
|
|
|
- get { return _selectedPufName; }
|
|
|
- set { SetProperty(ref _selectedPufName, value); }
|
|
|
- }
|
|
|
- public int InPutCycleTimes
|
|
|
- {
|
|
|
- get { return _inPutCycleTimes; }
|
|
|
- set { SetProperty(ref _inPutCycleTimes, value); }
|
|
|
- }
|
|
|
- public int CurrentCycle
|
|
|
- {
|
|
|
- get { return _currentCycle; }
|
|
|
- set { SetProperty(ref _currentCycle, value); }
|
|
|
- }
|
|
|
- public int InPutAlignDegree
|
|
|
- {
|
|
|
- get { return _inPutAlignDegree; }
|
|
|
- set { SetProperty(ref _inPutAlignDegree, value); }
|
|
|
- }
|
|
|
-
|
|
|
- public bool IsDummySelected
|
|
|
- {
|
|
|
- get { return _isDummySelected; }
|
|
|
- set { SetProperty(ref _isDummySelected, value); }
|
|
|
- }
|
|
|
- public bool IsSrdSelected
|
|
|
- {
|
|
|
- get { return _isSrdSelected; }
|
|
|
- set { SetProperty(ref _isSrdSelected, value); }
|
|
|
+ public int InPutCycleTimes
|
|
|
+ {
|
|
|
+ get { return _inPutCycleTimes; }
|
|
|
+ set { SetProperty(ref _inPutCycleTimes, value); }
|
|
|
+ }
|
|
|
+ public int CurrentCycle
|
|
|
+ {
|
|
|
+ get { return _currentCycle; }
|
|
|
+ set { SetProperty(ref _currentCycle, value); }
|
|
|
}
|
|
|
- public bool IsPufSelected
|
|
|
- {
|
|
|
- get { return _isPufSelected; }
|
|
|
- set { SetProperty(ref _isPufSelected, value); }
|
|
|
- }
|
|
|
- #endregion
|
|
|
-
|
|
|
- #region 命令
|
|
|
-
|
|
|
- public ICommand RobotCycleStartCommand { get; set; }
|
|
|
-
|
|
|
- public ICommand RobotCycleAbortCommand { get; set; }
|
|
|
-
|
|
|
- public ICommand LPChangeCommand { get; set; }
|
|
|
-
|
|
|
- public ICommand AlignerChangeCommand { get; set; }
|
|
|
-
|
|
|
- public ICommand PufChangeCommand { get; set; }
|
|
|
-
|
|
|
- public ICommand DummyChangeCommand { get; set; }
|
|
|
-
|
|
|
- public ICommand SrdChangeCommand { get; set; }
|
|
|
- #endregion
|
|
|
-
|
|
|
- /// <summary>
|
|
|
- /// 构造器
|
|
|
- /// </summary>
|
|
|
- public RobotCycleViewModel()
|
|
|
- {
|
|
|
- RobotCycleStartCommand = new DelegateCommand<object>(RobotCycleStartAction);
|
|
|
- RobotCycleAbortCommand = new DelegateCommand<object>(RobotCycleAbortAction);
|
|
|
- LPChangeCommand = new DelegateCommand<object>(LPChangeAction);
|
|
|
- AlignerChangeCommand = new DelegateCommand<object>(AlignerChangeAction);
|
|
|
- PufChangeCommand = new DelegateCommand<object>(PufChangeAction);
|
|
|
- DummyChangeCommand = new DelegateCommand<object>(DummyChangeAction);
|
|
|
- SrdChangeCommand = new DelegateCommand<object>(SrdChangeAction);
|
|
|
- }
|
|
|
-
|
|
|
- private void RobotCycleStartAction(object param)
|
|
|
- {
|
|
|
- if (!IsDummySelected)
|
|
|
- {
|
|
|
- SelectedDummyName = ModuleName.Unknown;
|
|
|
- }
|
|
|
- if (!IsSrdSelected)
|
|
|
- {
|
|
|
- SelectedSrdName = ModuleName.Unknown;
|
|
|
+ public int InPutAlignDegree
|
|
|
+ {
|
|
|
+ get { return _inPutAlignDegree; }
|
|
|
+ set { SetProperty(ref _inPutAlignDegree, value); }
|
|
|
+ }
|
|
|
+
|
|
|
+ public bool IsDummySelected
|
|
|
+ {
|
|
|
+ get { return _isDummySelected; }
|
|
|
+ set { SetProperty(ref _isDummySelected, value); }
|
|
|
+ }
|
|
|
+ public bool IsSrdSelected
|
|
|
+ {
|
|
|
+ get { return _isSrdSelected; }
|
|
|
+ set { SetProperty(ref _isSrdSelected, value); }
|
|
|
+ }
|
|
|
+ public bool IsPufSelected
|
|
|
+ {
|
|
|
+ get { return _isPufSelected; }
|
|
|
+ set { SetProperty(ref _isPufSelected, value); }
|
|
|
+ }
|
|
|
+
|
|
|
+ public bool IsSrd1Checkd
|
|
|
+ {
|
|
|
+ get { return _isSrd1Checked; }
|
|
|
+ set { SetProperty(ref _isSrd1Checked, value); }
|
|
|
+ }
|
|
|
+ public bool IsSrd2Checkd
|
|
|
+ {
|
|
|
+ get { return _isSrd2Checked; }
|
|
|
+ set { SetProperty(ref _isSrd2Checked, value); }
|
|
|
+ }
|
|
|
+ public bool IsDummy1Checkd
|
|
|
+ {
|
|
|
+ get { return _isDummy1Checked; }
|
|
|
+ set { SetProperty(ref _isDummy1Checked, value); }
|
|
|
+ }
|
|
|
+ public bool IsDummy2Checkd
|
|
|
+ {
|
|
|
+ get { return _isDummy2Checked; }
|
|
|
+ set { SetProperty(ref _isDummy2Checked, value); }
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 命令
|
|
|
+
|
|
|
+ public ICommand RobotCycleStartCommand { get; set; }
|
|
|
+
|
|
|
+ public ICommand RobotCycleAbortCommand { get; set; }
|
|
|
+
|
|
|
+ public ICommand LPChangeCommand { get; set; }
|
|
|
+
|
|
|
+ public ICommand AlignerChangeCommand { get; set; }
|
|
|
+
|
|
|
+ public ICommand PufChangeCommand { get; set; }
|
|
|
+
|
|
|
+ public ICommand DummyChangeCommand { get; set; }
|
|
|
+
|
|
|
+ public ICommand SrdChangeCommand { get; set; }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 构造器
|
|
|
+ /// </summary>
|
|
|
+ public RobotCycleViewModel()
|
|
|
+ {
|
|
|
+ RobotCycleStartCommand = new DelegateCommand<object>(RobotCycleStartAction);
|
|
|
+ RobotCycleAbortCommand = new DelegateCommand<object>(RobotCycleAbortAction);
|
|
|
+ LPChangeCommand = new DelegateCommand<object>(LPChangeAction);
|
|
|
+ AlignerChangeCommand = new DelegateCommand<object>(AlignerChangeAction);
|
|
|
+ //PufChangeCommand = new DelegateCommand<object>(PufChangeAction);
|
|
|
+ //DummyChangeCommand = new DelegateCommand<object>(DummyChangeAction);
|
|
|
+ //SrdChangeCommand = new DelegateCommand<object>(SrdChangeAction);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void RobotCycleStartAction(object param)
|
|
|
+ {
|
|
|
+ if (!IsDummySelected)
|
|
|
+ {
|
|
|
+ SelectedDummyName = ModuleName.Unknown;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (IsDummy1Checkd)
|
|
|
+ {
|
|
|
+ SelectedDummyName = ModuleName.Dummy1;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ SelectedDummyName = ModuleName.Dummy2;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!IsSrdSelected)
|
|
|
+ {
|
|
|
+ SelectedSrdName = ModuleName.Unknown;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (IsSrd1Checkd)
|
|
|
+ {
|
|
|
+ SelectedSrdName = ModuleName.SRD1;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ SelectedSrdName = ModuleName.SRD2;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!IsPufSelected)
|
|
|
+ {
|
|
|
+ SelectedPufName = ModuleName.Unknown;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ SelectedPufName = ModuleName.PUF1;
|
|
|
}
|
|
|
- if (!IsPufSelected)
|
|
|
- {
|
|
|
- SelectedPufName = ModuleName.Unknown;
|
|
|
- }
|
|
|
- if (!IsDummySelected && !IsSrdSelected)
|
|
|
- {
|
|
|
- MessageBox.Show("Selected at least on module between srd and dummy!");
|
|
|
- return;
|
|
|
- }
|
|
|
- List<string> sequences = new List<string>();
|
|
|
- sequences.Add(SelectedLPName.ToString());
|
|
|
+
|
|
|
+
|
|
|
+ if (!IsDummySelected && !IsSrdSelected)
|
|
|
+ {
|
|
|
+ MessageBox.Show("Selected at least on module between srd and dummy!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ List<string> sequences = new List<string>();
|
|
|
+ sequences.Add(SelectedLPName.ToString());
|
|
|
sequences.Add(SelectedAlignerName.ToString());
|
|
|
if (SelectedPufName != ModuleName.Unknown)
|
|
|
{
|
|
|
sequences.Add(SelectedPufName.ToString());
|
|
|
- }
|
|
|
+ }
|
|
|
if (SelectedSrdName != ModuleName.Unknown)
|
|
|
{
|
|
|
sequences.Add(SelectedSrdName.ToString());
|
|
|
- }
|
|
|
+ }
|
|
|
if (SelectedDummyName != ModuleName.Unknown)
|
|
|
{
|
|
|
sequences.Add(SelectedDummyName.ToString());
|
|
|
- }
|
|
|
- InvokeClient.Instance.Service.DoOperation($"EFEM.{EfemOperation.RobotCycle}",string.Join("-",sequences), InPutCycleTimes, InPutAlignDegree);
|
|
|
- }
|
|
|
- private void RobotCycleAbortAction(object param)
|
|
|
- {
|
|
|
- InvokeClient.Instance.Service.DoOperation($"{ModuleName.EfemRobot}.{EfemOperation.Abort}");
|
|
|
- }
|
|
|
- private void LPChangeAction(object param)
|
|
|
- {
|
|
|
- if ("LP1".Equals((string)param))
|
|
|
- {
|
|
|
- SelectedLPName = ModuleName.LP1;
|
|
|
- }
|
|
|
- else if ("LP2".Equals((string)param))
|
|
|
- {
|
|
|
- SelectedLPName = ModuleName.LP2;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- SelectedLPName = ModuleName.LP3;
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- private void AlignerChangeAction(object param)
|
|
|
- {
|
|
|
-
|
|
|
+ }
|
|
|
+ InvokeClient.Instance.Service.DoOperation($"EFEM.{EfemOperation.RobotCycle}",string.Join("-",sequences), InPutCycleTimes, InPutAlignDegree);
|
|
|
+ }
|
|
|
+ private void RobotCycleAbortAction(object param)
|
|
|
+ {
|
|
|
+ InvokeClient.Instance.Service.DoOperation($"{ModuleName.EfemRobot}.{EfemOperation.Abort}");
|
|
|
}
|
|
|
- private void PufChangeAction(object param)
|
|
|
+ private void LPChangeAction(object param)
|
|
|
+ {
|
|
|
+ if ("LP1".Equals((string)param))
|
|
|
+ {
|
|
|
+ SelectedLPName = ModuleName.LP1;
|
|
|
+ }
|
|
|
+ else if ("LP2".Equals((string)param))
|
|
|
+ {
|
|
|
+ SelectedLPName = ModuleName.LP2;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ SelectedLPName = ModuleName.LP3;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ private void AlignerChangeAction(object param)
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+ private void PufChangeAction(object param)
|
|
|
{
|
|
|
|
|
|
- }
|
|
|
- private void DummyChangeAction(object param)
|
|
|
- {
|
|
|
- if ("Dummy1".Equals((string)param))
|
|
|
- {
|
|
|
- SelectedDummyName = ModuleName.Dummy1;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- SelectedDummyName = ModuleName.Dummy2;
|
|
|
- }
|
|
|
- }
|
|
|
- private void SrdChangeAction(object param)
|
|
|
- {
|
|
|
- if ("SRD1".Equals((string)param))
|
|
|
- {
|
|
|
- SelectedSrdName = ModuleName.SRD1;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- SelectedSrdName = ModuleName.SRD2;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /// <summary>
|
|
|
- /// 加载数据
|
|
|
- /// </summary>
|
|
|
- public void LoadData(string systemName)
|
|
|
- {
|
|
|
- _rtDataKeys.Clear();
|
|
|
- _rtDataKeys.Add("EFEM.CurrentRobotCycleTime");
|
|
|
- if (_timer == null)
|
|
|
- {
|
|
|
- _timer = new DispatcherTimer();
|
|
|
- _timer.Interval = TimeSpan.FromMilliseconds(200);
|
|
|
- _timer.Tick += Timer_Tick;
|
|
|
- }
|
|
|
- _timer.Start();
|
|
|
- }
|
|
|
-
|
|
|
- /// <summary>
|
|
|
- /// 定时器执行
|
|
|
- /// </summary>
|
|
|
- /// <param name="sender"></param>
|
|
|
- /// <param name="e"></param>
|
|
|
- private void Timer_Tick(object sender, EventArgs e)
|
|
|
- {
|
|
|
- if (_rtDataKeys.Count != 0)
|
|
|
- {
|
|
|
- _rtDataValueDic = QueryDataClient.Instance.Service.PollData(_rtDataKeys);
|
|
|
- if (_rtDataValueDic != null)
|
|
|
- {
|
|
|
- CurrentCycle = CommonFunction.GetValue<int>(_rtDataValueDic, $"EFEM.CurrentRobotCycleTime");
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- /// <summary>
|
|
|
- /// 隐藏
|
|
|
- /// </summary>
|
|
|
- public void Hide()
|
|
|
- {
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
+ }
|
|
|
+ private void DummyChangeAction(object param)
|
|
|
+ {
|
|
|
+ if ("Dummy1".Equals((string)param))
|
|
|
+ {
|
|
|
+ SelectedDummyName = ModuleName.Dummy1;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ SelectedDummyName = ModuleName.Dummy2;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ private void SrdChangeAction(object param)
|
|
|
+ {
|
|
|
+ if ("SRD1".Equals((string)param))
|
|
|
+ {
|
|
|
+ SelectedSrdName = ModuleName.SRD1;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ SelectedSrdName = ModuleName.SRD2;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 加载数据
|
|
|
+ /// </summary>
|
|
|
+ public void LoadData(string systemName)
|
|
|
+ {
|
|
|
+ _rtDataKeys.Clear();
|
|
|
+ _rtDataKeys.Add("EFEM.CurrentRobotCycleTime");
|
|
|
+ if (_timer == null)
|
|
|
+ {
|
|
|
+ _timer = new DispatcherTimer();
|
|
|
+ _timer.Interval = TimeSpan.FromMilliseconds(200);
|
|
|
+ _timer.Tick += Timer_Tick;
|
|
|
+ }
|
|
|
+ _timer.Start();
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 定时器执行
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="sender"></param>
|
|
|
+ /// <param name="e"></param>
|
|
|
+ private void Timer_Tick(object sender, EventArgs e)
|
|
|
+ {
|
|
|
+ if (_rtDataKeys.Count != 0)
|
|
|
+ {
|
|
|
+ _rtDataValueDic = QueryDataClient.Instance.Service.PollData(_rtDataKeys);
|
|
|
+ if (_rtDataValueDic != null)
|
|
|
+ {
|
|
|
+ CurrentCycle = CommonFunction.GetValue<int>(_rtDataValueDic, $"EFEM.CurrentRobotCycleTime");
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 隐藏
|
|
|
+ /// </summary>
|
|
|
+ public void Hide()
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|