| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548 | 
							- using System;
 
- using System.Collections.Generic;
 
- using System.Collections.ObjectModel;
 
- using System.Linq;
 
- using System.Text;
 
- using System.Threading.Tasks;
 
- 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;
 
- namespace Venus_MainPages.ViewModels
 
- {
 
-     public class MFCVerificationViewModel : BindableBase
 
-     {
 
-         #region 私有字段
 
-         private AITMfcData m_MFCData;
 
-         //private AITMfcData m_MFC1Data;
 
-         //private AITMfcData m_MFC2Data;
 
-         //private AITMfcData m_MFC3Data;
 
-         //private AITMfcData m_MFC4Data;
 
-         //private AITMfcData m_MFC5Data;
 
-         //private AITMfcData m_MFC6Data;
 
-         //private AITMfcData m_MFC7Data;
 
-         //private AITMfcData m_MFC8Data;
 
-         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<MFCVerificationTenPointsData> m_VerificationTenPointsDataRecords = new ObservableCollection<MFCVerificationTenPointsData>();
 
-         private ObservableCollection<MFCCalibrationTenPointsData> m_MFCCalibrationTenPointsData = new ObservableCollection<MFCCalibrationTenPointsData>();
 
-         private PMState m_PMCurrentState;
 
-         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);
 
-             }
 
-         }
 
-         #endregion
 
-         #region 属性
 
-         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 AITMfcData MFC1Data
 
-         //{
 
-         //    get { return m_MFC1Data; }
 
-         //    set { SetProperty(ref m_MFC1Data, value); }
 
-         //}
 
-         //public AITMfcData MFC2Data
 
-         //{
 
-         //    get { return m_MFC2Data; }
 
-         //    set { SetProperty(ref m_MFC2Data, value); }
 
-         //}
 
-         //public AITMfcData MFC3Data
 
-         //{
 
-         //    get { return m_MFC3Data; }
 
-         //    set { SetProperty(ref m_MFC3Data, value); }
 
-         //}
 
-         //public AITMfcData MFC4Data
 
-         //{
 
-         //    get { return m_MFC4Data; }
 
-         //    set { SetProperty(ref m_MFC4Data, value); }
 
-         //}
 
-         //public AITMfcData MFC5Data
 
-         //{
 
-         //    get { return m_MFC5Data; }
 
-         //    set { SetProperty(ref m_MFC5Data, value); }
 
-         //}
 
-         //public AITMfcData MFC6Data
 
-         //{
 
-         //    get { return m_MFC6Data; }
 
-         //    set { SetProperty(ref m_MFC6Data, value); }
 
-         //}
 
-         //public AITMfcData MFC7Data
 
-         //{
 
-         //    get { return m_MFC7Data; }
 
-         //    set { SetProperty(ref m_MFC7Data, value); }
 
-         //}
 
-         //public AITMfcData MFC8Data
 
-         //{
 
-         //    get { return m_MFC8Data; }
 
-         //    set { SetProperty(ref m_MFC8Data, 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); }
 
-         }
 
-         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<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); }
 
-         }
 
-         
 
-         #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 _SelectGasCommand;
 
-         public DelegateCommand SelectGasCommand =>
 
-             _SelectGasCommand ?? (_SelectGasCommand = new DelegateCommand(OnSelectGas));
 
-         private DelegateCommand _LoadCommand;
 
-         public DelegateCommand LoadCommand =>
 
-             _LoadCommand ?? (_LoadCommand = new DelegateCommand(OnLoad));
 
-         #endregion
 
-         public MFCVerificationViewModel()
 
-         {         
 
-             timer.Interval = TimeSpan.FromSeconds(1);
 
-             timer.Tick += Timer_Tick;
 
-             timer.Start();
 
-             for (int i = 0; i < 10; i++)
 
-             {
 
-                 MFCCalibrationTenPointsDataRecords.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");
 
-         }
 
-         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()
 
-         {
 
-             InitTable();
 
-         }
 
-         #endregion
 
-         #region 私有方法
 
-         private void Timer_Tick(object sender, EventArgs e)
 
-         {
 
-             //MFCCalibrationData =(ObservableCollection<MFCCalibrationData>) QueryDataClient.Instance.Service.GetData($"{ModuleName}.MFCCalibrationDatas");
 
-             PMCurrentState = (PMState)QueryDataClient.Instance.Service.GetData($"{ModuleName}.FsmState");
 
-         }
 
-         public void Init()
 
-         {
 
-             OnSelectGas();
 
-         }
 
-         private void InitTable()
 
-         {
 
-             var onePointData = QueryDataClient.Instance.Service.GetMFCVerificationOnePointData();
 
-             if (onePointData != null)
 
-             {
 
-                 VerificationDataOnePointRecords = new ObservableCollection<MFCVerificationOnePointData>(onePointData);
 
-             }
 
-             var tenPointsData = QueryDataClient.Instance.Service.GetMFCVerificationTenPointsData();
 
-             if (tenPointsData != null)
 
-             {
 
-                 VerificationDataTenPointsRecords = new ObservableCollection<MFCVerificationTenPointsData>(tenPointsData);
 
-             }
 
-             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;
 
-             }
 
-         }
 
-         #endregion
 
-     }
 
- }
 
 
  |