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

using SmartX;
using INT69DC_7C.Forms;

namespace INT69DC_7C.Controls
{
    public partial class ControlMainDisplayTable7 : UserControl
    {
        #region Field
        private FormMainDisplay m_ParentForm;

        private Color WeightOverColor = Color.Yellow;
        private Color WeightStandardColor = Color.Black;
        private Color WeightUnderColor = Color.Red;
        private Color WeightPassColor = Color.Green;
        private Color WeightExNGColor = Color.Blue;

        /// <summary>
        /// true : total average
        /// fals : total pass average
        /// </summary>
        private bool IsTotalAverageView = true;

        private Collection<PictureBox> CollectionPictureBoxZero;
        private Collection<PictureBox> CollectionPictureBoxBypass;
        private Collection<SmartLabel> CollectionLabelWeightValue1;
        private Collection<SmartLabel> CollectionLabelWeightValue2;
        private Collection<SmartLabel> CollectionLabelWeightValue3;
        private Collection<SmartLabel> CollectionLabelWeightValue4;
        private Collection<SmartLabel> CollectionLabelWeightValue5;
        private Collection<SmartLabel> CollectionLabelWeightValue6;
        private Collection<SmartLabel> CollectionLabelWeightValue7;
        private Collection<WeightStorageItem> CollectionWeightStorageItem;
        #endregion

        #region Constructor
        public ControlMainDisplayTable7(FormMainDisplay parent)
        {
            InitializeComponent();

            this.ParentForm = parent;

            this.CreateCollection();
            this.InitializeControl();
        }
        #endregion

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

