using System;
using System.Linq;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

using SmartX;
using INT_PT002.Forms;
using INT_PT002.DataStore;

namespace INT_PT002.Controls
{
    public partial class ControlMenuSystemStatus1 : UserControl
    {
        #region Field
        private FormMenu m_ParentForm;

        private Color ColorProgressOn;
        private Color ColorProgressOff;
        private Color ColorResultPass;
        private Color ColorResultNG;
        private Color ColorResultNone;

        private int CheckLane;

        private Collection<SmartLabel> CollectionLabelResult;
        private Collection<SmartLabel> CollectionLabelProgress;

        private Collection<SmartLabel> CollectionDiffSecDiff;
        private Collection<SmartLabel> CollectionPressureWork;
        private Collection<SmartLabel> CollectionPressureMaster;
        #endregion

        #region Constructor
        public ControlMenuSystemStatus1(FormMenu parent)
        {
            InitializeComponent();

            this.ParentForm = parent;
            this.Initialize();
            this.InitializeData();
            this.InitializeDraw();
        }
        #endregion

        #region Property
        public FormMenu ParentForm
        {
            get { return this.m_ParentForm; }
            private set { this.m_ParentForm = value; }
        }
        #endregion

        #region Method
        private void Initialize()
        {
            this.smartGroupBox1.Text = "System > Equipment";

            this.ColorProgressOff = Color.Azure;
            this.ColorProgressOn = Color.Lime;
            this.ColorResultPass = Color.Green;
            this.ColorResultNG = Color.Red;
            this.ColorResultNone = Color.White;

            this.CheckLane = 0;

            this.CollectionLabelProgress = new Collection<SmartLabel>();
            this.CollectionLabelProgress.Clear();
            this.CollectionLabelProgress.Add(this.labelProgress1);
            this.CollectionLabelProgress.Add(this.labelProgress2);
            this.CollectionLabelProgress.Add(this.labelProgress3);
            this.CollectionLabelProgress.Add(this.labelProgress4);
            this.CollectionLabelProgress.Add(this.labelProgress5);
            this.CollectionLabelProgress.Add(this.labelProgress6);
            this.CollectionLabelProgress.Add(this.labelProgress7);
            this.CollectionLabelProgress.Add(this.labelProgress8);
            this.CollectionLabelProgress.Add(this.labelProgress9);
            this.CollectionLabelProgress.Add(this.labelProgress10);
            this.CollectionLabelProgress.Add(this.labelProgress11);

            this.CollectionLabelResult = new Collection<SmartLabel>();
            this.CollectionLabelResult.Add(this.labelResult1);
            this.CollectionLabelResult.Add(this.labelResult2);
            this.CollectionLabelResult.Add(this.labelResult3);
            this.CollectionLabelResult.Add(this.labelResult4);
            this.CollectionLabelResult.Add(this.labelResult5);
            this.CollectionLabelResult.Add(this.labelResult6);
            this.CollectionLabelResult.Add(this.labelResult7);
            this.CollectionLabelResult.Add(this.labelResult8);
            this.CollectionLabelResult.Add(this.labelResult9);
            this.CollectionLabelResult.Add(this.labelResult10);

            this.CollectionDiffSecDiff = new Collection<SmartLabel>();
            this.CollectionDiffSecDiff.Add(this.labelDiffSecDiff1);
            this.CollectionDiffSecDiff.Add(this.labelDiffSecDiff2);
            this.CollectionDiffSecDiff.Add(this.labelDiffSecDiff3);
            this.CollectionDiffSecDiff.Add(this.labelDiffSecDiff4);
            this.CollectionDiffSecDiff.Add(this.labelDiffSecDiff5);
            this.CollectionDiffSecDiff.Add(this.labelDiffSecDiff6);
            this.CollectionDiffSecDiff.Add(this.labelDiffSecDiff7);
            this.CollectionDiffSecDiff.Add(this.labelDiffSecDiff8);
            this.CollectionDiffSecDiff.Add(this.labelDiffSecDiff9);
            this.CollectionDiffSecDiff.Add(this.labelDiffSecDiff10);

            this.CollectionPressureWork = new Collection<SmartLabel>();
            this.CollectionPressureWork.Add(this.labelPressureWorking1);
            this.CollectionPressureWork.Add(this.labelPressureWorking2);
            this.CollectionPressureWork.Add(this.labelPressureWorking3);
            this.CollectionPressureWork.Add(this.labelPressureWorking4);
            this.CollectionPressureWork.Add(this.labelPressureWorking5);
            this.CollectionPressureWork.Add(this.labelPressureWorking6);
            this.CollectionPressureWork.Add(this.labelPressureWorking7);
            this.CollectionPressureWork.Add(this.labelPressureWorking8);
            this.CollectionPressureWork.Add(this.labelPressureWorking9);
            this.CollectionPressureWork.Add(this.labelPressureWorking10);

            this.CollectionPressureMaster = new Collection<SmartLabel>();
            this.CollectionPressureMaster.Add(this.labelPressureMaster1);
            this.CollectionPressureMaster.Add(this.labelPressureMaster2);
            this.CollectionPressureMaster.Add(this.labelPressureMaster3);
            this.CollectionPressureMaster.Add(this.labelPressureMaster4);
            this.CollectionPressureMaster.Add(this.labelPressureMaster5);
            this.CollectionPressureMaster.Add(this.labelPressureMaster6);
            this.CollectionPressureMaster.Add(this.labelPressureMaster7);
            this.CollectionPressureMaster.Add(this.labelPressureMaster8);
            this.CollectionPressureMaster.Add(this.labelPressureMaster9);
            this.CollectionPressureMaster.Add(this.labelPressureMaster10);
        }
        private void InitializeData()
        {
            for (int i = 0; i < this.ParentForm.ParentForm.SystemConfig.EQUIPMENT_LANE; i++)
            {
                this.CollectionLabelResult[i].Text = "-";
                this.CollectionLabelResult[i].TextColor = this.ColorResultNone;
                this.CollectionLabelResult[i].Visible = false;
                this.CollectionDiffSecDiff[i].Text = "0.00";
                this.CollectionPressureWork[i].Text = "0.0";
                this.CollectionPressureMaster[i].Text = "0.0";
            }

            this.InitializeMeasuringData();
        }
        private void InitializeDraw()
        {
            // SetChartConfig
            this.smartDraw1.Chart.SetChartConfig(10, 242, 405, 230, 2, SmartDraw.ChartRefresh.LEFTSCROLL);
            this.smartDraw2.Chart.SetChartConfig(10, 242, 405, 230, 2, SmartDraw.ChartRefresh.LEFTSCROLL);

            // BackLayer 기준선 표시
            this.smartDraw1.BackLayer.SetPenStyle(Color.Gray, 2);
            this.smartDraw2.BackLayer.SetPenStyle(Color.Gray, 2);
            // BackLayer 세로
            this.smartDraw1.BackLayer.Line(10, 12, 10, 242);
            this.smartDraw2.BackLayer.Line(10, 12, 10, 242);
            // BackLayer 가로 -2.000
            this.smartDraw1.BackLayer.Line(10, 242, 405, 242);
            this.smartDraw2.BackLayer.Line(10, 242, 405, 242);

            this.smartDraw1.Chart.ChartChannelPenStyle = this.smartDraw_ChartChannelPenStyle1;
            this.smartDraw2.Chart.ChartChannelPenStyle = this.smartDraw_ChartChannelPenStyle1;
        }
        private void InitializeMeasuringData()
        {
            // Measuring : 1 Lane
            this.labelMesResult1.Text = "-";
            this.labelMesDispRData1.Text = "0.00";
            this.labelMesDispMData1.Text = "0.00";
            this.labelMesDispMDataDiff1.Text = "0.00";
            this.labelMesDispSTD1.Text = "0.00";
            this.labelMesDiffMadc1.Text = "0.00";
            this.labelMesDiffSecDiff1.Text = "0.00";
            this.labelMesDiffSecSum1.Text = "0.00";
            this.labelMesDiffMean1.Text = "0.00";
            this.labelMesPressureMaster1.Text = "0.0";
            this.labelMesPressureWork1.Text = "0.0";

            // Measuring : 2 Lane
            this.labelMesResult2.Text = "-";
            this.labelMesDispRData2.Text = "0.00";
            this.labelMesDispMData2.Text = "0.00";
            this.labelMesDispMDataDiff2.Text = "0.00";
            this.labelMesDispSTD2.Text = "0.00";
            this.labelMesDiffMadc2.Text = "0.00";
            this.labelMesDiffSecDiff2.Text = "0.00";
            this.labelMesDiffSecSum2.Text = "0.00";
            this.labelMesDiffMean2.Text = "0.00";
            this.labelMesPressureMaster2.Text = "0.0";
            this.labelMesPressureWork2.Text = "0.0";

            this.smartDraw1.Chart.PutDataAllClear();
            this.smartDraw2.Chart.PutDataAllClear();
        }

