123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799 |
- using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Threading;
- using Aitex.Core.Common.DeviceData;
- using MECF.Framework.Common.DataCenter;
- using MECF.Framework.Common.DBCore;
- using MECF.Framework.Common.OperationCenter;
- using Prism.Commands;
- using Prism.Mvvm;
- using Venus_Core;
- using Venus_MainPages.Unity;
- using Venus_MainPages.Views;
- using Xceed.Wpf.Toolkit;
- namespace Venus_MainPages.ViewModels
- {
- public class VenusMFCVerificationViewModel : BindableBase
- {
- #region 私有字段
- private AITMfcData m_MFCData;
- private Dictionary<string, object> m_RtDataValues;
- public string ModuleName;
- private ObservableCollection<int> m_MFCVerificationPoints = new ObservableCollection<int>();
- private int m_GasSelectedIndex;
- private int m_PointsSelectedIndex;
- DispatcherTimer timer = new DispatcherTimer();
- private ObservableCollection<MFCCalibrationData> m_MFCVerificationData=new ObservableCollection<MFCCalibrationData>();
- private ObservableCollection<MFCVerificationData> m_VerificationDataRecords = new ObservableCollection<MFCVerificationData>();
- private ObservableCollection<MFCVerificationOnePointData> m_VerificationOnePointDataRecords = new ObservableCollection<MFCVerificationOnePointData>();
- private ObservableCollection<VenusMFCVerificationOnePointData> m_VenusVerificationOnePointDataRecords = new ObservableCollection<VenusMFCVerificationOnePointData>();
- private ObservableCollection<MFCVerificationTenPointsData> m_VerificationTenPointsDataRecords = new ObservableCollection<MFCVerificationTenPointsData>();
- private ObservableCollection<VenusMFCVerificationTenPointsData> m_VenusVerificationTenPointsDataRecords = new ObservableCollection<VenusMFCVerificationTenPointsData>();
- private ObservableCollection<MFCCalibrationTenPointsData> m_MFCCalibrationTenPointsData = new ObservableCollection<MFCCalibrationTenPointsData>();
- private ObservableCollection<MFCCalibrationTenPointsData> m_MFCCalibrationOnePointData = new ObservableCollection<MFCCalibrationTenPointsData>();
- private PMState m_PMCurrentState;
- private JetChamber ChamberType;
- private bool m_MFC7IsEnable;
- private bool m_MFC8IsEnable;
- private bool m_MFC9IsEnable;
- private bool m_MFC10IsEnable;
- private bool m_MFC11IsEnable;
- private bool m_MFC12IsEnable;
- //private MFCVerificationView m_MFCVerificationView;
- #endregion
- #region 属性
- public PMState PMCurrentState
- {
- get { return m_PMCurrentState; }
- set
- {
- if ((m_PMCurrentState == PMState.MFCVerification || m_PMCurrentState == PMState.AllMFCVerification) && value == PMState.Idle)
- {
- InitTable();
- }
- SetProperty(ref m_PMCurrentState, value);
- }
- }
- public ObservableCollection<int> MFCVerificationPoints
- {
- get { return m_MFCVerificationPoints; }
- set
- {
- SetProperty(ref m_MFCVerificationPoints, value);
- }
- }
-
- public Dictionary<string, object> RtDataValues
- {
- get { return m_RtDataValues; }
- set { SetProperty(ref m_RtDataValues, value); }
- }
- public AITMfcData MFCData
- {
- get { return m_MFCData; }
- set { SetProperty(ref m_MFCData, value); }
- }
- public int GasSelectedIndex
- {
- get { return m_GasSelectedIndex; }
- set { SetProperty(ref m_GasSelectedIndex, value); }
- }
- public int PointsSelectedIndex
- {
- get { return m_PointsSelectedIndex; }
- set { SetProperty(ref m_PointsSelectedIndex, value); }
- }
- private DelegateCommand<object> _DataGridSelectionChangedCommand;
- public DelegateCommand<object> DataGridSelectionChangedCommand =>
- _DataGridSelectionChangedCommand ?? (_DataGridSelectionChangedCommand = new DelegateCommand<object>(OnDataGridSelectionChanged));
- public ObservableCollection<MFCCalibrationData> MFCCalibrationData
- {
- get { return m_MFCVerificationData; }
- set { SetProperty(ref m_MFCVerificationData, value); }
- }
- public ObservableCollection<MFCVerificationData> VerificationDataRecords
- {
- get { return m_VerificationDataRecords; }
- set { SetProperty(ref m_VerificationDataRecords, value); }
- }
- public ObservableCollection<MFCVerificationOnePointData> VerificationDataOnePointRecords
- {
- get { return m_VerificationOnePointDataRecords; }
- set { SetProperty(ref m_VerificationOnePointDataRecords, value); }
- }
- public ObservableCollection<VenusMFCVerificationOnePointData> VenusVerificationDataOnePointRecords
- {
- get { return m_VenusVerificationOnePointDataRecords; }
- set { SetProperty(ref m_VenusVerificationOnePointDataRecords, value); }
- }
- public ObservableCollection<VenusMFCVerificationTenPointsData> VenusVerificationDataTenPointsRecords
- {
- get { return m_VenusVerificationTenPointsDataRecords; }
- set { SetProperty(ref m_VenusVerificationTenPointsDataRecords, value); }
- }
- public ObservableCollection<MFCVerificationTenPointsData> VerificationDataTenPointsRecords
- {
- get { return m_VerificationTenPointsDataRecords; }
- set { SetProperty(ref m_VerificationTenPointsDataRecords, value); }
- }
- public ObservableCollection<MFCCalibrationTenPointsData> MFCCalibrationTenPointsDataRecords
- {
- get { return m_MFCCalibrationTenPointsData; }
- set { SetProperty(ref m_MFCCalibrationTenPointsData, value); }
- }
- public ObservableCollection<MFCCalibrationTenPointsData> MFCCalibrationOnePointDataRecords
- {
- get { return m_MFCCalibrationOnePointData; }
- set { SetProperty(ref m_MFCCalibrationOnePointData, value); }
- }
- public bool MFC7IsEnable
- {
- get { return m_MFC7IsEnable; }
- set { SetProperty(ref m_MFC7IsEnable, value); }
- }
- public bool MFC8IsEnable
- {
- get { return m_MFC8IsEnable; }
- set { SetProperty(ref m_MFC8IsEnable, value); }
- }
- public bool MFC9IsEnable
- {
- get { return m_MFC9IsEnable; }
- set { SetProperty(ref m_MFC9IsEnable, value); }
- }
- public bool MFC10IsEnable
- {
- get { return m_MFC10IsEnable; }
- set { SetProperty(ref m_MFC10IsEnable, value); }
- }
- public bool MFC11IsEnable
- {
- get { return m_MFC11IsEnable; }
- set { SetProperty(ref m_MFC11IsEnable, value); }
- }
- public bool MFC12IsEnable
- {
- get { return m_MFC12IsEnable; }
- set { SetProperty(ref m_MFC12IsEnable, value); }
- }
- #endregion
- #region 命令
- private DelegateCommand<object> _StartOnePointVerificationCommand;
- public DelegateCommand<object> StartOnePointVerificationCommand =>
- _StartOnePointVerificationCommand ?? (_StartOnePointVerificationCommand = new DelegateCommand<object>(OnStartOnePointVerification));
- private DelegateCommand<object> _StartTenPointVerificationCommand;
- public DelegateCommand<object> StartTenPointVerificationCommand =>
- _StartTenPointVerificationCommand ?? (_StartTenPointVerificationCommand = new DelegateCommand<object>(OnStartTenPointVerification));
- private DelegateCommand _AbortCommand;
- public DelegateCommand AbortCommand =>
- _AbortCommand ?? (_AbortCommand = new DelegateCommand(OnAbort));
- private DelegateCommand _FlashCommand;
- public DelegateCommand FlashCommand =>
- _FlashCommand ?? (_FlashCommand = new DelegateCommand(OnFlash));
- private DelegateCommand _SelectGasCommand;
- public DelegateCommand SelectGasCommand =>
- _SelectGasCommand ?? (_SelectGasCommand = new DelegateCommand(OnSelectGas));
- private DelegateCommand<object> _LoadCommand;
- public DelegateCommand<object> LoadCommand =>
- _LoadCommand ?? (_LoadCommand = new DelegateCommand<object>(OnLoad));
- #endregion
- public VenusMFCVerificationViewModel()
- {
- timer.Interval = TimeSpan.FromSeconds(1);
- timer.Tick += Timer_Tick;
- timer.Start();
- for (int i = 0; i < 10; i++)
- {
- MFCCalibrationTenPointsDataRecords.Add(new MFCCalibrationTenPointsData());
- }
- for (int i = 0; i < 1; i++)
- {
- MFCCalibrationOnePointDataRecords.Add(new MFCCalibrationTenPointsData());
- }
- }
- #region 命令方法
- private void OnStartOnePointVerification(object obj)
- {
- var values = (object[])obj;
- string gasName = values[0].ToString();
- float flow = float.Parse(values[1].ToString());
- InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.MFCVerification}", gasName, flow, 1);
- }
- private void OnStartTenPointVerification(object obj)
- {
- var values = (object[])obj;
- string gasName = values[0].ToString();
- float flow = float.Parse(values[1].ToString());
- InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.MFCVerification}", gasName, flow, 10);
- }
- public void OnAbort()
- {
- InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Abort");
- }
- public void OnFlash()
- {
- InitTable();
- }
- private void OnSelectGas()
- {
- MFCVerificationPoints.Clear();
- MFCData = (AITMfcData)QueryDataClient.Instance.Service.GetData($"{ModuleName}.MfcGas{(GasSelectedIndex + 1).ToString()}");
- if ( MFCData != null )
- {
- int delta1 = (int)MFCData.Scale / 10;
- for (int i = 0; i < 10; i++)
- {
- MFCVerificationPoints.Add(delta1 + delta1 * i);
- }
- PointsSelectedIndex = 0;
- }
- }
- //private void OnQuery()
- //{
- // var AllLeakCheckDa = QueryDataClient.Instance.Service.GetMFCVerificationData(this.view.wfTimeFrom.Value, this.view.wfTimeTo.Value);
- // if (AllLeakCheckDa != null)
- // {
- // VerificationDataRecords = new ObservableCollection<MFCVerificationData>(AllLeakCheckDa);
- // }
- //}
- private void OnLoad(object mFCVerificationView)
- {
- ChamberType = (JetChamber)Enum.Parse(typeof(JetChamber), QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.ChamberType").ToString());
-
-
- if (ChamberType != JetChamber.Kepler2200A && ChamberType != JetChamber.Kepler2200B)
- {
- MFC7IsEnable = (bool)QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.MfcGas7.Enable");
- MFC8IsEnable = (bool)QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.MfcGas8.Enable");
- }
- if (ChamberType == JetChamber.VenusSE || ChamberType == JetChamber.VenusDE || ChamberType == JetChamber.Kepler2300)
- {
- MFC7IsEnable = (bool)QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.MfcGas7.Enable");
- MFC8IsEnable = (bool)QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.MfcGas8.Enable");
- }
- if (ChamberType==JetChamber.VenusSE || ChamberType == JetChamber.VenusDE)
- {
- MFC9IsEnable = (bool)QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.MfcGas9.Enable");
- MFC10IsEnable = (bool)QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.MfcGas10.Enable");
- MFC11IsEnable = (bool)QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.MfcGas11.Enable");
- MFC12IsEnable = (bool)QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.MfcGas12.Enable");
- }
- //m_MFCVerificationView = mFCVerificationView as MFCVerificationView;
- ////if ( m_MFCVerificationView == null ) { return; }
- //if (MFC7IsEnable == false)
- //{
- // m_MFCVerificationView.DataGridTemplateColumn7.Visibility = Visibility.Hidden;
- // m_MFCVerificationView.OnePointDataGridTemplateColumn7.Visibility = Visibility.Hidden;
- //}
- //else
- //{
- // m_MFCVerificationView.DataGridTemplateColumn7.Visibility = Visibility.Visible;
- // m_MFCVerificationView.OnePointDataGridTemplateColumn7.Visibility = Visibility.Visible;
- //}
- //if (MFC8IsEnable == false)
- //{
- // m_MFCVerificationView.DataGridTemplateColumn8.Visibility = Visibility.Hidden;
- // m_MFCVerificationView.OnePointDataGridTemplateColumn8.Visibility = Visibility.Hidden;
- //}
- //else
- //{
- // m_MFCVerificationView.DataGridTemplateColumn8.Visibility = Visibility.Visible;
- // m_MFCVerificationView.OnePointDataGridTemplateColumn8.Visibility = Visibility.Visible;
- //}
- VenusVerificationDataOnePointRecords = new ObservableCollection<VenusMFCVerificationOnePointData>();
- VenusVerificationDataTenPointsRecords= new ObservableCollection<VenusMFCVerificationTenPointsData>();
- for ( int i = 1; i <= 12; i++)
- {
- bool gasenable= (bool)QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.MfcGas{i}.Enable");
- if (gasenable)
- {
- AITMfcData S =(AITMfcData)QueryDataClient.Instance.Service.GetData($"{ModuleName}.MfcGas{i}");
- VenusVerificationDataOnePointRecords.Add(new VenusMFCVerificationOnePointData()
- {
- Name = $"MfcGas{i}",
- Select= false,
- Module=ModuleName,
- GasName= S.DisplayName,
- OperateTime=""
- });
- VenusVerificationDataTenPointsRecords.Add(new VenusMFCVerificationTenPointsData()
- {
- Name = $"MfcGas{i}",
- Select = false,
- Module = ModuleName,
- GasName = S.DisplayName,
- OperateTime = ""
- });
- }
- }
- InitTable();
- }
- #endregion
- #region 私有方法
- private void Timer_Tick(object sender, EventArgs e)
- {
- PMCurrentState = (PMState)QueryDataClient.Instance.Service.GetData($"{ModuleName}.FsmState");
- }
- public void Init()
- {
- OnSelectGas();
- }
- public void OnDataGridSelectionChanged(object obj)
- {
- if (obj == null)
- {
- return;
- }
- else
- {
- MFCVerificationOnePointData item = obj as MFCVerificationOnePointData;
- string name=item.Name.Substring(6,1);
- switch (name)
- {
- case "1":
- MFCCalibrationOnePointDataRecords[0] = new MFCCalibrationTenPointsData { Gas1Calculate = item.Calculate, Gas1SetPoint = item.Setpoint };
- break;
- case "2":
- MFCCalibrationOnePointDataRecords[0] = new MFCCalibrationTenPointsData { Gas2Calculate = item.Calculate, Gas2SetPoint = item.Setpoint };
- break;
- case "3":
- MFCCalibrationOnePointDataRecords[0] = new MFCCalibrationTenPointsData { Gas3Calculate = item.Calculate, Gas3SetPoint = item.Setpoint };
- break;
- case "4":
- MFCCalibrationOnePointDataRecords[0] = new MFCCalibrationTenPointsData { Gas4Calculate = item.Calculate, Gas4SetPoint = item.Setpoint };
- break;
- case "5":
- MFCCalibrationOnePointDataRecords[0] = new MFCCalibrationTenPointsData { Gas5Calculate = item.Calculate, Gas5SetPoint = item.Setpoint };
- break;
- case "6":
- MFCCalibrationOnePointDataRecords[0] = new MFCCalibrationTenPointsData { Gas6Calculate = item.Calculate, Gas6SetPoint = item.Setpoint };
- break;
- case "7":
- MFCCalibrationOnePointDataRecords[0] = new MFCCalibrationTenPointsData { Gas7Calculate = item.Calculate, Gas7SetPoint = item.Setpoint };
- break;
- case "8":
- MFCCalibrationOnePointDataRecords[0] = new MFCCalibrationTenPointsData { Gas8Calculate = item.Calculate, Gas8SetPoint = item.Setpoint };
- break;
- }
- }
- }
- private void InitTable()
- {
- var onePointData = QueryDataClient.Instance.Service.GetMFCVerificationOnePointData();
- if (onePointData != null)
- {
- var _onePointData = onePointData.Where(x => x.Module == ModuleName);
- //VerificationDataOnePointRecords = new ObservableCollection<MFCVerificationOnePointData>(_onePointData);
- //VenusVerificationDataOnePointRecords = new ObservableCollection<VenusMFCVerificationOnePointData>();
- foreach (var item in _onePointData)
- {
- for (var i = 0;i<VenusVerificationDataOnePointRecords.Count(); i++)
- {
- if (VenusVerificationDataOnePointRecords[i].Name== item.Name)
- {
- VenusVerificationDataOnePointRecords[i].OperateTime = item.OperateTime;
- VenusVerificationDataOnePointRecords[i].Calculate = item.Calculate;
- VenusVerificationDataOnePointRecords[i].Setpoint = item.Setpoint;
-
- float deviation = (Math.Abs(item.Calculate) - Math.Abs(item.Setpoint)) / Math.Abs(item.Setpoint) * 100;
- VenusVerificationDataOnePointRecords[i].Error= deviation;
- }
- }
- }
- }
- var tenPointsData = QueryDataClient.Instance.Service.GetMFCVerificationTenPointsData();
- if (tenPointsData != null)
- {
- var _tenPointsData = tenPointsData.Where(x => x.Module == ModuleName);
- //VerificationDataTenPointsRecords = new ObservableCollection<MFCVerificationTenPointsData>(_tenPointsData);
- foreach (var item in _tenPointsData)
- {
- for (var i = 0; i < VenusVerificationDataTenPointsRecords.Count(); i++)
- {
- if (VenusVerificationDataTenPointsRecords[i].Name == item.Name)
- {
- VenusVerificationDataTenPointsRecords[i].OperateTime = item.OperateTime;
- VenusVerificationDataTenPointsRecords[i].Percent10Setpoint = item.Percent10Setpoint;
- VenusVerificationDataTenPointsRecords[i].Percent10Setpoint = item.Percent10Setpoint;
- VenusVerificationDataTenPointsRecords[i].Percent10Error = (Math.Abs(item.Percent10Calculate) - Math.Abs(item.Percent10Setpoint)) / Math.Abs(item.Percent10Setpoint) * 100;
- VenusVerificationDataTenPointsRecords[i].Percent20Setpoint = item.Percent20Setpoint;
- VenusVerificationDataTenPointsRecords[i].Percent20Setpoint = item.Percent20Setpoint;
- VenusVerificationDataTenPointsRecords[i].Percent20Error = (Math.Abs(item.Percent20Calculate) - Math.Abs(item.Percent20Setpoint)) / Math.Abs(item.Percent20Setpoint) * 100;
- VenusVerificationDataTenPointsRecords[i].Percent30Setpoint = item.Percent30Setpoint;
- VenusVerificationDataTenPointsRecords[i].Percent30Setpoint = item.Percent30Setpoint;
- VenusVerificationDataTenPointsRecords[i].Percent30Error = (Math.Abs(item.Percent30Calculate) - Math.Abs(item.Percent30Setpoint)) / Math.Abs(item.Percent30Setpoint) * 100;
- VenusVerificationDataTenPointsRecords[i].Percent40Setpoint = item.Percent40Setpoint;
- VenusVerificationDataTenPointsRecords[i].Percent40Setpoint = item.Percent40Setpoint;
- VenusVerificationDataTenPointsRecords[i].Percent40Error = (Math.Abs(item.Percent40Calculate) - Math.Abs(item.Percent40Setpoint)) / Math.Abs(item.Percent40Setpoint) * 100;
- VenusVerificationDataTenPointsRecords[i].Percent50Setpoint = item.Percent50Setpoint;
- VenusVerificationDataTenPointsRecords[i].Percent50Setpoint = item.Percent50Setpoint;
- VenusVerificationDataTenPointsRecords[i].Percent50Error = (Math.Abs(item.Percent50Calculate) - Math.Abs(item.Percent50Setpoint)) / Math.Abs(item.Percent50Setpoint) * 100;
- VenusVerificationDataTenPointsRecords[i].Percent60Setpoint = item.Percent60Setpoint;
- VenusVerificationDataTenPointsRecords[i].Percent60Setpoint = item.Percent60Setpoint;
- VenusVerificationDataTenPointsRecords[i].Percent60Error = (Math.Abs(item.Percent60Calculate) - Math.Abs(item.Percent60Setpoint)) / Math.Abs(item.Percent60Setpoint) * 100;
- VenusVerificationDataTenPointsRecords[i].Percent70Setpoint = item.Percent70Setpoint;
- VenusVerificationDataTenPointsRecords[i].Percent70Setpoint = item.Percent70Setpoint;
- VenusVerificationDataTenPointsRecords[i].Percent70Error = (Math.Abs(item.Percent70Calculate) - Math.Abs(item.Percent70Setpoint)) / Math.Abs(item.Percent70Setpoint) * 100;
- VenusVerificationDataTenPointsRecords[i].Percent80Setpoint = item.Percent80Setpoint;
- VenusVerificationDataTenPointsRecords[i].Percent80Setpoint = item.Percent80Setpoint;
- VenusVerificationDataTenPointsRecords[i].Percent80Error = (Math.Abs(item.Percent80Calculate) - Math.Abs(item.Percent80Setpoint)) / Math.Abs(item.Percent80Setpoint) * 100;
- VenusVerificationDataTenPointsRecords[i].Percent90Setpoint = item.Percent90Setpoint;
- VenusVerificationDataTenPointsRecords[i].Percent90Setpoint = item.Percent90Setpoint;
- VenusVerificationDataTenPointsRecords[i].Percent90Error = (Math.Abs(item.Percent90Calculate) - Math.Abs(item.Percent90Setpoint)) / Math.Abs(item.Percent90Setpoint) * 100;
- VenusVerificationDataTenPointsRecords[i].Percent100Setpoint = item.Percent100Setpoint;
- VenusVerificationDataTenPointsRecords[i].Percent100Setpoint = item.Percent100Setpoint;
- VenusVerificationDataTenPointsRecords[i].Percent100Error = (Math.Abs(item.Percent100Calculate) - Math.Abs(item.Percent100Setpoint)) / Math.Abs(item.Percent100Setpoint) * 100;
- }
- }
- }
- }
- var data1 = VerificationDataTenPointsRecords.Where(x => x.Name == $"MfcGas1").FirstOrDefault();
- if (data1 != null)
- {
- MFCCalibrationTenPointsDataRecords[0].Gas1SetPoint = data1.Percent10Setpoint;
- MFCCalibrationTenPointsDataRecords[0].Gas1Calculate = data1.Percent10Calculate;
- MFCCalibrationTenPointsDataRecords[1].Gas1SetPoint = data1.Percent20Setpoint;
- MFCCalibrationTenPointsDataRecords[1].Gas1Calculate = data1.Percent20Calculate;
- MFCCalibrationTenPointsDataRecords[2].Gas1SetPoint = data1.Percent30Setpoint;
- MFCCalibrationTenPointsDataRecords[2].Gas1Calculate = data1.Percent30Calculate;
- MFCCalibrationTenPointsDataRecords[3].Gas1SetPoint = data1.Percent40Setpoint;
- MFCCalibrationTenPointsDataRecords[3].Gas1Calculate = data1.Percent40Calculate;
- MFCCalibrationTenPointsDataRecords[4].Gas1SetPoint = data1.Percent50Setpoint;
- MFCCalibrationTenPointsDataRecords[4].Gas1Calculate = data1.Percent50Calculate;
- MFCCalibrationTenPointsDataRecords[5].Gas1SetPoint = data1.Percent60Setpoint;
- MFCCalibrationTenPointsDataRecords[5].Gas1Calculate = data1.Percent60Calculate;
- MFCCalibrationTenPointsDataRecords[6].Gas1SetPoint = data1.Percent70Setpoint;
- MFCCalibrationTenPointsDataRecords[6].Gas1Calculate = data1.Percent70Calculate;
- MFCCalibrationTenPointsDataRecords[7].Gas1SetPoint = data1.Percent80Setpoint;
- MFCCalibrationTenPointsDataRecords[7].Gas1Calculate = data1.Percent80Calculate;
- MFCCalibrationTenPointsDataRecords[8].Gas1SetPoint = data1.Percent90Setpoint;
- MFCCalibrationTenPointsDataRecords[8].Gas1Calculate = data1.Percent90Calculate;
- MFCCalibrationTenPointsDataRecords[9].Gas1SetPoint = data1.Percent100Setpoint;
- MFCCalibrationTenPointsDataRecords[9].Gas1Calculate = data1.Percent100Calculate;
- }
- var data2 = VerificationDataTenPointsRecords.Where(x => x.Name == $"MfcGas2").FirstOrDefault();
- if (data2 != null)
- {
- MFCCalibrationTenPointsDataRecords[0].Gas2SetPoint = data2.Percent10Setpoint;
- MFCCalibrationTenPointsDataRecords[0].Gas2Calculate = data2.Percent10Calculate;
- MFCCalibrationTenPointsDataRecords[1].Gas2SetPoint = data2.Percent20Setpoint;
- MFCCalibrationTenPointsDataRecords[1].Gas2Calculate = data2.Percent20Calculate;
- MFCCalibrationTenPointsDataRecords[2].Gas2SetPoint = data2.Percent30Setpoint;
- MFCCalibrationTenPointsDataRecords[2].Gas2Calculate = data2.Percent30Calculate;
- MFCCalibrationTenPointsDataRecords[3].Gas2SetPoint = data2.Percent40Setpoint;
- MFCCalibrationTenPointsDataRecords[3].Gas2Calculate = data2.Percent40Calculate;
- MFCCalibrationTenPointsDataRecords[4].Gas2SetPoint = data2.Percent50Setpoint;
- MFCCalibrationTenPointsDataRecords[4].Gas2Calculate = data2.Percent50Calculate;
- MFCCalibrationTenPointsDataRecords[5].Gas2SetPoint = data2.Percent60Setpoint;
- MFCCalibrationTenPointsDataRecords[5].Gas2Calculate = data2.Percent60Calculate;
- MFCCalibrationTenPointsDataRecords[6].Gas2SetPoint = data2.Percent70Setpoint;
- MFCCalibrationTenPointsDataRecords[6].Gas2Calculate = data2.Percent70Calculate;
- MFCCalibrationTenPointsDataRecords[7].Gas2SetPoint = data2.Percent80Setpoint;
- MFCCalibrationTenPointsDataRecords[7].Gas2Calculate = data2.Percent80Calculate;
- MFCCalibrationTenPointsDataRecords[8].Gas2SetPoint = data2.Percent90Setpoint;
- MFCCalibrationTenPointsDataRecords[8].Gas2Calculate = data2.Percent90Calculate;
- MFCCalibrationTenPointsDataRecords[9].Gas2SetPoint = data2.Percent100Setpoint;
- MFCCalibrationTenPointsDataRecords[9].Gas2Calculate = data2.Percent100Calculate;
- }
- var data3 = VerificationDataTenPointsRecords.Where(x => x.Name == $"MfcGas3").FirstOrDefault();
- if (data3 != null)
- {
- MFCCalibrationTenPointsDataRecords[0].Gas3SetPoint = data3.Percent10Setpoint;
- MFCCalibrationTenPointsDataRecords[0].Gas3Calculate = data3.Percent10Calculate;
- MFCCalibrationTenPointsDataRecords[1].Gas3SetPoint = data3.Percent20Setpoint;
- MFCCalibrationTenPointsDataRecords[1].Gas3Calculate = data3.Percent20Calculate;
- MFCCalibrationTenPointsDataRecords[2].Gas3SetPoint = data3.Percent30Setpoint;
- MFCCalibrationTenPointsDataRecords[2].Gas3Calculate = data3.Percent30Calculate;
- MFCCalibrationTenPointsDataRecords[3].Gas3SetPoint = data3.Percent40Setpoint;
- MFCCalibrationTenPointsDataRecords[3].Gas3Calculate = data3.Percent40Calculate;
- MFCCalibrationTenPointsDataRecords[4].Gas3SetPoint = data3.Percent50Setpoint;
- MFCCalibrationTenPointsDataRecords[4].Gas3Calculate = data3.Percent50Calculate;
- MFCCalibrationTenPointsDataRecords[5].Gas3SetPoint = data3.Percent60Setpoint;
- MFCCalibrationTenPointsDataRecords[5].Gas3Calculate = data3.Percent60Calculate;
- MFCCalibrationTenPointsDataRecords[6].Gas3SetPoint = data3.Percent70Setpoint;
- MFCCalibrationTenPointsDataRecords[6].Gas3Calculate = data3.Percent70Calculate;
- MFCCalibrationTenPointsDataRecords[7].Gas3SetPoint = data3.Percent80Setpoint;
- MFCCalibrationTenPointsDataRecords[7].Gas3Calculate = data3.Percent80Calculate;
- MFCCalibrationTenPointsDataRecords[8].Gas3SetPoint = data3.Percent90Setpoint;
- MFCCalibrationTenPointsDataRecords[8].Gas3Calculate = data3.Percent90Calculate;
- MFCCalibrationTenPointsDataRecords[9].Gas3SetPoint = data3.Percent100Setpoint;
- MFCCalibrationTenPointsDataRecords[9].Gas3Calculate = data3.Percent100Calculate;
- }
- var data4 = VerificationDataTenPointsRecords.Where(x => x.Name == $"MfcGas4").FirstOrDefault();
- if (data4 != null)
- {
- MFCCalibrationTenPointsDataRecords[0].Gas4SetPoint = data4.Percent10Setpoint;
- MFCCalibrationTenPointsDataRecords[0].Gas4Calculate = data4.Percent10Calculate;
- MFCCalibrationTenPointsDataRecords[1].Gas4SetPoint = data4.Percent20Setpoint;
- MFCCalibrationTenPointsDataRecords[1].Gas4Calculate = data4.Percent20Calculate;
- MFCCalibrationTenPointsDataRecords[2].Gas4SetPoint = data4.Percent30Setpoint;
- MFCCalibrationTenPointsDataRecords[2].Gas4Calculate = data4.Percent30Calculate;
- MFCCalibrationTenPointsDataRecords[3].Gas4SetPoint = data4.Percent40Setpoint;
- MFCCalibrationTenPointsDataRecords[3].Gas4Calculate = data4.Percent40Calculate;
- MFCCalibrationTenPointsDataRecords[4].Gas4SetPoint = data4.Percent50Setpoint;
- MFCCalibrationTenPointsDataRecords[4].Gas4Calculate = data4.Percent50Calculate;
- MFCCalibrationTenPointsDataRecords[5].Gas4SetPoint = data4.Percent60Setpoint;
- MFCCalibrationTenPointsDataRecords[5].Gas4Calculate = data4.Percent60Calculate;
- MFCCalibrationTenPointsDataRecords[6].Gas4SetPoint = data4.Percent70Setpoint;
- MFCCalibrationTenPointsDataRecords[6].Gas4Calculate = data4.Percent70Calculate;
- MFCCalibrationTenPointsDataRecords[7].Gas4SetPoint = data4.Percent80Setpoint;
- MFCCalibrationTenPointsDataRecords[7].Gas4Calculate = data4.Percent80Calculate;
- MFCCalibrationTenPointsDataRecords[8].Gas4SetPoint = data4.Percent90Setpoint;
- MFCCalibrationTenPointsDataRecords[8].Gas4Calculate = data4.Percent90Calculate;
- MFCCalibrationTenPointsDataRecords[9].Gas4SetPoint = data4.Percent100Setpoint;
- MFCCalibrationTenPointsDataRecords[9].Gas4Calculate = data4.Percent100Calculate;
- }
- var data5= VerificationDataTenPointsRecords.Where(x => x.Name == $"MfcGas5").FirstOrDefault();
- if (data5 != null)
- {
- MFCCalibrationTenPointsDataRecords[0].Gas5SetPoint = data5.Percent10Setpoint;
- MFCCalibrationTenPointsDataRecords[0].Gas5Calculate = data5.Percent10Calculate;
- MFCCalibrationTenPointsDataRecords[1].Gas5SetPoint = data5.Percent20Setpoint;
- MFCCalibrationTenPointsDataRecords[1].Gas5Calculate = data5.Percent20Calculate;
- MFCCalibrationTenPointsDataRecords[2].Gas5SetPoint = data5.Percent30Setpoint;
- MFCCalibrationTenPointsDataRecords[2].Gas5Calculate = data5.Percent30Calculate;
- MFCCalibrationTenPointsDataRecords[3].Gas5SetPoint = data5.Percent40Setpoint;
- MFCCalibrationTenPointsDataRecords[3].Gas5Calculate = data5.Percent40Calculate;
- MFCCalibrationTenPointsDataRecords[4].Gas5SetPoint = data5.Percent50Setpoint;
- MFCCalibrationTenPointsDataRecords[4].Gas5Calculate = data5.Percent50Calculate;
- MFCCalibrationTenPointsDataRecords[5].Gas5SetPoint = data5.Percent60Setpoint;
- MFCCalibrationTenPointsDataRecords[5].Gas5Calculate = data5.Percent60Calculate;
- MFCCalibrationTenPointsDataRecords[6].Gas5SetPoint = data5.Percent70Setpoint;
- MFCCalibrationTenPointsDataRecords[6].Gas5Calculate = data5.Percent70Calculate;
- MFCCalibrationTenPointsDataRecords[7].Gas5SetPoint = data5.Percent80Setpoint;
- MFCCalibrationTenPointsDataRecords[7].Gas5Calculate = data5.Percent80Calculate;
- MFCCalibrationTenPointsDataRecords[8].Gas5SetPoint = data5.Percent90Setpoint;
- MFCCalibrationTenPointsDataRecords[8].Gas5Calculate = data5.Percent90Calculate;
- MFCCalibrationTenPointsDataRecords[9].Gas5SetPoint = data5.Percent100Setpoint;
- MFCCalibrationTenPointsDataRecords[9].Gas5Calculate = data5.Percent100Calculate;
- }
- var data6 = VerificationDataTenPointsRecords.Where(x => x.Name == $"MfcGas6").FirstOrDefault();
- if (data6 != null)
- {
- MFCCalibrationTenPointsDataRecords[0].Gas6SetPoint = data6.Percent10Setpoint;
- MFCCalibrationTenPointsDataRecords[0].Gas6Calculate = data6.Percent10Calculate;
- MFCCalibrationTenPointsDataRecords[1].Gas6SetPoint = data6.Percent20Setpoint;
- MFCCalibrationTenPointsDataRecords[1].Gas6Calculate = data6.Percent20Calculate;
- MFCCalibrationTenPointsDataRecords[2].Gas6SetPoint = data6.Percent30Setpoint;
- MFCCalibrationTenPointsDataRecords[2].Gas6Calculate = data6.Percent30Calculate;
- MFCCalibrationTenPointsDataRecords[3].Gas6SetPoint = data6.Percent40Setpoint;
- MFCCalibrationTenPointsDataRecords[3].Gas6Calculate = data6.Percent40Calculate;
- MFCCalibrationTenPointsDataRecords[4].Gas6SetPoint = data6.Percent50Setpoint;
- MFCCalibrationTenPointsDataRecords[4].Gas6Calculate = data6.Percent50Calculate;
- MFCCalibrationTenPointsDataRecords[5].Gas6SetPoint = data6.Percent60Setpoint;
- MFCCalibrationTenPointsDataRecords[5].Gas6Calculate = data6.Percent60Calculate;
- MFCCalibrationTenPointsDataRecords[6].Gas6SetPoint = data6.Percent70Setpoint;
- MFCCalibrationTenPointsDataRecords[6].Gas6Calculate = data6.Percent70Calculate;
- MFCCalibrationTenPointsDataRecords[7].Gas6SetPoint = data6.Percent80Setpoint;
- MFCCalibrationTenPointsDataRecords[7].Gas6Calculate = data6.Percent80Calculate;
- MFCCalibrationTenPointsDataRecords[8].Gas6SetPoint = data6.Percent90Setpoint;
- MFCCalibrationTenPointsDataRecords[8].Gas6Calculate = data6.Percent90Calculate;
- MFCCalibrationTenPointsDataRecords[9].Gas6SetPoint = data6.Percent100Setpoint;
- MFCCalibrationTenPointsDataRecords[9].Gas6Calculate = data6.Percent100Calculate;
- }
- var data7 = VerificationDataTenPointsRecords.Where(x => x.Name == $"MfcGas7").FirstOrDefault();
- if (data7 != null)
- {
- MFCCalibrationTenPointsDataRecords[0].Gas7SetPoint = data7.Percent10Setpoint;
- MFCCalibrationTenPointsDataRecords[0].Gas7Calculate = data7.Percent10Calculate;
- MFCCalibrationTenPointsDataRecords[1].Gas7SetPoint = data7.Percent20Setpoint;
- MFCCalibrationTenPointsDataRecords[1].Gas7Calculate = data7.Percent20Calculate;
- MFCCalibrationTenPointsDataRecords[2].Gas7SetPoint = data7.Percent30Setpoint;
- MFCCalibrationTenPointsDataRecords[2].Gas7Calculate = data7.Percent30Calculate;
- MFCCalibrationTenPointsDataRecords[3].Gas7SetPoint = data7.Percent40Setpoint;
- MFCCalibrationTenPointsDataRecords[3].Gas7Calculate = data7.Percent40Calculate;
- MFCCalibrationTenPointsDataRecords[4].Gas7SetPoint = data7.Percent50Setpoint;
- MFCCalibrationTenPointsDataRecords[4].Gas7Calculate = data7.Percent50Calculate;
- MFCCalibrationTenPointsDataRecords[5].Gas7SetPoint = data7.Percent60Setpoint;
- MFCCalibrationTenPointsDataRecords[5].Gas7Calculate = data7.Percent60Calculate;
- MFCCalibrationTenPointsDataRecords[6].Gas7SetPoint = data7.Percent70Setpoint;
- MFCCalibrationTenPointsDataRecords[6].Gas7Calculate = data7.Percent70Calculate;
- MFCCalibrationTenPointsDataRecords[7].Gas7SetPoint = data7.Percent80Setpoint;
- MFCCalibrationTenPointsDataRecords[7].Gas7Calculate = data7.Percent80Calculate;
- MFCCalibrationTenPointsDataRecords[8].Gas7SetPoint = data7.Percent90Setpoint;
- MFCCalibrationTenPointsDataRecords[8].Gas7Calculate = data7.Percent90Calculate;
- MFCCalibrationTenPointsDataRecords[9].Gas7SetPoint = data7.Percent100Setpoint;
- MFCCalibrationTenPointsDataRecords[9].Gas7Calculate = data7.Percent100Calculate;
- }
- var data8 = VerificationDataTenPointsRecords.Where(x => x.Name == $"MfcGas8").FirstOrDefault();
- if (data8 != null)
- {
- MFCCalibrationTenPointsDataRecords[0].Gas8SetPoint = data8.Percent10Setpoint;
- MFCCalibrationTenPointsDataRecords[0].Gas8Calculate = data8.Percent10Calculate;
- MFCCalibrationTenPointsDataRecords[1].Gas8SetPoint = data8.Percent20Setpoint;
- MFCCalibrationTenPointsDataRecords[1].Gas8Calculate = data8.Percent20Calculate;
- MFCCalibrationTenPointsDataRecords[2].Gas8SetPoint = data8.Percent30Setpoint;
- MFCCalibrationTenPointsDataRecords[2].Gas8Calculate = data8.Percent30Calculate;
- MFCCalibrationTenPointsDataRecords[3].Gas8SetPoint = data8.Percent40Setpoint;
- MFCCalibrationTenPointsDataRecords[3].Gas8Calculate = data8.Percent40Calculate;
- MFCCalibrationTenPointsDataRecords[4].Gas8SetPoint = data8.Percent50Setpoint;
- MFCCalibrationTenPointsDataRecords[4].Gas8Calculate = data8.Percent50Calculate;
- MFCCalibrationTenPointsDataRecords[5].Gas8SetPoint = data8.Percent60Setpoint;
- MFCCalibrationTenPointsDataRecords[5].Gas8Calculate = data8.Percent60Calculate;
- MFCCalibrationTenPointsDataRecords[6].Gas8SetPoint = data8.Percent70Setpoint;
- MFCCalibrationTenPointsDataRecords[6].Gas8Calculate = data8.Percent70Calculate;
- MFCCalibrationTenPointsDataRecords[7].Gas8SetPoint = data8.Percent80Setpoint;
- MFCCalibrationTenPointsDataRecords[7].Gas8Calculate = data8.Percent80Calculate;
- MFCCalibrationTenPointsDataRecords[8].Gas8SetPoint = data8.Percent90Setpoint;
- MFCCalibrationTenPointsDataRecords[8].Gas8Calculate = data8.Percent90Calculate;
- MFCCalibrationTenPointsDataRecords[9].Gas8SetPoint = data8.Percent100Setpoint;
- MFCCalibrationTenPointsDataRecords[9].Gas8Calculate = data8.Percent100Calculate;
- }
- var onePointdata1 = VerificationDataOnePointRecords.Where(x => x.Name == $"MfcGas1").FirstOrDefault();
- if (onePointdata1 != null)
- {
- MFCCalibrationOnePointDataRecords[0].Gas1SetPoint = onePointdata1.Setpoint;
- MFCCalibrationOnePointDataRecords[0].Gas1Calculate = onePointdata1.Calculate;
- }
- var onePointdata2 = VerificationDataOnePointRecords.Where(x => x.Name == $"MfcGas2").FirstOrDefault();
- if (onePointdata2 != null)
- {
- MFCCalibrationOnePointDataRecords[0].Gas2SetPoint = onePointdata2.Setpoint;
- MFCCalibrationOnePointDataRecords[0].Gas2Calculate = onePointdata2.Calculate;
- }
- var onePointdata3 = VerificationDataOnePointRecords.Where(x => x.Name == $"MfcGas3").FirstOrDefault();
- if (onePointdata3 != null)
- {
- MFCCalibrationOnePointDataRecords[0].Gas3SetPoint = onePointdata3.Setpoint;
- MFCCalibrationOnePointDataRecords[0].Gas3Calculate = onePointdata3.Calculate;
- }
- var onePointdata4 = VerificationDataOnePointRecords.Where(x => x.Name == $"MfcGas4").FirstOrDefault();
- if (onePointdata4 != null)
- {
- MFCCalibrationOnePointDataRecords[0].Gas4SetPoint = onePointdata4.Setpoint;
- MFCCalibrationOnePointDataRecords[0].Gas4Calculate = onePointdata4.Calculate;
- }
- var onePointdata5 = VerificationDataOnePointRecords.Where(x => x.Name == $"MfcGas5").FirstOrDefault();
- if (onePointdata5 != null)
- {
- MFCCalibrationOnePointDataRecords[0].Gas5SetPoint = onePointdata5.Setpoint;
- MFCCalibrationOnePointDataRecords[0].Gas5Calculate = onePointdata5.Calculate;
- }
- var onePointdata6 = VerificationDataOnePointRecords.Where(x => x.Name == $"MfcGas6").FirstOrDefault();
- if (onePointdata6 != null)
- {
- MFCCalibrationOnePointDataRecords[0].Gas6SetPoint = onePointdata6.Setpoint;
- MFCCalibrationOnePointDataRecords[0].Gas6Calculate = onePointdata6.Calculate;
- }
- var onePointdata7 = VerificationDataOnePointRecords.Where(x => x.Name == $"MfcGas7").FirstOrDefault();
- if (onePointdata7 != null)
- {
- MFCCalibrationOnePointDataRecords[0].Gas7SetPoint = onePointdata7.Setpoint;
- MFCCalibrationOnePointDataRecords[0].Gas7Calculate = onePointdata7.Calculate;
- }
- var onePointdata8 = VerificationDataOnePointRecords.Where(x => x.Name == $"MfcGas8").FirstOrDefault();
- if (onePointdata8 != null)
- {
- MFCCalibrationOnePointDataRecords[0].Gas8SetPoint = onePointdata8.Setpoint;
- MFCCalibrationOnePointDataRecords[0].Gas8Calculate = onePointdata8.Calculate;
- }
- }
- #endregion
- }
- }
|