        #region Method
        private void CreateCollection()
        {
            // PictureBoxZero
            this.CollectionPictureBoxZero = new Collection<PictureBox>();
            this.CollectionPictureBoxZero.Clear();
            this.CollectionPictureBoxZero.Add(this.pictureBox1);
            this.CollectionPictureBoxZero.Add(this.pictureBox2);
            this.CollectionPictureBoxZero.Add(this.pictureBox3);
            this.CollectionPictureBoxZero.Add(this.pictureBox4);
            this.CollectionPictureBoxZero.Add(this.pictureBox5);
            this.CollectionPictureBoxZero.Add(this.pictureBox6);
            this.CollectionPictureBoxZero.Add(this.pictureBox7);

            // PictureBoxBypass
            this.CollectionPictureBoxBypass = new Collection<PictureBox>();
            this.CollectionPictureBoxBypass.Clear();
            this.CollectionPictureBoxBypass.Add(this.pictureBoxBypass1);
            this.CollectionPictureBoxBypass.Add(this.pictureBoxBypass2);
            this.CollectionPictureBoxBypass.Add(this.pictureBoxBypass3);
            this.CollectionPictureBoxBypass.Add(this.pictureBoxBypass4);
            this.CollectionPictureBoxBypass.Add(this.pictureBoxBypass5);
            this.CollectionPictureBoxBypass.Add(this.pictureBoxBypass6);
            this.CollectionPictureBoxBypass.Add(this.pictureBoxBypass7);

            // WeightStorage
            this.CollectionWeightStorageItem = new Collection<WeightStorageItem>();
            this.CollectionWeightStorageItem.Clear();
            for (int i = 0; i < this.ParentForm.ParentForm.SystemConfig.EquipmentColumns; i++)
                this.CollectionWeightStorageItem.Add(new WeightStorageItem());

            #region Add Label
            this.CollectionLabelWeightValue1 = new Collection<SmartLabel>();
            this.CollectionLabelWeightValue1.Clear();
            this.CollectionLabelWeightValue1.Add(this.label1Col1Row);
            this.CollectionLabelWeightValue1.Add(this.label1Col2Row);
            this.CollectionLabelWeightValue1.Add(this.label1Col3Row);
            this.CollectionLabelWeightValue1.Add(this.label1Col4Row);
            this.CollectionLabelWeightValue1.Add(this.label1Col5Row);
            this.CollectionLabelWeightValue1.Add(this.label1Col6Row);
            this.CollectionLabelWeightValue1.Add(this.label1Col7Row);
            this.CollectionLabelWeightValue1.Add(this.label1Col8Row);
            this.CollectionLabelWeightValue1.Add(this.label1Col9Row);
            this.CollectionLabelWeightValue1.Add(this.label1Col10Row);
            this.CollectionLabelWeightValue1.Add(this.label1Col5Avg);
            this.CollectionLabelWeightValue1.Add(this.label1AllAvg);

            this.CollectionLabelWeightValue2 = new Collection<SmartLabel>();
            this.CollectionLabelWeightValue2.Clear();
            this.CollectionLabelWeightValue2.Add(this.label2Col1Row);
            this.CollectionLabelWeightValue2.Add(this.label2Col2Row);
            this.CollectionLabelWeightValue2.Add(this.label2Col3Row);
            this.CollectionLabelWeightValue2.Add(this.label2Col4Row);
            this.CollectionLabelWeightValue2.Add(this.label2Col5Row);
            this.CollectionLabelWeightValue2.Add(this.label2Col6Row);
            this.CollectionLabelWeightValue2.Add(this.label2Col7Row);
            this.CollectionLabelWeightValue2.Add(this.label2Col8Row);
            this.CollectionLabelWeightValue2.Add(this.label2Col9Row);
            this.CollectionLabelWeightValue2.Add(this.label2Col10Row);
            this.CollectionLabelWeightValue2.Add(this.label2Col5Avg);
            this.CollectionLabelWeightValue2.Add(this.label2AllAvg);

            this.CollectionLabelWeightValue3 = new Collection<SmartLabel>();
            this.CollectionLabelWeightValue3.Clear();
            this.CollectionLabelWeightValue3.Add(this.label3Col1Row);
            this.CollectionLabelWeightValue3.Add(this.label3Col2Row);
            this.CollectionLabelWeightValue3.Add(this.label3Col3Row);
            this.CollectionLabelWeightValue3.Add(this.label3Col4Row);
            this.CollectionLabelWeightValue3.Add(this.label3Col5Row);
            this.CollectionLabelWeightValue3.Add(this.label3Col6Row);
            this.CollectionLabelWeightValue3.Add(this.label3Col7Row);
            this.CollectionLabelWeightValue3.Add(this.label3Col8Row);
            this.CollectionLabelWeightValue3.Add(this.label3Col9Row);
            this.CollectionLabelWeightValue3.Add(this.label3Col10Row);
            this.CollectionLabelWeightValue3.Add(this.label3Col5Avg);
            this.CollectionLabelWeightValue3.Add(this.label3AllAvg);

            this.CollectionLabelWeightValue4 = new Collection<SmartLabel>();
            this.CollectionLabelWeightValue4.Clear();
            this.CollectionLabelWeightValue4.Add(this.label4Col1Row);
            this.CollectionLabelWeightValue4.Add(this.label4Col2Row);
            this.CollectionLabelWeightValue4.Add(this.label4Col3Row);
            this.CollectionLabelWeightValue4.Add(this.label4Col4Row);
            this.CollectionLabelWeightValue4.Add(this.label4Col5Row);
            this.CollectionLabelWeightValue4.Add(this.label4Col6Row);
            this.CollectionLabelWeightValue4.Add(this.label4Col7Row);
            this.CollectionLabelWeightValue4.Add(this.label4Col8Row);
            this.CollectionLabelWeightValue4.Add(this.label4Col9Row);
            this.CollectionLabelWeightValue4.Add(this.label4Col10Row);
            this.CollectionLabelWeightValue4.Add(this.label4Col5Avg);
            this.CollectionLabelWeightValue4.Add(this.label4AllAvg);

            this.CollectionLabelWeightValue5 = new Collection<SmartLabel>();
            this.CollectionLabelWeightValue5.Clear();
            this.CollectionLabelWeightValue5.Add(this.label5Col1Row);
            this.CollectionLabelWeightValue5.Add(this.label5Col2Row);
            this.CollectionLabelWeightValue5.Add(this.label5Col3Row);
            this.CollectionLabelWeightValue5.Add(this.label5Col4Row);
            this.CollectionLabelWeightValue5.Add(this.label5Col5Row);
            this.CollectionLabelWeightValue5.Add(this.label5Col6Row);
            this.CollectionLabelWeightValue5.Add(this.label5Col7Row);
            this.CollectionLabelWeightValue5.Add(this.label5Col8Row);
            this.CollectionLabelWeightValue5.Add(this.label5Col9Row);
            this.CollectionLabelWeightValue5.Add(this.label5Col10Row);
            this.CollectionLabelWeightValue5.Add(this.label5Col5Avg);
            this.CollectionLabelWeightValue5.Add(this.label5AllAvg);

            this.CollectionLabelWeightValue6 = new Collection<SmartLabel>();
            this.CollectionLabelWeightValue6.Clear();
            this.CollectionLabelWeightValue6.Add(this.label6Col1Row);
            this.CollectionLabelWeightValue6.Add(this.label6Col2Row);
            this.CollectionLabelWeightValue6.Add(this.label6Col3Row);
            this.CollectionLabelWeightValue6.Add(this.label6Col4Row);
            this.CollectionLabelWeightValue6.Add(this.label6Col5Row);
            this.CollectionLabelWeightValue6.Add(this.label6Col6Row);
            this.CollectionLabelWeightValue6.Add(this.label6Col7Row);
            this.CollectionLabelWeightValue6.Add(this.label6Col8Row);
            this.CollectionLabelWeightValue6.Add(this.label6Col9Row);
            this.CollectionLabelWeightValue6.Add(this.label6Col10Row);
            this.CollectionLabelWeightValue6.Add(this.label6Col5Avg);
            this.CollectionLabelWeightValue6.Add(this.label6AllAvg);

            this.CollectionLabelWeightValue7 = new Collection<SmartLabel>();
            this.CollectionLabelWeightValue7.Clear();
            this.CollectionLabelWeightValue7.Add(this.label7Col1Row);
            this.CollectionLabelWeightValue7.Add(this.label7Col2Row);
            this.CollectionLabelWeightValue7.Add(this.label7Col3Row);
            this.CollectionLabelWeightValue7.Add(this.label7Col4Row);
            this.CollectionLabelWeightValue7.Add(this.label7Col5Row);
            this.CollectionLabelWeightValue7.Add(this.label7Col6Row);
            this.CollectionLabelWeightValue7.Add(this.label7Col7Row);
            this.CollectionLabelWeightValue7.Add(this.label7Col8Row);
            this.CollectionLabelWeightValue7.Add(this.label7Col9Row);
            this.CollectionLabelWeightValue7.Add(this.label7Col10Row);
            this.CollectionLabelWeightValue7.Add(this.label7Col5Avg);
            this.CollectionLabelWeightValue7.Add(this.label7AllAvg);
            #endregion
        }
        private void InitializeControl()
        {
            foreach (PictureBox picture in this.CollectionPictureBoxZero)
                picture.Visible = false;

            foreach (PictureBox picture in this.CollectionPictureBoxBypass)
                picture.Visible = false;

            for (int i = 0; i < 12; i++)
            {
                this.SetLabelProperty(this.CollectionLabelWeightValue1[i]);
                this.SetLabelProperty(this.CollectionLabelWeightValue2[i]);
                this.SetLabelProperty(this.CollectionLabelWeightValue3[i]);
                this.SetLabelProperty(this.CollectionLabelWeightValue4[i]);
                this.SetLabelProperty(this.CollectionLabelWeightValue5[i]);

                this.SetLabelProperty(this.CollectionLabelWeightValue6[i]);
                this.SetLabelProperty(this.CollectionLabelWeightValue7[i]);
            }

            this.UpdateLabelDisplay();
        }
        private void SetLabelProperty(Control label)
        {
            label.Font = new Font("Tahoma", 16, FontStyle.Bold);
        }
        private void SetLabelText(SmartLabel label, double value, bool labelTotalCNT, DataStore.JudgmentStatus judge)
        {
            string sValue = "";
            Color labelColor = Color.Black;

            //if (value < Helper.StringToWeight(this.ParentForm.ParentForm.CurrentProductItem.UnderRange, this.ParentForm.ParentForm.SystemConfig.DecimalPlaces))
            //    labelColor = this.WeightUnderColor;
            //else if (value > Helper.StringToWeight(this.ParentForm.ParentForm.CurrentProductItem.OverRange, this.ParentForm.ParentForm.SystemConfig.DecimalPlaces))
            //    labelColor = this.WeightOverColor;
            //else
            //    labelColor = this.WeightStandardColor;

            if (judge == DataStore.JudgmentStatus.Over)
                labelColor = this.WeightOverColor;
            else if (judge == DataStore.JudgmentStatus.Under)
                labelColor = this.WeightUnderColor;
            else if (judge == DataStore.JudgmentStatus.EXNg)
                labelColor = this.WeightExNGColor;
            else
                labelColor = this.WeightStandardColor;

            if (labelTotalCNT == true)
            {
                if (this.IsTotalAverageView == false)
                    labelColor = this.WeightPassColor;
            }

            sValue = Helper.DoubleToString(value, this.ParentForm.ParentForm.SystemConfig.DecimalPlaces);

            if (label.ForeColor != labelColor)
                label.ForeColor = labelColor;

            if (label.Text != sValue)
                label.Text = sValue;
        }