        private void GetJudgmentResult(Define.E_JudgmentStatus judg, SmartLabel label2)
        {
            string value = "";

            switch (judg)
            {
                case Define.E_JudgmentStatus.None:
                    value = "-";
                    label2.TextColor = this.ColorResultNone;
                    label2.Font = new Font("New Gulim", 20, FontStyle.Bold);
                    break;
                case Define.E_JudgmentStatus.Pass:
                    value = "Pass";
                    label2.TextColor = this.ColorResultPass;
                    label2.Font = new Font("New Gulim", 20, FontStyle.Bold);
                    break;
                case Define.E_JudgmentStatus.Ng:
                    value = "Leak";
                    label2.TextColor = this.ColorResultNG;
                    label2.Font = new Font("New Gulim", 20, FontStyle.Bold);
                    break;
                case Define.E_JudgmentStatus.Error:
                    value = "Empty";
                    label2.TextColor = this.ColorResultNone;
                    label2.Font = new Font("New Gulim", 20, FontStyle.Bold);
                    break;
                default:
                    break;
            }

            if (label2.Text != value)
                label2.Text = value;
        }

        private void UpdateDisplayDotGraphDiff(SmartDraw draw, DiffData diff)
        {
            int iValue = 0;
            double dValue = 0.0, value = 0.0;

            //// 값 표시 범위
            //// 1000 ~ 0
            //// 그래프 영역 높이 230
            //// 1000 / 102 = 4.347826086956522
            //value = double.Parse(diff.SecBufDiff);
            //dValue = int.Parse(string.Format("{0:0}", value)) / 4.347826086956522;

            // 값 표시 범위
            // 200 ~ 0
            // 그래프 영역 높이 230
            // 200 / 102 = 1.96078431372549
            value = double.Parse(diff.SecBufDiff);
            dValue = int.Parse(string.Format("{0:0}", value)) / 1.96078431372549;

            if (dValue > 230)
                dValue = 230;
            if (dValue < 1)
                dValue = 3;

            iValue = int.Parse(string.Format("{0:f0}", dValue));

            draw.Chart.PutData(iValue);
        }
        private void UpdateDisplayDotGraphDisp(SmartDraw draw, DispData disp)
        {
            int iValue = 0;
            double dValue = 0.0;

            // 값 표시 범위
            // 15.000 ~ -2.000  (17.000 ~ 0)
            // 그래프 영역 높이 102
            // 17000 / 102 = 166.666666~
            //dValue = (int.Parse(data.CurrentValueSign + data.CurrentValue) + 2000) / 166.66666;

            if (dValue > 110)
                dValue = 110;
            if (dValue < 1)
                dValue = 1;

            iValue = int.Parse(string.Format("{0:f0}", dValue));

            draw.Chart.PutData(iValue);
        }
        public void UpdateEquipmentStatusDisplay(Define.E_EquipmentStatus status)
        {
            if (status == Define.E_EquipmentStatus.Start)
            {
                #region Start
                //this.labelStart.Visible = true;
                //this.labelStop.Visible = false;
                #endregion
            }
            else
            {
                #region Stop
                //this.labelStart.Visible = false;
                //this.labelStop.Visible = true;
                #endregion
            }
        }
        public void UpdateDisplayAlarmView(AlarmList alarm)
        {

        }

