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 INT63DC_6CH.Forms; namespace INT63DC_6CH.Controls { public partial class ControlMainDisplayTable7 : UserControl { #region Field private FormMainDisplay m_ParentForm; private Color WeightOverColor = Color.Red; private Color WeightStandardColor = Color.Black; private Color WeightUnderColor = Color.Red; private Color WeightSamplingDataColor = Color.Blue; private Collection CollectionPictureBoxZero; private Collection CollectionPictureBoxBypass; private Collection CollectionLabelWeightValue1; private Collection CollectionLabelWeightValue2; private Collection CollectionLabelWeightValue3; private Collection CollectionLabelWeightValue4; private Collection CollectionLabelWeightValue5; private Collection CollectionLabelWeightValue6; private Collection CollectionLabelWeightValue7; private Collection 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(); 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(); 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(); this.CollectionWeightStorageItem.Clear(); for (int i = 0; i < 7; i++) this.CollectionWeightStorageItem.Add(new WeightStorageItem()); #region Add Label this.CollectionLabelWeightValue1 = new Collection(); 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(); 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(); 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(); 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(); 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(); 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(); 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++) { Helper.SetTableLabelProperty(this.CollectionLabelWeightValue1[i]); Helper.SetTableLabelProperty(this.CollectionLabelWeightValue2[i]); Helper.SetTableLabelProperty(this.CollectionLabelWeightValue3[i]); Helper.SetTableLabelProperty(this.CollectionLabelWeightValue4[i]); Helper.SetTableLabelProperty(this.CollectionLabelWeightValue5[i]); Helper.SetTableLabelProperty(this.CollectionLabelWeightValue6[i]); Helper.SetTableLabelProperty(this.CollectionLabelWeightValue7[i]); } this.UpdateLabelDisplay(); } public void Clear() { foreach (WeightStorageItem weight in this.CollectionWeightStorageItem) weight.AllClear(); this.UpdateLabelDisplay(); } private void UpdateLabelDisplay() { this.UpdateLabelDisplayLane1(); this.UpdateLabelDisplayLane2(); this.UpdateLabelDisplayLane3(); this.UpdateLabelDisplayLane4(); this.UpdateLabelDisplayLane5(); this.UpdateLabelDisplayLane6(); this.UpdateLabelDisplayLane7(); } private void UpdateLabelDisplayLane1() { // Lane 1 this.CollectionWeightStorageItem[0].SetQueueData(); Helper.SetTableLabelValue(this.label1Col1Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[0].C_StorageItem[0]); Helper.SetTableLabelValue(this.label1Col2Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[0].C_StorageItem[1]); Helper.SetTableLabelValue(this.label1Col3Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[0].C_StorageItem[2]); Helper.SetTableLabelValue(this.label1Col4Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[0].C_StorageItem[3]); Helper.SetTableLabelValue(this.label1Col5Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[0].C_StorageItem[4]); Helper.SetTableLabelValue(this.label1Col6Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[0].C_StorageItem[5]); Helper.SetTableLabelValue(this.label1Col7Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[0].C_StorageItem[6]); Helper.SetTableLabelValue(this.label1Col8Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[0].C_StorageItem[7]); Helper.SetTableLabelValue(this.label1Col9Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[0].C_StorageItem[8]); Helper.SetTableLabelValue(this.label1Col10Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[0].C_StorageItem[9]); Helper.SetTableLabelValue(this.label1Col5Avg, this.ParentForm.ParentForm.CurrentProductItem, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[0].WeightTenAverage()); Helper.SetTableLabelValue(this.label1AllAvg, this.ParentForm.ParentForm.CurrentProductItem, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[0].WeightTotalAverage()); } private void UpdateLabelDisplayLane2() { // Lane 2 this.CollectionWeightStorageItem[1].SetQueueData(); Helper.SetTableLabelValue(this.label2Col1Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[1].C_StorageItem[0]); Helper.SetTableLabelValue(this.label2Col2Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[1].C_StorageItem[1]); Helper.SetTableLabelValue(this.label2Col3Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[1].C_StorageItem[2]); Helper.SetTableLabelValue(this.label2Col4Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[1].C_StorageItem[3]); Helper.SetTableLabelValue(this.label2Col5Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[1].C_StorageItem[4]); Helper.SetTableLabelValue(this.label2Col6Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[1].C_StorageItem[5]); Helper.SetTableLabelValue(this.label2Col7Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[1].C_StorageItem[6]); Helper.SetTableLabelValue(this.label2Col8Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[1].C_StorageItem[7]); Helper.SetTableLabelValue(this.label2Col9Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[1].C_StorageItem[8]); Helper.SetTableLabelValue(this.label2Col10Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[1].C_StorageItem[9]); Helper.SetTableLabelValue(this.label2Col5Avg, this.ParentForm.ParentForm.CurrentProductItem, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[1].WeightTenAverage()); Helper.SetTableLabelValue(this.label2AllAvg, this.ParentForm.ParentForm.CurrentProductItem, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[1].WeightTotalAverage()); } private void UpdateLabelDisplayLane3() { // Lane 3 this.CollectionWeightStorageItem[2].SetQueueData(); Helper.SetTableLabelValue(this.label3Col1Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[2].C_StorageItem[0]); Helper.SetTableLabelValue(this.label3Col2Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[2].C_StorageItem[1]); Helper.SetTableLabelValue(this.label3Col3Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[2].C_StorageItem[2]); Helper.SetTableLabelValue(this.label3Col4Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[2].C_StorageItem[3]); Helper.SetTableLabelValue(this.label3Col5Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[2].C_StorageItem[4]); Helper.SetTableLabelValue(this.label3Col6Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[2].C_StorageItem[5]); Helper.SetTableLabelValue(this.label3Col7Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[2].C_StorageItem[6]); Helper.SetTableLabelValue(this.label3Col8Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[2].C_StorageItem[7]); Helper.SetTableLabelValue(this.label3Col9Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[2].C_StorageItem[8]); Helper.SetTableLabelValue(this.label3Col10Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[2].C_StorageItem[9]); Helper.SetTableLabelValue(this.label3Col5Avg, this.ParentForm.ParentForm.CurrentProductItem, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[2].WeightTenAverage()); Helper.SetTableLabelValue(this.label3AllAvg, this.ParentForm.ParentForm.CurrentProductItem, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[2].WeightTotalAverage()); } private void UpdateLabelDisplayLane4() { // Lane 4 this.CollectionWeightStorageItem[3].SetQueueData(); Helper.SetTableLabelValue(this.label4Col1Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[3].C_StorageItem[0]); Helper.SetTableLabelValue(this.label4Col2Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[3].C_StorageItem[1]); Helper.SetTableLabelValue(this.label4Col3Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[3].C_StorageItem[2]); Helper.SetTableLabelValue(this.label4Col4Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[3].C_StorageItem[3]); Helper.SetTableLabelValue(this.label4Col5Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[3].C_StorageItem[4]); Helper.SetTableLabelValue(this.label4Col6Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[3].C_StorageItem[5]); Helper.SetTableLabelValue(this.label4Col7Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[3].C_StorageItem[6]); Helper.SetTableLabelValue(this.label4Col8Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[3].C_StorageItem[7]); Helper.SetTableLabelValue(this.label4Col9Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[3].C_StorageItem[8]); Helper.SetTableLabelValue(this.label4Col10Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[3].C_StorageItem[9]); Helper.SetTableLabelValue(this.label4Col5Avg, this.ParentForm.ParentForm.CurrentProductItem, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[3].WeightTenAverage()); Helper.SetTableLabelValue(this.label4AllAvg, this.ParentForm.ParentForm.CurrentProductItem, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[3].WeightTotalAverage()); } private void UpdateLabelDisplayLane5() { // Lane 5 this.CollectionWeightStorageItem[4].SetQueueData(); Helper.SetTableLabelValue(this.label5Col1Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[4].C_StorageItem[0]); Helper.SetTableLabelValue(this.label5Col2Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[4].C_StorageItem[1]); Helper.SetTableLabelValue(this.label5Col3Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[4].C_StorageItem[2]); Helper.SetTableLabelValue(this.label5Col4Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[4].C_StorageItem[3]); Helper.SetTableLabelValue(this.label5Col5Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[4].C_StorageItem[4]); Helper.SetTableLabelValue(this.label5Col6Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[4].C_StorageItem[5]); Helper.SetTableLabelValue(this.label5Col7Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[4].C_StorageItem[6]); Helper.SetTableLabelValue(this.label5Col8Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[4].C_StorageItem[7]); Helper.SetTableLabelValue(this.label5Col9Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[4].C_StorageItem[8]); Helper.SetTableLabelValue(this.label5Col10Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[4].C_StorageItem[9]); Helper.SetTableLabelValue(this.label5Col5Avg, this.ParentForm.ParentForm.CurrentProductItem, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[4].WeightTenAverage()); Helper.SetTableLabelValue(this.label5AllAvg, this.ParentForm.ParentForm.CurrentProductItem, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[4].WeightTotalAverage()); } private void UpdateLabelDisplayLane6() { // Lane 6 this.CollectionWeightStorageItem[5].SetQueueData(); Helper.SetTableLabelValue(this.label6Col1Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[5].C_StorageItem[0]); Helper.SetTableLabelValue(this.label6Col2Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[5].C_StorageItem[1]); Helper.SetTableLabelValue(this.label6Col3Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[5].C_StorageItem[2]); Helper.SetTableLabelValue(this.label6Col4Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[5].C_StorageItem[3]); Helper.SetTableLabelValue(this.label6Col5Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[5].C_StorageItem[4]); Helper.SetTableLabelValue(this.label6Col6Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[5].C_StorageItem[5]); Helper.SetTableLabelValue(this.label6Col7Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[5].C_StorageItem[6]); Helper.SetTableLabelValue(this.label6Col8Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[5].C_StorageItem[7]); Helper.SetTableLabelValue(this.label6Col9Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[5].C_StorageItem[8]); Helper.SetTableLabelValue(this.label6Col10Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[5].C_StorageItem[9]); Helper.SetTableLabelValue(this.label6Col5Avg, this.ParentForm.ParentForm.CurrentProductItem, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[5].WeightTenAverage()); Helper.SetTableLabelValue(this.label6AllAvg, this.ParentForm.ParentForm.CurrentProductItem, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[5].WeightTotalAverage()); } private void UpdateLabelDisplayLane7() { // Lane 7 this.CollectionWeightStorageItem[6].SetQueueData(); Helper.SetTableLabelValue(this.label7Col1Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[6].C_StorageItem[0]); Helper.SetTableLabelValue(this.label7Col2Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[6].C_StorageItem[1]); Helper.SetTableLabelValue(this.label7Col3Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[6].C_StorageItem[2]); Helper.SetTableLabelValue(this.label7Col4Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[6].C_StorageItem[3]); Helper.SetTableLabelValue(this.label7Col5Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[6].C_StorageItem[4]); Helper.SetTableLabelValue(this.label7Col6Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[6].C_StorageItem[5]); Helper.SetTableLabelValue(this.label7Col7Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[6].C_StorageItem[6]); Helper.SetTableLabelValue(this.label7Col8Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[6].C_StorageItem[7]); Helper.SetTableLabelValue(this.label7Col9Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[6].C_StorageItem[8]); Helper.SetTableLabelValue(this.label7Col10Row, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[6].C_StorageItem[9]); Helper.SetTableLabelValue(this.label7Col5Avg, this.ParentForm.ParentForm.CurrentProductItem, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[6].WeightTenAverage()); Helper.SetTableLabelValue(this.label7AllAvg, this.ParentForm.ParentForm.CurrentProductItem, this.ParentForm.ParentForm.SystemConfig, this.CollectionWeightStorageItem[6].WeightTotalAverage()); } public void UpdateEquipmentStatusDisplay(DataStore.EquipmentStatus status) { } public void UpdateCurrentProductDisplay(DataStore.EquipmentStatus status, Collection weightDatas) { // 초기화 } public void UpdateBypassDisplay(Collection 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 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 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) { bool empty = false; if (weightData.JudgmentStatus == DataStore.JudgmentStatus.None) return; if (weightData.JudgmentStatus == DataStore.JudgmentStatus.Empty) empty = true; this.CollectionWeightStorageItem[0].SetValue(weightData.Weight, weightData.IsSamplingData, empty, weightData.JudgmentStatus); this.UpdateLabelDisplayLane1(); } public void UpdateStartWeightDisplay2(DataStore.EquipmentStatus status, WeightData weightData) { bool empty = false; if (weightData.JudgmentStatus == DataStore.JudgmentStatus.None) return; if (weightData.JudgmentStatus == DataStore.JudgmentStatus.Empty) empty = true; this.CollectionWeightStorageItem[1].SetValue(weightData.Weight, weightData.IsSamplingData, empty, weightData.JudgmentStatus); this.UpdateLabelDisplayLane2(); } public void UpdateStartWeightDisplay3(DataStore.EquipmentStatus status, WeightData weightData) { bool empty = false; if (weightData.JudgmentStatus == DataStore.JudgmentStatus.None) return; if (weightData.JudgmentStatus == DataStore.JudgmentStatus.Empty) empty = true; this.CollectionWeightStorageItem[2].SetValue(weightData.Weight, weightData.IsSamplingData, empty, weightData.JudgmentStatus); this.UpdateLabelDisplayLane3(); } public void UpdateStartWeightDisplay4(DataStore.EquipmentStatus status, WeightData weightData) { bool empty = false; if (weightData.JudgmentStatus == DataStore.JudgmentStatus.None) return; if (weightData.JudgmentStatus == DataStore.JudgmentStatus.Empty) empty = true; this.CollectionWeightStorageItem[3].SetValue(weightData.Weight, weightData.IsSamplingData, empty, weightData.JudgmentStatus); this.UpdateLabelDisplayLane4(); } public void UpdateStartWeightDisplay5(DataStore.EquipmentStatus status, WeightData weightData) { bool empty = false; if (weightData.JudgmentStatus == DataStore.JudgmentStatus.None) return; if (weightData.JudgmentStatus == DataStore.JudgmentStatus.Empty) empty = true; this.CollectionWeightStorageItem[4].SetValue(weightData.Weight, weightData.IsSamplingData, empty, weightData.JudgmentStatus); this.UpdateLabelDisplayLane5(); } public void UpdateStartWeightDisplay6(DataStore.EquipmentStatus status, WeightData weightData) { bool empty = false; if (weightData.JudgmentStatus == DataStore.JudgmentStatus.None) return; if (weightData.JudgmentStatus == DataStore.JudgmentStatus.Empty) empty = true; this.CollectionWeightStorageItem[5].SetValue(weightData.Weight, weightData.IsSamplingData, empty, weightData.JudgmentStatus); this.UpdateLabelDisplayLane6(); } public void UpdateStartWeightDisplay7(DataStore.EquipmentStatus status, WeightData weightData) { bool empty = false; if (weightData.JudgmentStatus == DataStore.JudgmentStatus.None) return; if (weightData.JudgmentStatus == DataStore.JudgmentStatus.Empty) empty = true; this.CollectionWeightStorageItem[6].SetValue(weightData.Weight, weightData.IsSamplingData, empty, weightData.JudgmentStatus); this.UpdateLabelDisplayLane7(); } #endregion } }