        public void Clear()
        {
            foreach (WeightStorageItem weight in this.CollectionWeightStorageItem)
                weight.AllClear();

            this.UpdateLabelDisplay();
        }

        private void UpdateLabelDisplay()
        {
            this.SetLabelText(this.label1Col1Row, this.CollectionWeightStorageItem[0].Weight1, false, this.CollectionWeightStorageItem[0].Grade1);
            this.SetLabelText(this.label1Col2Row, this.CollectionWeightStorageItem[0].Weight2, false, this.CollectionWeightStorageItem[0].Grade2);
            this.SetLabelText(this.label1Col3Row, this.CollectionWeightStorageItem[0].Weight3, false, this.CollectionWeightStorageItem[0].Grade3);
            this.SetLabelText(this.label1Col4Row, this.CollectionWeightStorageItem[0].Weight4, false, this.CollectionWeightStorageItem[0].Grade4);
            this.SetLabelText(this.label1Col5Row, this.CollectionWeightStorageItem[0].Weight5, false, this.CollectionWeightStorageItem[0].Grade5);
            this.SetLabelText(this.label1Col6Row, this.CollectionWeightStorageItem[0].Weight6, false, this.CollectionWeightStorageItem[0].Grade6);
            this.SetLabelText(this.label1Col7Row, this.CollectionWeightStorageItem[0].Weight7, false, this.CollectionWeightStorageItem[0].Grade7);
            this.SetLabelText(this.label1Col8Row, this.CollectionWeightStorageItem[0].Weight8, false, this.CollectionWeightStorageItem[0].Grade8);
            this.SetLabelText(this.label1Col9Row, this.CollectionWeightStorageItem[0].Weight9, false, this.CollectionWeightStorageItem[0].Grade9);
            this.SetLabelText(this.label1Col10Row, this.CollectionWeightStorageItem[0].Weight10, false, this.CollectionWeightStorageItem[0].Grade10);
            this.SetLabelText(this.label1Col5Avg, this.CollectionWeightStorageItem[0].GetWeightTenAverage(), false, DataStore.JudgmentStatus.Empty);
            this.SetLabelText(this.label1AllAvg, this.CollectionWeightStorageItem[0].GetWeightTotalAverage(), true, DataStore.JudgmentStatus.Empty);

            this.SetLabelText(this.label2Col1Row, this.CollectionWeightStorageItem[1].Weight1, false, this.CollectionWeightStorageItem[1].Grade1);
            this.SetLabelText(this.label2Col2Row, this.CollectionWeightStorageItem[1].Weight2, false, this.CollectionWeightStorageItem[1].Grade2);
            this.SetLabelText(this.label2Col3Row, this.CollectionWeightStorageItem[1].Weight3, false, this.CollectionWeightStorageItem[1].Grade3);
            this.SetLabelText(this.label2Col4Row, this.CollectionWeightStorageItem[1].Weight4, false, this.CollectionWeightStorageItem[1].Grade4);
            this.SetLabelText(this.label2Col5Row, this.CollectionWeightStorageItem[1].Weight5, false, this.CollectionWeightStorageItem[1].Grade5);
            this.SetLabelText(this.label2Col6Row, this.CollectionWeightStorageItem[1].Weight6, false, this.CollectionWeightStorageItem[1].Grade6);
            this.SetLabelText(this.label2Col7Row, this.CollectionWeightStorageItem[1].Weight7, false, this.CollectionWeightStorageItem[1].Grade7);
            this.SetLabelText(this.label2Col8Row, this.CollectionWeightStorageItem[1].Weight8, false, this.CollectionWeightStorageItem[1].Grade8);
            this.SetLabelText(this.label2Col9Row, this.CollectionWeightStorageItem[1].Weight9, false, this.CollectionWeightStorageItem[1].Grade9);
            this.SetLabelText(this.label2Col10Row, this.CollectionWeightStorageItem[1].Weight10, false, this.CollectionWeightStorageItem[1].Grade10);
            this.SetLabelText(this.label2Col5Avg, this.CollectionWeightStorageItem[1].GetWeightTenAverage(), false, DataStore.JudgmentStatus.Empty);
            this.SetLabelText(this.label2AllAvg, this.CollectionWeightStorageItem[1].GetWeightTotalAverage(), true, DataStore.JudgmentStatus.Empty);

            this.SetLabelText(this.label3Col1Row, this.CollectionWeightStorageItem[2].Weight1, false, this.CollectionWeightStorageItem[2].Grade1);
            this.SetLabelText(this.label3Col2Row, this.CollectionWeightStorageItem[2].Weight2, false, this.CollectionWeightStorageItem[2].Grade2);
            this.SetLabelText(this.label3Col3Row, this.CollectionWeightStorageItem[2].Weight3, false, this.CollectionWeightStorageItem[2].Grade3);
            this.SetLabelText(this.label3Col4Row, this.CollectionWeightStorageItem[2].Weight4, false, this.CollectionWeightStorageItem[2].Grade4);
            this.SetLabelText(this.label3Col5Row, this.CollectionWeightStorageItem[2].Weight5, false, this.CollectionWeightStorageItem[2].Grade5);
            this.SetLabelText(this.label3Col6Row, this.CollectionWeightStorageItem[2].Weight6, false, this.CollectionWeightStorageItem[2].Grade6);
            this.SetLabelText(this.label3Col7Row, this.CollectionWeightStorageItem[2].Weight7, false, this.CollectionWeightStorageItem[2].Grade7);
            this.SetLabelText(this.label3Col8Row, this.CollectionWeightStorageItem[2].Weight8, false, this.CollectionWeightStorageItem[2].Grade8);
            this.SetLabelText(this.label3Col9Row, this.CollectionWeightStorageItem[2].Weight9, false, this.CollectionWeightStorageItem[2].Grade9);
            this.SetLabelText(this.label3Col10Row, this.CollectionWeightStorageItem[2].Weight10, false, this.CollectionWeightStorageItem[2].Grade10);
            this.SetLabelText(this.label3Col5Avg, this.CollectionWeightStorageItem[2].GetWeightTenAverage(), false, DataStore.JudgmentStatus.Empty);
            this.SetLabelText(this.label3AllAvg, this.CollectionWeightStorageItem[2].GetWeightTotalAverage(), true, DataStore.JudgmentStatus.Empty);

            this.SetLabelText(this.label4Col1Row, this.CollectionWeightStorageItem[3].Weight1, false, this.CollectionWeightStorageItem[3].Grade1);
            this.SetLabelText(this.label4Col2Row, this.CollectionWeightStorageItem[3].Weight2, false, this.CollectionWeightStorageItem[3].Grade2);
            this.SetLabelText(this.label4Col3Row, this.CollectionWeightStorageItem[3].Weight3, false, this.CollectionWeightStorageItem[3].Grade3);
            this.SetLabelText(this.label4Col4Row, this.CollectionWeightStorageItem[3].Weight4, false, this.CollectionWeightStorageItem[3].Grade4);
            this.SetLabelText(this.label4Col5Row, this.CollectionWeightStorageItem[3].Weight5, false, this.CollectionWeightStorageItem[3].Grade5);
            this.SetLabelText(this.label4Col6Row, this.CollectionWeightStorageItem[3].Weight6, false, this.CollectionWeightStorageItem[3].Grade6);
            this.SetLabelText(this.label4Col7Row, this.CollectionWeightStorageItem[3].Weight7, false, this.CollectionWeightStorageItem[3].Grade7);
            this.SetLabelText(this.label4Col8Row, this.CollectionWeightStorageItem[3].Weight8, false, this.CollectionWeightStorageItem[3].Grade8);
            this.SetLabelText(this.label4Col9Row, this.CollectionWeightStorageItem[3].Weight9, false, this.CollectionWeightStorageItem[3].Grade9);
            this.SetLabelText(this.label4Col10Row, this.CollectionWeightStorageItem[3].Weight10, false, this.CollectionWeightStorageItem[3].Grade10);
            this.SetLabelText(this.label4Col5Avg, this.CollectionWeightStorageItem[3].GetWeightTenAverage(), false, DataStore.JudgmentStatus.Empty);
            this.SetLabelText(this.label4AllAvg, this.CollectionWeightStorageItem[3].GetWeightTotalAverage(), true, DataStore.JudgmentStatus.Empty);

            this.SetLabelText(this.label5Col1Row, this.CollectionWeightStorageItem[4].Weight1, false, this.CollectionWeightStorageItem[4].Grade1);
            this.SetLabelText(this.label5Col2Row, this.CollectionWeightStorageItem[4].Weight2, false, this.CollectionWeightStorageItem[4].Grade2);
            this.SetLabelText(this.label5Col3Row, this.CollectionWeightStorageItem[4].Weight3, false, this.CollectionWeightStorageItem[4].Grade3);
            this.SetLabelText(this.label5Col4Row, this.CollectionWeightStorageItem[4].Weight4, false, this.CollectionWeightStorageItem[4].Grade4);
            this.SetLabelText(this.label5Col5Row, this.CollectionWeightStorageItem[4].Weight5, false, this.CollectionWeightStorageItem[4].Grade5);
            this.SetLabelText(this.label5Col6Row, this.CollectionWeightStorageItem[4].Weight6, false, this.CollectionWeightStorageItem[4].Grade6);
            this.SetLabelText(this.label5Col7Row, this.CollectionWeightStorageItem[4].Weight7, false, this.CollectionWeightStorageItem[4].Grade7);
            this.SetLabelText(this.label5Col8Row, this.CollectionWeightStorageItem[4].Weight8, false, this.CollectionWeightStorageItem[4].Grade8);
            this.SetLabelText(this.label5Col9Row, this.CollectionWeightStorageItem[4].Weight9, false, this.CollectionWeightStorageItem[4].Grade9);
            this.SetLabelText(this.label5Col10Row, this.CollectionWeightStorageItem[4].Weight10, false, this.CollectionWeightStorageItem[4].Grade10);
            this.SetLabelText(this.label5Col5Avg, this.CollectionWeightStorageItem[4].GetWeightTenAverage(), false, DataStore.JudgmentStatus.Empty);
            this.SetLabelText(this.label5AllAvg, this.CollectionWeightStorageItem[4].GetWeightTotalAverage(), true, DataStore.JudgmentStatus.Empty);

            this.SetLabelText(this.label6Col1Row, this.CollectionWeightStorageItem[5].Weight1, false, this.CollectionWeightStorageItem[5].Grade1);
            this.SetLabelText(this.label6Col2Row, this.CollectionWeightStorageItem[5].Weight2, false, this.CollectionWeightStorageItem[5].Grade2);
            this.SetLabelText(this.label6Col3Row, this.CollectionWeightStorageItem[5].Weight3, false, this.CollectionWeightStorageItem[5].Grade3);
            this.SetLabelText(this.label6Col4Row, this.CollectionWeightStorageItem[5].Weight4, false, this.CollectionWeightStorageItem[5].Grade4);
            this.SetLabelText(this.label6Col5Row, this.CollectionWeightStorageItem[5].Weight5, false, this.CollectionWeightStorageItem[5].Grade5);
            this.SetLabelText(this.label6Col6Row, this.CollectionWeightStorageItem[5].Weight6, false, this.CollectionWeightStorageItem[5].Grade6);
            this.SetLabelText(this.label6Col7Row, this.CollectionWeightStorageItem[5].Weight7, false, this.CollectionWeightStorageItem[5].Grade7);
            this.SetLabelText(this.label6Col8Row, this.CollectionWeightStorageItem[5].Weight8, false, this.CollectionWeightStorageItem[5].Grade8);
            this.SetLabelText(this.label6Col9Row, this.CollectionWeightStorageItem[5].Weight9, false, this.CollectionWeightStorageItem[5].Grade9);
            this.SetLabelText(this.label6Col10Row, this.CollectionWeightStorageItem[5].Weight10, false, this.CollectionWeightStorageItem[5].Grade10);
            this.SetLabelText(this.label6Col5Avg, this.CollectionWeightStorageItem[5].GetWeightTenAverage(), false, DataStore.JudgmentStatus.Empty);
            this.SetLabelText(this.label6AllAvg, this.CollectionWeightStorageItem[5].GetWeightTotalAverage(), true, DataStore.JudgmentStatus.Empty);

            this.SetLabelText(this.label7Col1Row, this.CollectionWeightStorageItem[6].Weight1, false, this.CollectionWeightStorageItem[6].Grade1);
            this.SetLabelText(this.label7Col2Row, this.CollectionWeightStorageItem[6].Weight2, false, this.CollectionWeightStorageItem[6].Grade2);
            this.SetLabelText(this.label7Col3Row, this.CollectionWeightStorageItem[6].Weight3, false, this.CollectionWeightStorageItem[6].Grade3);
            this.SetLabelText(this.label7Col4Row, this.CollectionWeightStorageItem[6].Weight4, false, this.CollectionWeightStorageItem[6].Grade4);
            this.SetLabelText(this.label7Col5Row, this.CollectionWeightStorageItem[6].Weight5, false, this.CollectionWeightStorageItem[6].Grade5);
            this.SetLabelText(this.label7Col6Row, this.CollectionWeightStorageItem[6].Weight6, false, this.CollectionWeightStorageItem[6].Grade6);
            this.SetLabelText(this.label7Col7Row, this.CollectionWeightStorageItem[6].Weight7, false, this.CollectionWeightStorageItem[6].Grade7);
            this.SetLabelText(this.label7Col8Row, this.CollectionWeightStorageItem[6].Weight8, false, this.CollectionWeightStorageItem[6].Grade8);
            this.SetLabelText(this.label7Col9Row, this.CollectionWeightStorageItem[6].Weight9, false, this.CollectionWeightStorageItem[6].Grade9);
            this.SetLabelText(this.label7Col10Row, this.CollectionWeightStorageItem[6].Weight10, false, this.CollectionWeightStorageItem[6].Grade10);
            this.SetLabelText(this.label7Col5Avg, this.CollectionWeightStorageItem[6].GetWeightTenAverage(), false, DataStore.JudgmentStatus.Empty);
            this.SetLabelText(this.label7AllAvg, this.CollectionWeightStorageItem[6].GetWeightTotalAverage(), true, DataStore.JudgmentStatus.Empty);
        }
        private void UpdateTotalAverage(bool totalAverageView)
        {
            if (totalAverageView == true)
            {
                this.SetLabelText(this.label1AllAvg, this.CollectionWeightStorageItem[0].GetWeightTotalAverage(), true, DataStore.JudgmentStatus.Empty);
                this.SetLabelText(this.label2AllAvg, this.CollectionWeightStorageItem[1].GetWeightTotalAverage(), true, DataStore.JudgmentStatus.Empty);
                this.SetLabelText(this.label3AllAvg, this.CollectionWeightStorageItem[2].GetWeightTotalAverage(), true, DataStore.JudgmentStatus.Empty);
                this.SetLabelText(this.label4AllAvg, this.CollectionWeightStorageItem[3].GetWeightTotalAverage(), true, DataStore.JudgmentStatus.Empty);
                this.SetLabelText(this.label5AllAvg, this.CollectionWeightStorageItem[4].GetWeightTotalAverage(), true, DataStore.JudgmentStatus.Empty);
                this.SetLabelText(this.label6AllAvg, this.CollectionWeightStorageItem[5].GetWeightTotalAverage(), true, DataStore.JudgmentStatus.Empty);
                this.SetLabelText(this.label7AllAvg, this.CollectionWeightStorageItem[6].GetWeightTotalAverage(), true, DataStore.JudgmentStatus.Empty);
            }
            else
            {
                this.SetLabelText(this.label1AllAvg, this.CollectionWeightStorageItem[0].GetWeightTotalPassAverage(), true, DataStore.JudgmentStatus.Empty);
                this.SetLabelText(this.label2AllAvg, this.CollectionWeightStorageItem[1].GetWeightTotalPassAverage(), true, DataStore.JudgmentStatus.Empty);
                this.SetLabelText(this.label3AllAvg, this.CollectionWeightStorageItem[2].GetWeightTotalPassAverage(), true, DataStore.JudgmentStatus.Empty);
                this.SetLabelText(this.label4AllAvg, this.CollectionWeightStorageItem[3].GetWeightTotalPassAverage(), true, DataStore.JudgmentStatus.Empty);
                this.SetLabelText(this.label5AllAvg, this.CollectionWeightStorageItem[4].GetWeightTotalPassAverage(), true, DataStore.JudgmentStatus.Empty);
                this.SetLabelText(this.label6AllAvg, this.CollectionWeightStorageItem[5].GetWeightTotalPassAverage(), true, DataStore.JudgmentStatus.Empty);
                this.SetLabelText(this.label7AllAvg, this.CollectionWeightStorageItem[6].GetWeightTotalPassAverage(), true, DataStore.JudgmentStatus.Empty);
            }
        }