        // Process
        public void UpdateDisplayProcessStatus(Define.E_ProcessStatus status)
        {
            switch (status)
            {
                case Define.E_ProcessStatus._0_None:
                    break;
                case Define.E_ProcessStatus._1_Ready:
                    if (this.labelProgress1.BackGroundColor != this.ColorProgressOn) this.labelProgress1.BackGroundColor = this.ColorProgressOn;
                    if (this.labelProgress2.BackGroundColor != this.ColorProgressOff) this.labelProgress2.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress3.BackGroundColor != this.ColorProgressOff) this.labelProgress3.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress4.BackGroundColor != this.ColorProgressOff) this.labelProgress4.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress5.BackGroundColor != this.ColorProgressOff) this.labelProgress5.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress6.BackGroundColor != this.ColorProgressOff) this.labelProgress6.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress7.BackGroundColor != this.ColorProgressOff) this.labelProgress7.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress8.BackGroundColor != this.ColorProgressOff) this.labelProgress8.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress9.BackGroundColor != this.ColorProgressOff) this.labelProgress9.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress10.BackGroundColor != this.ColorProgressOff) this.labelProgress10.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress11.BackGroundColor != this.ColorProgressOff) this.labelProgress11.BackGroundColor = this.ColorProgressOff;
                    break;
                case Define.E_ProcessStatus._2_ProductEntry:
                    if (this.labelProgress1.BackGroundColor != this.ColorProgressOff) this.labelProgress1.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress2.BackGroundColor != this.ColorProgressOn) this.labelProgress2.BackGroundColor = this.ColorProgressOn;
                    if (this.labelProgress3.BackGroundColor != this.ColorProgressOff) this.labelProgress3.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress4.BackGroundColor != this.ColorProgressOff) this.labelProgress4.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress5.BackGroundColor != this.ColorProgressOff) this.labelProgress5.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress6.BackGroundColor != this.ColorProgressOff) this.labelProgress6.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress7.BackGroundColor != this.ColorProgressOff) this.labelProgress7.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress8.BackGroundColor != this.ColorProgressOff) this.labelProgress8.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress9.BackGroundColor != this.ColorProgressOff) this.labelProgress9.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress10.BackGroundColor != this.ColorProgressOff) this.labelProgress10.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress11.BackGroundColor != this.ColorProgressOff) this.labelProgress11.BackGroundColor = this.ColorProgressOff;
                   
                    this.InitializeData();
                    break;
                case Define.E_ProcessStatus._3_MoveToLeak:
                    if (this.labelProgress1.BackGroundColor != this.ColorProgressOff) this.labelProgress1.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress2.BackGroundColor != this.ColorProgressOff) this.labelProgress2.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress3.BackGroundColor != this.ColorProgressOn) this.labelProgress3.BackGroundColor = this.ColorProgressOn;
                    if (this.labelProgress4.BackGroundColor != this.ColorProgressOff) this.labelProgress4.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress5.BackGroundColor != this.ColorProgressOff) this.labelProgress5.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress6.BackGroundColor != this.ColorProgressOff) this.labelProgress6.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress7.BackGroundColor != this.ColorProgressOff) this.labelProgress7.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress8.BackGroundColor != this.ColorProgressOff) this.labelProgress8.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress9.BackGroundColor != this.ColorProgressOff) this.labelProgress9.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress10.BackGroundColor != this.ColorProgressOff) this.labelProgress10.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress11.BackGroundColor != this.ColorProgressOff) this.labelProgress11.BackGroundColor = this.ColorProgressOff;
                    break;
                case Define.E_ProcessStatus._4_MoveToCheck:
                    if (this.labelProgress1.BackGroundColor != this.ColorProgressOff) this.labelProgress1.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress2.BackGroundColor != this.ColorProgressOff) this.labelProgress2.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress3.BackGroundColor != this.ColorProgressOff) this.labelProgress3.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress4.BackGroundColor != this.ColorProgressOn) this.labelProgress4.BackGroundColor = this.ColorProgressOn;
                    if (this.labelProgress5.BackGroundColor != this.ColorProgressOff) this.labelProgress5.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress6.BackGroundColor != this.ColorProgressOff) this.labelProgress6.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress7.BackGroundColor != this.ColorProgressOff) this.labelProgress7.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress8.BackGroundColor != this.ColorProgressOff) this.labelProgress8.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress9.BackGroundColor != this.ColorProgressOff) this.labelProgress9.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress10.BackGroundColor != this.ColorProgressOff) this.labelProgress10.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress11.BackGroundColor != this.ColorProgressOff) this.labelProgress11.BackGroundColor = this.ColorProgressOff;
                    break;
                case Define.E_ProcessStatus._5_ChamberMerge:
                    if (this.labelProgress1.BackGroundColor != this.ColorProgressOff) this.labelProgress1.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress2.BackGroundColor != this.ColorProgressOff) this.labelProgress2.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress3.BackGroundColor != this.ColorProgressOff) this.labelProgress3.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress4.BackGroundColor != this.ColorProgressOff) this.labelProgress4.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress5.BackGroundColor != this.ColorProgressOn) this.labelProgress5.BackGroundColor = this.ColorProgressOn;
                    if (this.labelProgress6.BackGroundColor != this.ColorProgressOff) this.labelProgress6.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress7.BackGroundColor != this.ColorProgressOff) this.labelProgress7.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress8.BackGroundColor != this.ColorProgressOff) this.labelProgress8.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress9.BackGroundColor != this.ColorProgressOff) this.labelProgress9.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress10.BackGroundColor != this.ColorProgressOff) this.labelProgress10.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress11.BackGroundColor != this.ColorProgressOff) this.labelProgress11.BackGroundColor = this.ColorProgressOff;
                    break;
                case Define.E_ProcessStatus._6_VacuumStart:
                    if (this.labelProgress1.BackGroundColor != this.ColorProgressOff) this.labelProgress1.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress2.BackGroundColor != this.ColorProgressOff) this.labelProgress2.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress3.BackGroundColor != this.ColorProgressOff) this.labelProgress3.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress4.BackGroundColor != this.ColorProgressOff) this.labelProgress4.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress5.BackGroundColor != this.ColorProgressOff) this.labelProgress5.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress6.BackGroundColor != this.ColorProgressOn) this.labelProgress6.BackGroundColor = this.ColorProgressOn;
                    if (this.labelProgress7.BackGroundColor != this.ColorProgressOff) this.labelProgress7.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress8.BackGroundColor != this.ColorProgressOff) this.labelProgress8.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress9.BackGroundColor != this.ColorProgressOff) this.labelProgress9.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress10.BackGroundColor != this.ColorProgressOff) this.labelProgress10.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress11.BackGroundColor != this.ColorProgressOff) this.labelProgress11.BackGroundColor = this.ColorProgressOff;
                    break;
                case Define.E_ProcessStatus._7_VacuumHold:
                    if (this.labelProgress1.BackGroundColor != this.ColorProgressOff) this.labelProgress1.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress2.BackGroundColor != this.ColorProgressOff) this.labelProgress2.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress3.BackGroundColor != this.ColorProgressOff) this.labelProgress3.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress4.BackGroundColor != this.ColorProgressOff) this.labelProgress4.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress5.BackGroundColor != this.ColorProgressOff) this.labelProgress5.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress6.BackGroundColor != this.ColorProgressOff) this.labelProgress6.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress7.BackGroundColor != this.ColorProgressOn) this.labelProgress7.BackGroundColor = this.ColorProgressOn;
                    if (this.labelProgress8.BackGroundColor != this.ColorProgressOff) this.labelProgress8.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress9.BackGroundColor != this.ColorProgressOff) this.labelProgress9.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress10.BackGroundColor != this.ColorProgressOff) this.labelProgress10.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress11.BackGroundColor != this.ColorProgressOff) this.labelProgress11.BackGroundColor = this.ColorProgressOff;
                    break;
                case Define.E_ProcessStatus._8_Judgment:
                    if (this.labelProgress1.BackGroundColor != this.ColorProgressOff) this.labelProgress1.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress2.BackGroundColor != this.ColorProgressOff) this.labelProgress2.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress3.BackGroundColor != this.ColorProgressOff) this.labelProgress3.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress4.BackGroundColor != this.ColorProgressOff) this.labelProgress4.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress5.BackGroundColor != this.ColorProgressOff) this.labelProgress5.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress6.BackGroundColor != this.ColorProgressOff) this.labelProgress6.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress7.BackGroundColor != this.ColorProgressOff) this.labelProgress7.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress8.BackGroundColor != this.ColorProgressOn) this.labelProgress8.BackGroundColor = this.ColorProgressOn;
                    if (this.labelProgress9.BackGroundColor != this.ColorProgressOff) this.labelProgress9.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress10.BackGroundColor != this.ColorProgressOff) this.labelProgress10.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress11.BackGroundColor != this.ColorProgressOff) this.labelProgress11.BackGroundColor = this.ColorProgressOff;
                    break;
                case Define.E_ProcessStatus._9_VacuumBreak:
                    if (this.labelProgress1.BackGroundColor != this.ColorProgressOff) this.labelProgress1.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress2.BackGroundColor != this.ColorProgressOff) this.labelProgress2.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress3.BackGroundColor != this.ColorProgressOff) this.labelProgress3.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress4.BackGroundColor != this.ColorProgressOff) this.labelProgress4.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress5.BackGroundColor != this.ColorProgressOff) this.labelProgress5.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress6.BackGroundColor != this.ColorProgressOff) this.labelProgress6.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress7.BackGroundColor != this.ColorProgressOff) this.labelProgress7.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress8.BackGroundColor != this.ColorProgressOff) this.labelProgress8.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress9.BackGroundColor != this.ColorProgressOn) this.labelProgress9.BackGroundColor = this.ColorProgressOn;
                    if (this.labelProgress10.BackGroundColor != this.ColorProgressOff) this.labelProgress10.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress11.BackGroundColor != this.ColorProgressOff) this.labelProgress11.BackGroundColor = this.ColorProgressOff;
                    break;
                case Define.E_ProcessStatus._10_ChamberRelease:
                    if (this.labelProgress1.BackGroundColor != this.ColorProgressOff) this.labelProgress1.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress2.BackGroundColor != this.ColorProgressOff) this.labelProgress2.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress3.BackGroundColor != this.ColorProgressOff) this.labelProgress3.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress4.BackGroundColor != this.ColorProgressOff) this.labelProgress4.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress5.BackGroundColor != this.ColorProgressOff) this.labelProgress5.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress6.BackGroundColor != this.ColorProgressOff) this.labelProgress6.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress7.BackGroundColor != this.ColorProgressOff) this.labelProgress7.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress8.BackGroundColor != this.ColorProgressOff) this.labelProgress8.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress9.BackGroundColor != this.ColorProgressOff) this.labelProgress9.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress10.BackGroundColor != this.ColorProgressOn) this.labelProgress10.BackGroundColor = this.ColorProgressOn;
                    if (this.labelProgress11.BackGroundColor != this.ColorProgressOff) this.labelProgress11.BackGroundColor = this.ColorProgressOff;
                    break;
                case Define.E_ProcessStatus._11_MoveToReady:
                    if (this.labelProgress1.BackGroundColor != this.ColorProgressOff) this.labelProgress1.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress2.BackGroundColor != this.ColorProgressOff) this.labelProgress2.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress3.BackGroundColor != this.ColorProgressOff) this.labelProgress3.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress4.BackGroundColor != this.ColorProgressOff) this.labelProgress4.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress5.BackGroundColor != this.ColorProgressOff) this.labelProgress5.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress6.BackGroundColor != this.ColorProgressOff) this.labelProgress6.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress7.BackGroundColor != this.ColorProgressOff) this.labelProgress7.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress8.BackGroundColor != this.ColorProgressOff) this.labelProgress8.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress9.BackGroundColor != this.ColorProgressOff) this.labelProgress9.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress10.BackGroundColor != this.ColorProgressOff) this.labelProgress10.BackGroundColor = this.ColorProgressOff;
                    if (this.labelProgress11.BackGroundColor != this.ColorProgressOn) this.labelProgress11.BackGroundColor = this.ColorProgressOn;
                    break;
                default:
                    break;
            }
        }
        public void UpdateDisplayProcessStatusMeasuring1(Define.E_ProcessStatus status, string lane)
        {
            string value = "";

            if (status == Define.E_ProcessStatus._4_MoveToCheck || status == Define.E_ProcessStatus._5_ChamberMerge)
            {
                value = string.Format("Lane {0}", lane);
                if (this.labelMesResult1.Text != value)
                    this.labelMesResult1.Text = value;
            }
        }
        public void UpdateDisplayProcessStatusMeasuring2(Define.E_ProcessStatus status, string lane)
        {
            string value = "";

            if (status == Define.E_ProcessStatus._4_MoveToCheck || status == Define.E_ProcessStatus._5_ChamberMerge)
            {
                value = string.Format("Lane {0}", lane);
                if (this.labelMesResult2.Text != value)
                    this.labelMesResult2.Text = value;
            }
        }

        private void UpdateDisplayMeasuringLeakDataDiff1(DiffData data)
        {
            string value = "";

            // 차압센서 데이터
            value = data.MAdc;
            if (this.labelMesDiffMadc1.Text != value)
                this.labelMesDiffMadc1.Text = value;

            value = data.SecBufDiff;
            if (this.labelMesDiffSecDiff1.Text != value)
                this.labelMesDiffSecDiff1.Text = value;

            value = data.SecBufSum;
            if (this.labelMesDiffSecSum1.Text != value)
                this.labelMesDiffSecSum1.Text = value;

            value = data.DiffMean;
            if (this.labelMesDiffMean1.Text != value)
                this.labelMesDiffMean1.Text = value;
        }
        private void UpdateDisplayMeasuringLeakDataDisp1(DispData data)
        {
            string value = "";

            // 변위센서 데이터
            value = data.RData;
            if (this.labelMesDispRData1.Text != value)
                this.labelMesDispRData1.Text = value;

            value = data.MData;
            if (this.labelMesDispMData1.Text != value)
                this.labelMesDispMData1.Text = value;

            value = data.MDataDiff;
            if (this.labelMesDispMDataDiff1.Text != value)
                this.labelMesDispMDataDiff1.Text = value;

            value = data.STD;
            if (this.labelMesDispSTD1.Text != value)
                this.labelMesDispSTD1.Text = value;

        }
        private void UpdateDisplayMeasuringLeakDataPres1(PressureData data)
        {
            string value = "";

            // 압력 데이터
            value = data.WorkingChamber;
            if (this.labelMesPressureWork1.Text != value)
                this.labelMesPressureWork1.Text = value;

            value = data.MasterChamber;
            if (this.labelMesPressureMaster1.Text != value)
                this.labelMesPressureMaster1.Text = value;
        }
        private void UpdateDisplayMeasuringLeakDataDiff2(DiffData data)
        {
            string value = "";

            // 차압센서 데이터
            value = data.MAdc;
            if (this.labelMesDiffMadc2.Text != value)
                this.labelMesDiffMadc2.Text = value;

            value = data.SecBufDiff;
            if (this.labelMesDiffSecDiff2.Text != value)
                this.labelMesDiffSecDiff2.Text = value;

            value = data.SecBufSum;
            if (this.labelMesDiffSecSum2.Text != value)
                this.labelMesDiffSecSum2.Text = value;

            value = data.DiffMean;
            if (this.labelMesDiffMean2.Text != value)
                this.labelMesDiffMean2.Text = value;
        }
        private void UpdateDisplayMeasuringLeakDataDisp2(DispData data)
        {
            string value = "";

            // 변위센서 데이터
            value = data.RData;
            if (this.labelMesDispRData2.Text != value)
                this.labelMesDispRData2.Text = value;

            value = data.MData;
            if (this.labelMesDispMData2.Text != value)
                this.labelMesDispMData2.Text = value;

            value = data.MDataDiff;
            if (this.labelMesDispMDataDiff2.Text != value)
                this.labelMesDispMDataDiff2.Text = value;

            value = data.STD;
            if (this.labelMesDispSTD2.Text != value)
                this.labelMesDispSTD2.Text = value;

        }
        private void UpdateDisplayMeasuringLeakDataPres2(PressureData data)
        {
            string value = "";

            // 압력 데이터
            value = data.WorkingChamber;
            if (this.labelMesPressureWork2.Text != value)
                this.labelMesPressureWork2.Text = value;

            value = data.MasterChamber;
            if (this.labelMesPressureMaster2.Text != value)
                this.labelMesPressureMaster2.Text = value;
        }
        // 차압센서 데이터
        public void UpdateDisplayDiffData(Collection<DiffData> datas)
        {
            string value = "";

            for (int i = 0; i < this.ParentForm.ParentForm.SystemConfig.EQUIPMENT_LANE; i++)
            {
                value = datas[i].SecBufDiff;
                if (this.CollectionDiffSecDiff[i].Text != value)
                    this.CollectionDiffSecDiff[i].Text = value;
            }
        }
        public void UpdateDisplayDiffData1(LeakData1 data)
        {
            string value = "";

            value = data.DiffData.SecBufDiff;
            if (this.CollectionDiffSecDiff[0].Text != value)
                this.CollectionDiffSecDiff[0].Text = value;

            this.UpdateDisplayMeasuringLeakDataDiff1(data.DiffData);
            this.UpdateDisplayDotGraphDiff(this.smartDraw1, data.DiffData);
        }
        public void UpdateDisplayDiffData2(LeakData1 data)
        {
            string value = "";

            value = data.DiffData.SecBufDiff;
            if (this.CollectionDiffSecDiff[1].Text != value)
                this.CollectionDiffSecDiff[1].Text = value;

            this.UpdateDisplayMeasuringLeakDataDiff2(data.DiffData);
            this.UpdateDisplayDotGraphDiff(this.smartDraw2, data.DiffData);
        }
        public void UpdateDisplayDiffData3(LeakData1 data)
        {
            string value = "";

            value = data.DiffData.SecBufDiff;
            if (this.CollectionDiffSecDiff[2].Text != value)
                this.CollectionDiffSecDiff[2].Text = value;

            this.UpdateDisplayMeasuringLeakDataDiff1(data.DiffData);
            this.UpdateDisplayDotGraphDiff(this.smartDraw1, data.DiffData);
        }
        public void UpdateDisplayDiffData4(LeakData1 data)
        {
            string value = "";

            value = data.DiffData.SecBufDiff;
            if (this.CollectionDiffSecDiff[3].Text != value)
                this.CollectionDiffSecDiff[3].Text = value;

            this.UpdateDisplayMeasuringLeakDataDiff2(data.DiffData);
            this.UpdateDisplayDotGraphDiff(this.smartDraw2, data.DiffData);
        }
        public void UpdateDisplayDiffData5(LeakData1 data)
        {
            string value = "";

            value = data.DiffData.SecBufDiff;
            if (this.CollectionDiffSecDiff[4].Text != value)
                this.CollectionDiffSecDiff[4].Text = value;

            this.UpdateDisplayMeasuringLeakDataDiff1(data.DiffData);
            this.UpdateDisplayDotGraphDiff(this.smartDraw1, data.DiffData);
        }
        public void UpdateDisplayDiffData6(LeakData1 data)
        {
            string value = "";

            value = data.DiffData.SecBufDiff;
            if (this.CollectionDiffSecDiff[5].Text != value)
                this.CollectionDiffSecDiff[5].Text = value;

            this.UpdateDisplayMeasuringLeakDataDiff2(data.DiffData);
            this.UpdateDisplayDotGraphDiff(this.smartDraw2, data.DiffData);
        }
        public void UpdateDisplayDiffData7(LeakData1 data)
        {
            string value = "";

            value = data.DiffData.SecBufDiff;
            if (this.CollectionDiffSecDiff[6].Text != value)
                this.CollectionDiffSecDiff[6].Text = value;

            this.UpdateDisplayMeasuringLeakDataDiff1(data.DiffData);
            this.UpdateDisplayDotGraphDiff(this.smartDraw1, data.DiffData);
        }
        public void UpdateDisplayDiffData8(LeakData1 data)
        {
            string value = "";

            value = data.DiffData.SecBufDiff;
            if (this.CollectionDiffSecDiff[7].Text != value)
                this.CollectionDiffSecDiff[7].Text = value;

            this.UpdateDisplayMeasuringLeakDataDiff2(data.DiffData);
            this.UpdateDisplayDotGraphDiff(this.smartDraw2, data.DiffData);
        }
        public void UpdateDisplayDiffData9(LeakData1 data)
        {
            string value = "";

            value = data.DiffData.SecBufDiff;
            if (this.CollectionDiffSecDiff[8].Text != value)
                this.CollectionDiffSecDiff[8].Text = value;

            this.UpdateDisplayMeasuringLeakDataDiff1(data.DiffData);
            this.UpdateDisplayDotGraphDiff(this.smartDraw1, data.DiffData);
        }
        public void UpdateDisplayDiffData10(LeakData1 data)
        {
            string value = "";

            value = data.DiffData.SecBufDiff;
            if (this.CollectionDiffSecDiff[9].Text != value)
                this.CollectionDiffSecDiff[9].Text = value;

            this.UpdateDisplayMeasuringLeakDataDiff2(data.DiffData);
            this.UpdateDisplayDotGraphDiff(this.smartDraw2, data.DiffData);
        }
        // 변위센서 데이터
        public void UpdateDisplayDispData(Collection<DispData> datas)
        {
        }
        public void UpdateDisplayDispData1(LeakData1 data)
        {
            this.UpdateDisplayMeasuringLeakDataDisp1(data.DispData);
        }
        public void UpdateDisplayDispData2(LeakData1 data)
        {
            this.UpdateDisplayMeasuringLeakDataDisp2(data.DispData);
        }
        public void UpdateDisplayDispData3(LeakData1 data)
        {
            this.UpdateDisplayMeasuringLeakDataDisp1(data.DispData);
        }
        public void UpdateDisplayDispData4(LeakData1 data)
        {
            this.UpdateDisplayMeasuringLeakDataDisp2(data.DispData);
        }
        public void UpdateDisplayDispData5(LeakData1 data)
        {
            this.UpdateDisplayMeasuringLeakDataDisp1(data.DispData);
        }
        public void UpdateDisplayDispData6(LeakData1 data)
        {
            this.UpdateDisplayMeasuringLeakDataDisp2(data.DispData);
        }
        public void UpdateDisplayDispData7(LeakData1 data)
        {
            this.UpdateDisplayMeasuringLeakDataDisp1(data.DispData);
        }
        public void UpdateDisplayDispData8(LeakData1 data)
        {
            this.UpdateDisplayMeasuringLeakDataDisp2(data.DispData);
        }
        public void UpdateDisplayDispData9(LeakData1 data)
        {
            this.UpdateDisplayMeasuringLeakDataDisp1(data.DispData);
        }
        public void UpdateDisplayDispData10(LeakData1 data)
        {
            this.UpdateDisplayMeasuringLeakDataDisp2(data.DispData);
        }
        // 압력센서 데이터
        public void UpdateDisplayPresData(Collection<PressureData> datas)
        {
            string value = "";

            for (int i = 0; i < this.ParentForm.ParentForm.SystemConfig.EQUIPMENT_LANE; i++)
            {
                value = datas[i].WorkingChamber;
                if (this.CollectionPressureWork[i].Text != value)
                    this.CollectionPressureWork[i].Text = value;

                value = datas[i].MasterChamber;
                if (this.CollectionPressureMaster[i].Text != value)
                    this.CollectionPressureMaster[i].Text = value;
            }
        }
        public void UpdateDisplayPresData1(LeakData1 data)
        {
            string value = "";

            value = data.PresData.WorkingChamber;
            if (this.CollectionPressureWork[0].Text != value)
                this.CollectionPressureWork[0].Text = value;

            value = data.PresData.MasterChamber;
            if (this.CollectionPressureMaster[0].Text != value)
                this.CollectionPressureMaster[0].Text = value;

            this.UpdateDisplayMeasuringLeakDataPres1(data.PresData);
        }
        public void UpdateDisplayPresData2(LeakData1 data)
        {
            string value = "";

            value = data.PresData.WorkingChamber;
            if (this.CollectionPressureWork[1].Text != value)
                this.CollectionPressureWork[1].Text = value;

            value = data.PresData.MasterChamber;
            if (this.CollectionPressureMaster[1].Text != value)
                this.CollectionPressureMaster[1].Text = value;

            this.UpdateDisplayMeasuringLeakDataPres2(data.PresData);
        }
        public void UpdateDisplayPresData3(LeakData1 data)
        {
            string value = "";

            value = data.PresData.WorkingChamber;
            if (this.CollectionPressureWork[2].Text != value)
                this.CollectionPressureWork[2].Text = value;

            value = data.PresData.MasterChamber;
            if (this.CollectionPressureMaster[2].Text != value)
                this.CollectionPressureMaster[2].Text = value;

            this.UpdateDisplayMeasuringLeakDataPres1(data.PresData);
        }
        public void UpdateDisplayPresData4(LeakData1 data)
        {
            string value = "";

            value = data.PresData.WorkingChamber;
            if (this.CollectionPressureWork[3].Text != value)
                this.CollectionPressureWork[3].Text = value;

            value = data.PresData.MasterChamber;
            if (this.CollectionPressureMaster[3].Text != value)
                this.CollectionPressureMaster[3].Text = value;

            this.UpdateDisplayMeasuringLeakDataPres2(data.PresData);
        }
        public void UpdateDisplayPresData5(LeakData1 data)
        {
            string value = "";

            value = data.PresData.WorkingChamber;
            if (this.CollectionPressureWork[4].Text != value)
                this.CollectionPressureWork[4].Text = value;

            value = data.PresData.MasterChamber;
            if (this.CollectionPressureMaster[4].Text != value)
                this.CollectionPressureMaster[4].Text = value;

            this.UpdateDisplayMeasuringLeakDataPres1(data.PresData);
        }
        public void UpdateDisplayPresData6(LeakData1 data)
        {
            string value = "";

            value = data.PresData.WorkingChamber;
            if (this.CollectionPressureWork[5].Text != value)
                this.CollectionPressureWork[5].Text = value;

            value = data.PresData.MasterChamber;
            if (this.CollectionPressureMaster[5].Text != value)
                this.CollectionPressureMaster[5].Text = value;

            this.UpdateDisplayMeasuringLeakDataPres2(data.PresData);
        }
        public void UpdateDisplayPresData7(LeakData1 data)
        {
            string value = "";

            value = data.PresData.WorkingChamber;
            if (this.CollectionPressureWork[6].Text != value)
                this.CollectionPressureWork[6].Text = value;

            value = data.PresData.MasterChamber;
            if (this.CollectionPressureMaster[6].Text != value)
                this.CollectionPressureMaster[6].Text = value;

            this.UpdateDisplayMeasuringLeakDataPres1(data.PresData);
        }
        public void UpdateDisplayPresData8(LeakData1 data)
        {
            string value = "";

            value = data.PresData.WorkingChamber;
            if (this.CollectionPressureWork[7].Text != value)
                this.CollectionPressureWork[7].Text = value;

            value = data.PresData.MasterChamber;
            if (this.CollectionPressureMaster[7].Text != value)
                this.CollectionPressureMaster[7].Text = value;

            this.UpdateDisplayMeasuringLeakDataPres2(data.PresData);
        }
        public void UpdateDisplayPresData9(LeakData1 data)
        {
            string value = "";

            value = data.PresData.WorkingChamber;
            if (this.CollectionPressureWork[8].Text != value)
                this.CollectionPressureWork[8].Text = value;

            value = data.PresData.MasterChamber;
            if (this.CollectionPressureMaster[8].Text != value)
                this.CollectionPressureMaster[8].Text = value;

            this.UpdateDisplayMeasuringLeakDataPres1(data.PresData);
        }
        public void UpdateDisplayPresData10(LeakData1 data)
        {
            string value = "";

            value = data.PresData.WorkingChamber;
            if (this.CollectionPressureWork[9].Text != value)
                this.CollectionPressureWork[9].Text = value;

            value = data.PresData.MasterChamber;
            if (this.CollectionPressureMaster[9].Text != value)
                this.CollectionPressureMaster[9].Text = value;

            this.UpdateDisplayMeasuringLeakDataPres2(data.PresData);
        }
        // 판정결과
        public void UpdateDisplayJudgmentData(LeakData datas)
        {
            for (int i = 0; i < this.ParentForm.ParentForm.SystemConfig.EQUIPMENT_LANE; i++)
            {
                this.GetJudgmentResult(datas.CollJudgment[i], this.CollectionLabelResult[i]);
                this.CollectionLabelResult[i].Visible = true;
            }
        }
        public void UpdateDisplayJudgmentData1(LeakData1 data)
        {
            this.GetJudgmentResult(data.Judgment, this.CollectionLabelResult[0]);
            this.CollectionLabelResult[0].Visible = true;
            this.smartDraw1.Chart.PutDataAllClear();
        }
        public void UpdateDisplayJudgmentData2(LeakData1 data)
        {
            this.GetJudgmentResult(data.Judgment, this.CollectionLabelResult[1]);
            this.CollectionLabelResult[1].Visible = true;
            this.smartDraw2.Chart.PutDataAllClear();
        }
        public void UpdateDisplayJudgmentData3(LeakData1 data)
        {
            this.GetJudgmentResult(data.Judgment, this.CollectionLabelResult[2]);
            this.CollectionLabelResult[2].Visible = true;
            this.smartDraw1.Chart.PutDataAllClear();
        }
        public void UpdateDisplayJudgmentData4(LeakData1 data)
        {
            this.GetJudgmentResult(data.Judgment, this.CollectionLabelResult[3]);
            this.CollectionLabelResult[3].Visible = true;
            this.smartDraw2.Chart.PutDataAllClear();
        }
        public void UpdateDisplayJudgmentData5(LeakData1 data)
        {
            this.GetJudgmentResult(data.Judgment, this.CollectionLabelResult[4]);
            this.CollectionLabelResult[4].Visible = true;
            this.smartDraw1.Chart.PutDataAllClear();
        }
        public void UpdateDisplayJudgmentData6(LeakData1 data)
        {
            this.GetJudgmentResult(data.Judgment, this.CollectionLabelResult[5]);
            this.CollectionLabelResult[5].Visible = true;
            this.smartDraw2.Chart.PutDataAllClear();
        }
        public void UpdateDisplayJudgmentData7(LeakData1 data)
        {
            this.GetJudgmentResult(data.Judgment, this.CollectionLabelResult[6]);
            this.CollectionLabelResult[6].Visible = true;
            this.smartDraw1.Chart.PutDataAllClear();
        }
        public void UpdateDisplayJudgmentData8(LeakData1 data)
        {
            this.GetJudgmentResult(data.Judgment, this.CollectionLabelResult[7]);
            this.CollectionLabelResult[7].Visible = true;
            this.smartDraw2.Chart.PutDataAllClear();
        }
        public void UpdateDisplayJudgmentData9(LeakData1 data)
        {
            this.GetJudgmentResult(data.Judgment, this.CollectionLabelResult[8]);
            this.CollectionLabelResult[8].Visible = true;
            this.smartDraw1.Chart.PutDataAllClear();
        }
        public void UpdateDisplayJudgmentData10(LeakData1 data)
        {
            this.GetJudgmentResult(data.Judgment, this.CollectionLabelResult[9]);
            this.CollectionLabelResult[9].Visible = true;
            this.smartDraw2.Chart.PutDataAllClear();
        }

        public void DisplayRefresh()
        {
            this.ParentForm.ParentForm.CurrentSystemStatus.CurrentDisplayMode = Define.E_DisplayModeStore.Equipment1;
            this.ParentForm.ParentForm.SetDisplayMode(Define.E_EquipmentMode.Normal);

            this.InitializeData();
        }
        #endregion

        #region Event Handler
        private void buttonInspection_Click(object sender, EventArgs e)
        {
            this.InitializeData();
            this.ParentForm.ParentForm.TransferData(CommunicationCommand.CutInpupt, CommunicationID.MainBoard);
        }
        private void buttonDisplay_Click(object sender, EventArgs e)
        {
            this.ParentForm.UpdateDisplayEquipmentTest();
        }
        #endregion

        private void smartLabel1_Click(object sender, EventArgs e)
        {
            int iValue = 0;
            double SecBufDiff = 200.123;
            double dValue = 0.0;

            // 값 표시 범위
            // 1000 ~ 0
            // 그래프 영역 높이 230
            // 1000 / 102 = 4.347826086956522
            dValue = int.Parse(string.Format("{0:0}", SecBufDiff)) / 4.347826086956522;

            if (dValue > 230)
                dValue = 230;
            if (dValue < 1)
                dValue = 1;

            iValue = int.Parse(string.Format("{0:f0}", dValue));

            this.smartDraw1.Chart.PutData(iValue);
        }

        private void smartLabel2_Click(object sender, EventArgs e)
        {
            int iValue = 0;
            double SecBufDiff = 500.456;
            double dValue = 0.0;

            // 값 표시 범위
            // 1000 ~ 0
            // 그래프 영역 높이 230
            // 1000 / 102 = 4.347826086956522
            dValue = int.Parse(string.Format("{0:0}", SecBufDiff)) / 4.347826086956522;

            if (dValue > 230)
                dValue = 230;
            if (dValue < 1)
                dValue = 1;

            iValue = int.Parse(string.Format("{0:f0}", dValue));

            this.smartDraw1.Chart.PutData(iValue);
        }

        private void smartLabel3_Click(object sender, EventArgs e)
        {
            int iValue = 0;
            double SecBufDiff = 700.865;
            double dValue = 0.0;

            // 값 표시 범위
            // 1000 ~ 0
            // 그래프 영역 높이 230
            // 1000 / 102 = 4.347826086956522
            dValue = int.Parse(string.Format("{0:0}", SecBufDiff)) / 4.347826086956522;

            if (dValue > 230)
                dValue = 230;
            if (dValue < 1)
                dValue = 1;

            iValue = int.Parse(string.Format("{0:f0}", dValue));

            this.smartDraw1.Chart.PutData(iValue);
        }

        private void smartLabel6_Click(object sender, EventArgs e)
        {
            int iValue = 0;
            double SecBufDiff = 1000.456;
            double dValue = 0.0;

            // 값 표시 범위
            // 1000 ~ 0
            // 그래프 영역 높이 230
            // 1000 / 102 = 4.347826086956522
            dValue = int.Parse(string.Format("{0:0}", SecBufDiff)) / 4.347826086956522;

            if (dValue > 230)
                dValue = 230;
            if (dValue < 1)
                dValue = 1;

            iValue = int.Parse(string.Format("{0:f0}", dValue));

            this.smartDraw1.Chart.PutData(iValue);
        }

        private void buttonContinuousTest_Click(object sender, EventArgs e)
        {
            if (this.buttonContinuousTest.ButtonStatus == SmartButton.BUTSTATUS.DOWN)
            {
                this.InitializeData();
                this.ParentForm.ParentForm.TransferData(CommunicationCommand.CutInpupt, CommunicationID.MainBoard);
                this.smartTimer.Start();
            }
            else
                this.smartTimer.Stop();
        }

        private void smartTimer_Tick(object sender, EventArgs e)
        {
            this.InitializeData();
            this.ParentForm.ParentForm.TransferData(CommunicationCommand.CutInpupt, CommunicationID.MainBoard);
        }

        private void buttonDiffOPT1_Click(object sender, EventArgs e)
        {

        }
    }
}
