using MECF.Framework.Common.CommonData;
using MECF.Framework.Common.DataCenter;
using MECF.Framework.Common.Equipment;
using MECF.Framework.Common.OperationCenter;
using OpenSEMI.ClientBase;
using Prism.Commands;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Threading;
using CyberX8_MainPages.Unity;
using MECF.Framework.Common.Utilities;
using MECF.Framework.Common.Jobs;
using CyberX8_MainPages.PMs;
using MECF.Framework.Common.RecipeCenter;
using System.Collections.ObjectModel;
using System.Windows.Media.Animation;
namespace CyberX8_MainPages.ViewModels
{
internal class JobOperationViewModel : BindableBase
{
#region 私有字段
///
/// LP1的Wafer相关信息
///
private WaferAssociationInfo _lp1WaferAssociation;
///
/// LP2的Wafer相关信息
///
private WaferAssociationInfo _lp2WaferAssociation;
///
/// LP3的Wafer相关信息
///
private WaferAssociationInfo _lp3WaferAssociation;
///
/// LP1的Wafer数量
///
private int m_LP1WaferCount;
///
/// LP2的Wafer数量
///
private int m_LP2WaferCount;
///
/// LP3的Wafer数量
///
private int m_LP3WaferCount;
///
/// RT查询数据字典
///
private Dictionary m_RtDataValues;
///
/// RT查询Key列表
///
private List m_RtDataKeys = new List();
///
/// Sequence数据列表 LP1
///
private ObservableCollection m_SequenceSelectedItemsSource1 = new ObservableCollection();
///
/// Sequence数据列表 LP2
///
private ObservableCollection m_SequenceSelectedItemsSource2 = new ObservableCollection();
///
/// Sequence数据列表 LP3
///
private ObservableCollection m_SequenceSelectedItemsSource3 = new ObservableCollection();
///
/// LP1Sequence名称
///
private string m_LP1SequenceName;
///
/// LP2Sequence名称
///
private string m_LP2SequenceName;
///
/// LP3Sequence名称
///
private string m_LP3SequenceName;
///
/// UiRecipeManager
///
private UiRecipeManager _uiRecipeManager = new UiRecipeManager();
///
/// 定时器
///
DispatcherTimer _timer;
///
/// LP1界面Enable
///
private bool m_ButtonIsEnableLP1;
///
/// LP2界面Enable
///
private bool m_ButtonIsEnableLP2;
///
/// LP3界面Enable
///
private bool m_ButtonIsEnableLP3;
///
/// LP1 SequenceName Buffer
///
private string _LP1SequenceNameBuffer;
///
/// LP2 SequenceName Buffer
///
private string _LP2SequenceNameBuffer;
///
/// LP3 SequenceName Buffer
///
private string _LP3SequenceNameBuffer;
private bool _isLp1Unable;
private bool _isLp2Unable;
private bool _isLp3Unable;
private bool _lp1Unable;
private bool _lp2Unable;
private bool _lp3Unable;
private bool _isLP1AutoStoped = true;
private bool _isLP2AutoStoped = true;
private bool _isLP3AutoStoped = true;
private bool _isLP1AutoStarted = false;
private bool _isLP2AutoStarted = false;
private bool _isLP3AutoStarted = false;
private bool _isLP1CanCreatedJob = false;
private bool _isLP2CanCreatedJob = false;
private bool _isLP3CanCreatedJob = false;
///
/// LP1 RecipeMode
///
private bool _lp1RecipeMode;
///
/// LP2 RecipeMode
///
private bool _lp2RecipeMode;
///
/// LP3 RecipeMode
///
private bool _lp3RecipeMode;
///
/// LP1 Docked
///
private bool _isLP1Docked;
///
/// LP2 Docked
///
private bool _isLP2Docked;
///
/// LP3 Docked
///
private bool _isLP3Docked;
#endregion
#region 属性
///
/// RT查询数据字典
///
public Dictionary RtDataValues
{
get { return m_RtDataValues; }
set { SetProperty(ref m_RtDataValues, value); }
}
///
/// LP1的Wafer相关信息
///
public WaferAssociationInfo LP1WaferAssociation
{
get { return _lp1WaferAssociation; }
set { SetProperty(ref _lp1WaferAssociation, value); }
}
///
/// LP2的Wafer相关信息
///
public WaferAssociationInfo LP2WaferAssociation
{
get { return _lp2WaferAssociation; }
set { SetProperty(ref _lp2WaferAssociation, value); }
}
///
/// LP3的Wafer相关信息
///
public WaferAssociationInfo LP3WaferAssociation
{
get { return _lp3WaferAssociation; }
set { SetProperty(ref _lp3WaferAssociation, value); }
}
///
/// LP1的Wafer数量
///
public int LP1WaferCount
{
get { return m_LP1WaferCount; }
set { SetProperty(ref m_LP1WaferCount, value); }
}
///
/// LP2的Wafer数量
///
public int LP2WaferCount
{
get { return m_LP2WaferCount; }
set { SetProperty(ref m_LP2WaferCount, value); }
}
///
/// LP3的Wafer数量
///
public int LP3WaferCount
{
get { return m_LP3WaferCount; }
set { SetProperty(ref m_LP3WaferCount, value); }
}
///
/// Sequence数据列表 LP1
///
public ObservableCollection SequenceSelectedItemsSource1
{
get { return m_SequenceSelectedItemsSource1; }
set { SetProperty(ref m_SequenceSelectedItemsSource1, value); }
}
///
/// Sequence数据列表 LP2
///
public ObservableCollection SequenceSelectedItemsSource2
{
get { return m_SequenceSelectedItemsSource2; }
set { SetProperty(ref m_SequenceSelectedItemsSource2, value); }
}
///
/// Sequence数据列表 LP3
///
public ObservableCollection SequenceSelectedItemsSource3
{
get { return m_SequenceSelectedItemsSource3; }
set { SetProperty(ref m_SequenceSelectedItemsSource3, value); }
}
///
/// LP1Sequence名称
///
public string LP1SequenceName
{
get { return m_LP1SequenceName; }
set { SetProperty(ref m_LP1SequenceName, value); }
}
///
/// LP2Sequence名称
///
public string LP2SequenceName
{
get { return m_LP2SequenceName; }
set { SetProperty(ref m_LP2SequenceName, value); }
}
///
/// LP3Sequence名称
///
public string LP3SequenceName
{
get { return m_LP3SequenceName; }
set { SetProperty(ref m_LP3SequenceName, value); }
}
///
/// LP1界面Enable
///
public bool ButtonIsEnableLP1
{
get { return m_ButtonIsEnableLP1; }
set { SetProperty(ref m_ButtonIsEnableLP1, value); }
}
///
/// LP2界面Enable
///
public bool ButtonIsEnableLP2
{
get { return m_ButtonIsEnableLP2; }
set { SetProperty(ref m_ButtonIsEnableLP2, value); }
}
///
/// LP3界面Enable
///
public bool ButtonIsEnableLP3
{
get { return m_ButtonIsEnableLP3; }
set { SetProperty(ref m_ButtonIsEnableLP3, value); }
}
///
/// Created job 按钮可用性
///
public bool IsLP1CanCreatedJob
{
get { return _isLP1CanCreatedJob; }
set { SetProperty(ref _isLP1CanCreatedJob, value); }
}
public bool IsLP2CanCreatedJob
{
get { return _isLP2CanCreatedJob; }
set { SetProperty(ref _isLP2CanCreatedJob, value); }
}
public bool IsLP3CanCreatedJob
{
get { return _isLP3CanCreatedJob; }
set { SetProperty(ref _isLP3CanCreatedJob, value); }
}
public bool IsLP1AutoStoped
{
get { return _isLP1AutoStoped; }
set { SetProperty(ref _isLP1AutoStoped, value); }
}
public bool IsLP2AutoStoped
{
get { return _isLP2AutoStoped; }
set { SetProperty(ref _isLP2AutoStoped, value); }
}
public bool IsLP3AutoStoped
{
get { return _isLP3AutoStoped; }
set { SetProperty(ref _isLP3AutoStoped, value); }
}
public bool IsLP1AutoStarted
{
get { return _isLP1AutoStarted; }
set { SetProperty(ref _isLP1AutoStarted, value); }
}
public bool IsLP2AutoStarted
{
get { return _isLP2AutoStarted; }
set { SetProperty(ref _isLP2AutoStarted, value); }
}
public bool IsLP3AutoStarted
{
get { return _isLP3AutoStarted; }
set { SetProperty(ref _isLP3AutoStarted, value); }
}
public bool IsLP1Unable
{
get { return _isLp1Unable; }
set { SetProperty(ref _isLp1Unable, value); }
}
public bool IsLP2Unable
{
get { return _isLp2Unable; }
set { SetProperty(ref _isLp2Unable, value); }
}
public bool IsLP3Unable
{
get { return _isLp3Unable; }
set { SetProperty(ref _isLp3Unable, value); }
}
public bool LP1Unable
{
get { return _lp1Unable; }
set { SetProperty(ref _lp1Unable, value); }
}
public bool LP2Unable
{
get { return _lp2Unable; }
set { SetProperty(ref _lp2Unable, value); }
}
public bool LP3Unable
{
get { return _lp3Unable; }
set { SetProperty(ref _lp3Unable, value); }
}
///
/// LP1 RecipeMode(Engineering:true, Production:false)
///
public bool LP1RecipeMode
{
get { return _lp1RecipeMode; }
set { SetProperty(ref _lp1RecipeMode, value); }
}
///
/// LP2 RecipeMode(Engineering:true, Production:false)
///
public bool LP2RecipeMode
{
get { return _lp2RecipeMode; }
set { SetProperty(ref _lp2RecipeMode, value); }
}
///
/// LP3 RecipeMode(Engineering:true, Production:false)
///
public bool LP3RecipeMode
{
get { return _lp3RecipeMode; }
set { SetProperty(ref _lp3RecipeMode, value); }
}
#endregion
#region 命令
private DelegateCommand