        public void UpdateEquipmentStatusDisplay(DataStore.EquipmentStatus status)
        {
        }
        public void UpdateCurrentProductDisplay(DataStore.EquipmentStatus status, Collection<WeightData> weightDatas)
        {
            // 초기화
        }
        public void UpdateBypassDisplay(Collection<WeightData> weightData)
        {
            for (int i = 0; i < this.CollectionPictureBoxBypass.Count; i++)
            {
                if (weightData[i].IsBypassMode == true)
                    this.CollectionPictureBoxBypass[i].Visible = true;
                else
                    this.CollectionPictureBoxBypass[i].Visible = false;
            }
        }
        public void UpdateStopWeightDisplay(DataStore.EquipmentStatus status, Collection<WeightData> weightDatas)
        {
            string value = "";

            if (this.ParentForm.ParentForm.SystemConfig.EquipmentColumns > weightDatas.Count)
                return;

            if (status == DataStore.EquipmentStatus.Stop)
            {
                for (int i = 0; i < this.ParentForm.ParentForm.SystemConfig.EquipmentColumns; i++)
                {
                    // 영점표시
                    if (weightDatas[i].Status == DataStore.WeightStatus.WeightZero)
                        this.CollectionPictureBoxZero[i].Visible = true;
                    else
                        this.CollectionPictureBoxZero[i].Visible = false;
                }
            }
            else
            {
                for (int i = 0; i < this.ParentForm.ParentForm.SystemConfig.EquipmentColumns; i++)
                {
                    // 영점표시
                    if (weightDatas[i].Status == DataStore.WeightStatus.WeightZero)
                        this.CollectionPictureBoxZero[i].Visible = true;
                    else
                        this.CollectionPictureBoxZero[i].Visible = false;
                }
            }
        }
        public void UpdateStartWeightDisplay(DataStore.EquipmentStatus status, Collection<WeightData> weightDatas)
        {
            this.UpdateStartWeightDisplay1(status, weightDatas[0]);
            this.UpdateStartWeightDisplay2(status, weightDatas[1]);
            this.UpdateStartWeightDisplay3(status, weightDatas[2]);
            this.UpdateStartWeightDisplay4(status, weightDatas[3]);
            this.UpdateStartWeightDisplay5(status, weightDatas[4]);
            this.UpdateStartWeightDisplay6(status, weightDatas[5]);
            this.UpdateStartWeightDisplay7(status, weightDatas[6]);
        }
        public void UpdateStartWeightDisplay1(DataStore.EquipmentStatus status, WeightData weightData)
        {
            if (weightData.JudgmentStatus == DataStore.JudgmentStatus.Empty)
                return;

            this.CollectionWeightStorageItem[0].SetValue(weightData.Weight, weightData.JudgmentStatus);

            this.SetLabelText(this.label1Col1Row, this.CollectionWeightStorageItem[0].Weight1, false, this.CollectionWeightStorageItem[0].Grade1);
            this.SetLabelText(this.label1Col2Row, this.CollectionWeightStorageItem[0].Weight2, false, this.CollectionWeightStorageItem[0].Grade2);
            this.SetLabelText(this.label1Col3Row, this.CollectionWeightStorageItem[0].Weight3, false, this.CollectionWeightStorageItem[0].Grade3);
            this.SetLabelText(this.label1Col4Row, this.CollectionWeightStorageItem[0].Weight4, false, this.CollectionWeightStorageItem[0].Grade4);
            this.SetLabelText(this.label1Col5Row, this.CollectionWeightStorageItem[0].Weight5, false, this.CollectionWeightStorageItem[0].Grade5);
            this.SetLabelText(this.label1Col6Row, this.CollectionWeightStorageItem[0].Weight6, false, this.CollectionWeightStorageItem[0].Grade6);
            this.SetLabelText(this.label1Col7Row, this.CollectionWeightStorageItem[0].Weight7, false, this.CollectionWeightStorageItem[0].Grade7);
            this.SetLabelText(this.label1Col8Row, this.CollectionWeightStorageItem[0].Weight8, false, this.CollectionWeightStorageItem[0].Grade8);
            this.SetLabelText(this.label1Col9Row, this.CollectionWeightStorageItem[0].Weight9, false, this.CollectionWeightStorageItem[0].Grade9);
            this.SetLabelText(this.label1Col10Row, this.CollectionWeightStorageItem[0].Weight10, false, this.CollectionWeightStorageItem[0].Grade10);
            this.SetLabelText(this.label1Col5Avg, this.CollectionWeightStorageItem[0].GetWeightTenAverage(), false, DataStore.JudgmentStatus.Empty);

            if (this.IsTotalAverageView == true)
                this.SetLabelText(this.label1AllAvg, this.CollectionWeightStorageItem[0].GetWeightTotalAverage(), true, DataStore.JudgmentStatus.Empty);
            else
                this.SetLabelText(this.label1AllAvg, this.CollectionWeightStorageItem[0].GetWeightTotalPassAverage(), true, DataStore.JudgmentStatus.Empty);
        }
        public void UpdateStartWeightDisplay2(DataStore.EquipmentStatus status, WeightData weightData)
        {
            if (weightData.JudgmentStatus == DataStore.JudgmentStatus.Empty)
                return;

            this.CollectionWeightStorageItem[1].SetValue(weightData.Weight, weightData.JudgmentStatus);

            this.SetLabelText(this.label2Col1Row, this.CollectionWeightStorageItem[1].Weight1, false, this.CollectionWeightStorageItem[1].Grade1);
            this.SetLabelText(this.label2Col2Row, this.CollectionWeightStorageItem[1].Weight2, false, this.CollectionWeightStorageItem[1].Grade2);
            this.SetLabelText(this.label2Col3Row, this.CollectionWeightStorageItem[1].Weight3, false, this.CollectionWeightStorageItem[1].Grade3);
            this.SetLabelText(this.label2Col4Row, this.CollectionWeightStorageItem[1].Weight4, false, this.CollectionWeightStorageItem[1].Grade4);
            this.SetLabelText(this.label2Col5Row, this.CollectionWeightStorageItem[1].Weight5, false, this.CollectionWeightStorageItem[1].Grade5);
            this.SetLabelText(this.label2Col6Row, this.CollectionWeightStorageItem[1].Weight6, false, this.CollectionWeightStorageItem[1].Grade6);
            this.SetLabelText(this.label2Col7Row, this.CollectionWeightStorageItem[1].Weight7, false, this.CollectionWeightStorageItem[1].Grade7);
            this.SetLabelText(this.label2Col8Row, this.CollectionWeightStorageItem[1].Weight8, false, this.CollectionWeightStorageItem[1].Grade8);
            this.SetLabelText(this.label2Col9Row, this.CollectionWeightStorageItem[1].Weight9, false, this.CollectionWeightStorageItem[1].Grade9);
            this.SetLabelText(this.label2Col10Row, this.CollectionWeightStorageItem[1].Weight10, false, this.CollectionWeightStorageItem[1].Grade10);
            this.SetLabelText(this.label2Col5Avg, this.CollectionWeightStorageItem[1].GetWeightTenAverage(), false, DataStore.JudgmentStatus.Empty);

            if (this.IsTotalAverageView == true)
                this.SetLabelText(this.label2AllAvg, this.CollectionWeightStorageItem[1].GetWeightTotalAverage(), true, DataStore.JudgmentStatus.Empty);
            else
                this.SetLabelText(this.label2AllAvg, this.CollectionWeightStorageItem[1].GetWeightTotalPassAverage(), true, DataStore.JudgmentStatus.Empty);
        }
        public void UpdateStartWeightDisplay3(DataStore.EquipmentStatus status, WeightData weightData)
        {
            if (weightData.JudgmentStatus == DataStore.JudgmentStatus.Empty)
                return;

            this.CollectionWeightStorageItem[2].SetValue(weightData.Weight, weightData.JudgmentStatus);

            this.SetLabelText(this.label3Col1Row, this.CollectionWeightStorageItem[2].Weight1, false, this.CollectionWeightStorageItem[2].Grade1);
            this.SetLabelText(this.label3Col2Row, this.CollectionWeightStorageItem[2].Weight2, false, this.CollectionWeightStorageItem[2].Grade2);
            this.SetLabelText(this.label3Col3Row, this.CollectionWeightStorageItem[2].Weight3, false, this.CollectionWeightStorageItem[2].Grade3);
            this.SetLabelText(this.label3Col4Row, this.CollectionWeightStorageItem[2].Weight4, false, this.CollectionWeightStorageItem[2].Grade4);
            this.SetLabelText(this.label3Col5Row, this.CollectionWeightStorageItem[2].Weight5, false, this.CollectionWeightStorageItem[2].Grade5);
            this.SetLabelText(this.label3Col6Row, this.CollectionWeightStorageItem[2].Weight6, false, this.CollectionWeightStorageItem[2].Grade6);
            this.SetLabelText(this.label3Col7Row, this.CollectionWeightStorageItem[2].Weight7, false, this.CollectionWeightStorageItem[2].Grade7);
            this.SetLabelText(this.label3Col8Row, this.CollectionWeightStorageItem[2].Weight8, false, this.CollectionWeightStorageItem[2].Grade8);
            this.SetLabelText(this.label3Col9Row, this.CollectionWeightStorageItem[2].Weight9, false, this.CollectionWeightStorageItem[2].Grade9);
            this.SetLabelText(this.label3Col10Row, this.CollectionWeightStorageItem[2].Weight10, false, this.CollectionWeightStorageItem[2].Grade10);
            this.SetLabelText(this.label3Col5Avg, this.CollectionWeightStorageItem[2].GetWeightTenAverage(), false, DataStore.JudgmentStatus.Empty);

            if (this.IsTotalAverageView == true)
                this.SetLabelText(this.label3AllAvg, this.CollectionWeightStorageItem[2].GetWeightTotalAverage(), true, DataStore.JudgmentStatus.Empty);
            else
                this.SetLabelText(this.label3AllAvg, this.CollectionWeightStorageItem[2].GetWeightTotalPassAverage(), true, DataStore.JudgmentStatus.Empty);
        }
        public void UpdateStartWeightDisplay4(DataStore.EquipmentStatus status, WeightData weightData)
        {
            if (weightData.JudgmentStatus == DataStore.JudgmentStatus.Empty)
                return;

            this.CollectionWeightStorageItem[3].SetValue(weightData.Weight, weightData.JudgmentStatus);

            this.SetLabelText(this.label4Col1Row, this.CollectionWeightStorageItem[3].Weight1, false, this.CollectionWeightStorageItem[3].Grade1);
            this.SetLabelText(this.label4Col2Row, this.CollectionWeightStorageItem[3].Weight2, false, this.CollectionWeightStorageItem[3].Grade2);
            this.SetLabelText(this.label4Col3Row, this.CollectionWeightStorageItem[3].Weight3, false, this.CollectionWeightStorageItem[3].Grade3);
            this.SetLabelText(this.label4Col4Row, this.CollectionWeightStorageItem[3].Weight4, false, this.CollectionWeightStorageItem[3].Grade4);
            this.SetLabelText(this.label4Col5Row, this.CollectionWeightStorageItem[3].Weight5, false, this.CollectionWeightStorageItem[3].Grade5);
            this.SetLabelText(this.label4Col6Row, this.CollectionWeightStorageItem[3].Weight6, false, this.CollectionWeightStorageItem[3].Grade6);
            this.SetLabelText(this.label4Col7Row, this.CollectionWeightStorageItem[3].Weight7, false, this.CollectionWeightStorageItem[3].Grade7);
            this.SetLabelText(this.label4Col8Row, this.CollectionWeightStorageItem[3].Weight8, false, this.CollectionWeightStorageItem[3].Grade8);
            this.SetLabelText(this.label4Col9Row, this.CollectionWeightStorageItem[3].Weight9, false, this.CollectionWeightStorageItem[3].Grade9);
            this.SetLabelText(this.label4Col10Row, this.CollectionWeightStorageItem[3].Weight10, false, this.CollectionWeightStorageItem[3].Grade10);
            this.SetLabelText(this.label4Col5Avg, this.CollectionWeightStorageItem[3].GetWeightTenAverage(), false, DataStore.JudgmentStatus.Empty);

            if (this.IsTotalAverageView == true)
                this.SetLabelText(this.label4AllAvg, this.CollectionWeightStorageItem[3].GetWeightTotalAverage(), true, DataStore.JudgmentStatus.Empty);
            else
                this.SetLabelText(this.label4AllAvg, this.CollectionWeightStorageItem[3].GetWeightTotalPassAverage(), true, DataStore.JudgmentStatus.Empty);
        }
        public void UpdateStartWeightDisplay5(DataStore.EquipmentStatus status, WeightData weightData)
        {
            if (weightData.JudgmentStatus == DataStore.JudgmentStatus.Empty)
                return;

            this.CollectionWeightStorageItem[4].SetValue(weightData.Weight, weightData.JudgmentStatus);

            this.SetLabelText(this.label5Col1Row, this.CollectionWeightStorageItem[4].Weight1, false, this.CollectionWeightStorageItem[4].Grade1);
            this.SetLabelText(this.label5Col2Row, this.CollectionWeightStorageItem[4].Weight2, false, this.CollectionWeightStorageItem[4].Grade2);
            this.SetLabelText(this.label5Col3Row, this.CollectionWeightStorageItem[4].Weight3, false, this.CollectionWeightStorageItem[4].Grade3);
            this.SetLabelText(this.label5Col4Row, this.CollectionWeightStorageItem[4].Weight4, false, this.CollectionWeightStorageItem[4].Grade4);
            this.SetLabelText(this.label5Col5Row, this.CollectionWeightStorageItem[4].Weight5, false, this.CollectionWeightStorageItem[4].Grade5);
            this.SetLabelText(this.label5Col6Row, this.CollectionWeightStorageItem[4].Weight6, false, this.CollectionWeightStorageItem[4].Grade6);
            this.SetLabelText(this.label5Col7Row, this.CollectionWeightStorageItem[4].Weight7, false, this.CollectionWeightStorageItem[4].Grade7);
            this.SetLabelText(this.label5Col8Row, this.CollectionWeightStorageItem[4].Weight8, false, this.CollectionWeightStorageItem[4].Grade8);
            this.SetLabelText(this.label5Col9Row, this.CollectionWeightStorageItem[4].Weight9, false, this.CollectionWeightStorageItem[4].Grade9);
            this.SetLabelText(this.label5Col10Row, this.CollectionWeightStorageItem[4].Weight10, false, this.CollectionWeightStorageItem[4].Grade10);
            this.SetLabelText(this.label5Col5Avg, this.CollectionWeightStorageItem[4].GetWeightTenAverage(), false, DataStore.JudgmentStatus.Empty);

            if (this.IsTotalAverageView == true)
                this.SetLabelText(this.label5AllAvg, this.CollectionWeightStorageItem[4].GetWeightTotalAverage(), true, DataStore.JudgmentStatus.Empty);
            else
                this.SetLabelText(this.label5AllAvg, this.CollectionWeightStorageItem[4].GetWeightTotalPassAverage(), true, DataStore.JudgmentStatus.Empty);
        }
        public void UpdateStartWeightDisplay6(DataStore.EquipmentStatus status, WeightData weightData)
        {
            if (weightData.JudgmentStatus == DataStore.JudgmentStatus.Empty)
                return;

            this.CollectionWeightStorageItem[5].SetValue(weightData.Weight, weightData.JudgmentStatus);

            this.SetLabelText(this.label6Col1Row, this.CollectionWeightStorageItem[5].Weight1, false, this.CollectionWeightStorageItem[5].Grade1);
            this.SetLabelText(this.label6Col2Row, this.CollectionWeightStorageItem[5].Weight2, false, this.CollectionWeightStorageItem[5].Grade2);
            this.SetLabelText(this.label6Col3Row, this.CollectionWeightStorageItem[5].Weight3, false, this.CollectionWeightStorageItem[5].Grade3);
            this.SetLabelText(this.label6Col4Row, this.CollectionWeightStorageItem[5].Weight4, false, this.CollectionWeightStorageItem[5].Grade4);
            this.SetLabelText(this.label6Col5Row, this.CollectionWeightStorageItem[5].Weight5, false, this.CollectionWeightStorageItem[5].Grade5);
            this.SetLabelText(this.label6Col6Row, this.CollectionWeightStorageItem[5].Weight6, false, this.CollectionWeightStorageItem[5].Grade6);
            this.SetLabelText(this.label6Col7Row, this.CollectionWeightStorageItem[5].Weight7, false, this.CollectionWeightStorageItem[5].Grade7);
            this.SetLabelText(this.label6Col8Row, this.CollectionWeightStorageItem[5].Weight8, false, this.CollectionWeightStorageItem[5].Grade8);
            this.SetLabelText(this.label6Col9Row, this.CollectionWeightStorageItem[5].Weight9, false, this.CollectionWeightStorageItem[5].Grade9);
            this.SetLabelText(this.label6Col10Row, this.CollectionWeightStorageItem[5].Weight10, false, this.CollectionWeightStorageItem[5].Grade10);
            this.SetLabelText(this.label6Col5Avg, this.CollectionWeightStorageItem[5].GetWeightTenAverage(), false, DataStore.JudgmentStatus.Empty);

            if (this.IsTotalAverageView == true)
                this.SetLabelText(this.label6AllAvg, this.CollectionWeightStorageItem[5].GetWeightTotalAverage(), true, DataStore.JudgmentStatus.Empty);
            else
                this.SetLabelText(this.label6AllAvg, this.CollectionWeightStorageItem[5].GetWeightTotalPassAverage(), true, DataStore.JudgmentStatus.Empty);
        }
        public void UpdateStartWeightDisplay7(DataStore.EquipmentStatus status, WeightData weightData)
        {
            if (weightData.JudgmentStatus == DataStore.JudgmentStatus.Empty)
                return;

            this.CollectionWeightStorageItem[6].SetValue(weightData.Weight, weightData.JudgmentStatus);

            this.SetLabelText(this.label7Col1Row, this.CollectionWeightStorageItem[6].Weight1, false, this.CollectionWeightStorageItem[6].Grade1);
            this.SetLabelText(this.label7Col2Row, this.CollectionWeightStorageItem[6].Weight2, false, this.CollectionWeightStorageItem[6].Grade2);
            this.SetLabelText(this.label7Col3Row, this.CollectionWeightStorageItem[6].Weight3, false, this.CollectionWeightStorageItem[6].Grade3);
            this.SetLabelText(this.label7Col4Row, this.CollectionWeightStorageItem[6].Weight4, false, this.CollectionWeightStorageItem[6].Grade4);
            this.SetLabelText(this.label7Col5Row, this.CollectionWeightStorageItem[6].Weight5, false, this.CollectionWeightStorageItem[6].Grade5);
            this.SetLabelText(this.label7Col6Row, this.CollectionWeightStorageItem[6].Weight6, false, this.CollectionWeightStorageItem[6].Grade6);
            this.SetLabelText(this.label7Col7Row, this.CollectionWeightStorageItem[6].Weight7, false, this.CollectionWeightStorageItem[6].Grade7);
            this.SetLabelText(this.label7Col8Row, this.CollectionWeightStorageItem[6].Weight8, false, this.CollectionWeightStorageItem[6].Grade8);
            this.SetLabelText(this.label7Col9Row, this.CollectionWeightStorageItem[6].Weight9, false, this.CollectionWeightStorageItem[6].Grade9);
            this.SetLabelText(this.label7Col10Row, this.CollectionWeightStorageItem[6].Weight10, false, this.CollectionWeightStorageItem[6].Grade10);
            this.SetLabelText(this.label7Col5Avg, this.CollectionWeightStorageItem[6].GetWeightTenAverage(), false, DataStore.JudgmentStatus.Empty);

            if (this.IsTotalAverageView == true)
                this.SetLabelText(this.label7AllAvg, this.CollectionWeightStorageItem[6].GetWeightTotalAverage(), true, DataStore.JudgmentStatus.Empty);
            else
                this.SetLabelText(this.label7AllAvg, this.CollectionWeightStorageItem[6].GetWeightTotalPassAverage(), true, DataStore.JudgmentStatus.Empty);
        }
        #endregion

        #region Event Handler
        private void labelAllAvg_Click(object sender, EventArgs e)
        {
            if (this.IsTotalAverageView == true)
                this.IsTotalAverageView = false;
            else
                this.IsTotalAverageView = true;

            this.UpdateTotalAverage(this.IsTotalAverageView);
        }
        #endregion
    }
}
