800 lines
34 KiB
C#
800 lines
34 KiB
C#
using System;
|
|
using System.Linq;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
|
|
using SmartX;
|
|
using INT_PT002.DataStore;
|
|
using INT_PT002.Controls;
|
|
|
|
namespace INT_PT002.Forms
|
|
{
|
|
public partial class FormMainDisplay1 : Form
|
|
{
|
|
#region Field
|
|
private int FlagIgnoreCNT;
|
|
|
|
private Color ColorProgressOn;
|
|
private Color ColorProgressOff;
|
|
private Color ColorResultPass;
|
|
private Color ColorResultNG;
|
|
private Color ColorResultNone;
|
|
|
|
private FormMain m_ParentForm;
|
|
|
|
private Collection<SmartLabel> CollectionCurrentValue;
|
|
private Collection<SmartLabel> CollectionMaxValue;
|
|
private Collection<SmartLabel> CollectionStDev;
|
|
private Collection<SmartLabel> CollectionResult;
|
|
private Collection<SmartLabel> CollectionResultSD;
|
|
private Collection<SmartLabel> CollectionResult1;
|
|
private Collection<SmartDraw> CollectionDraw;
|
|
|
|
private ControlMainDisplay ChildControl;
|
|
#endregion
|
|
|
|
#region Constructor
|
|
public FormMainDisplay1(FormMain parent)
|
|
{
|
|
InitializeComponent();
|
|
|
|
this.ParentForm = parent;
|
|
|
|
this.DefaultSetting();
|
|
this.InitializeDraw();
|
|
this.InitializeData();
|
|
}
|
|
#endregion
|
|
|
|
#region Property
|
|
public FormMain ParentForm
|
|
{
|
|
get { return this.m_ParentForm; }
|
|
private set { this.m_ParentForm = value; }
|
|
}
|
|
#endregion
|
|
|
|
#region Method
|
|
private void DefaultSetting()
|
|
{
|
|
this.FlagIgnoreCNT = 0;
|
|
|
|
this.ColorProgressOff = Color.Azure;
|
|
this.ColorProgressOn = Color.Lime;
|
|
this.ColorResultPass = Color.Green;
|
|
this.ColorResultNG = Color.Red;
|
|
this.ColorResultNone = Color.Black;
|
|
|
|
this.CollectionCurrentValue = new Collection<SmartLabel>();
|
|
this.CollectionCurrentValue.Add(this.labelCurrentValue5);
|
|
this.CollectionCurrentValue.Add(this.labelCurrentValue4);
|
|
this.CollectionCurrentValue.Add(this.labelCurrentValue3);
|
|
this.CollectionCurrentValue.Add(this.labelCurrentValue2);
|
|
this.CollectionCurrentValue.Add(this.labelCurrentValue1);
|
|
this.CollectionCurrentValue.Add(this.labelCurrentValue6);
|
|
this.CollectionCurrentValue.Add(this.labelCurrentValue7);
|
|
this.CollectionCurrentValue.Add(this.labelCurrentValue8);
|
|
this.CollectionCurrentValue.Add(this.labelCurrentValue9);
|
|
this.CollectionCurrentValue.Add(this.labelCurrentValue10);
|
|
|
|
this.CollectionMaxValue = new Collection<SmartLabel>();
|
|
this.CollectionMaxValue.Add(this.labelMaxValue5);
|
|
this.CollectionMaxValue.Add(this.labelMaxValue4);
|
|
this.CollectionMaxValue.Add(this.labelMaxValue3);
|
|
this.CollectionMaxValue.Add(this.labelMaxValue2);
|
|
this.CollectionMaxValue.Add(this.labelMaxValue1);
|
|
this.CollectionMaxValue.Add(this.labelMaxValue6);
|
|
this.CollectionMaxValue.Add(this.labelMaxValue7);
|
|
this.CollectionMaxValue.Add(this.labelMaxValue8);
|
|
this.CollectionMaxValue.Add(this.labelMaxValue9);
|
|
this.CollectionMaxValue.Add(this.labelMaxValue10);
|
|
|
|
this.CollectionStDev = new Collection<SmartLabel>();
|
|
this.CollectionStDev.Add(this.labelStDev5);
|
|
this.CollectionStDev.Add(this.labelStDev4);
|
|
this.CollectionStDev.Add(this.labelStDev3);
|
|
this.CollectionStDev.Add(this.labelStDev2);
|
|
this.CollectionStDev.Add(this.labelStDev1);
|
|
this.CollectionStDev.Add(this.labelStDev6);
|
|
this.CollectionStDev.Add(this.labelStDev7);
|
|
this.CollectionStDev.Add(this.labelStDev8);
|
|
this.CollectionStDev.Add(this.labelStDev9);
|
|
this.CollectionStDev.Add(this.labelStDev10);
|
|
|
|
this.CollectionResult = new Collection<SmartLabel>();
|
|
this.CollectionResult.Add(this.labelResult1);
|
|
this.CollectionResult.Add(this.labelResult2);
|
|
this.CollectionResult.Add(this.labelResult3);
|
|
this.CollectionResult.Add(this.labelResult4);
|
|
this.CollectionResult.Add(this.labelResult5);
|
|
this.CollectionResult.Add(this.labelResult6);
|
|
this.CollectionResult.Add(this.labelResult7);
|
|
this.CollectionResult.Add(this.labelResult8);
|
|
this.CollectionResult.Add(this.labelResult9);
|
|
this.CollectionResult.Add(this.labelResult10);
|
|
|
|
this.CollectionResultSD = new Collection<SmartLabel>();
|
|
this.CollectionResultSD.Add(this.labelResultSD1);
|
|
this.CollectionResultSD.Add(this.labelResultSD2);
|
|
this.CollectionResultSD.Add(this.labelResultSD3);
|
|
this.CollectionResultSD.Add(this.labelResultSD4);
|
|
this.CollectionResultSD.Add(this.labelResultSD5);
|
|
this.CollectionResultSD.Add(this.labelResultSD6);
|
|
this.CollectionResultSD.Add(this.labelResultSD7);
|
|
this.CollectionResultSD.Add(this.labelResultSD8);
|
|
this.CollectionResultSD.Add(this.labelResultSD9);
|
|
this.CollectionResultSD.Add(this.labelResultSD10);
|
|
|
|
this.CollectionResult1 = new Collection<SmartLabel>();
|
|
this.CollectionResult1.Add(this.labelResult1_1);
|
|
this.CollectionResult1.Add(this.labelResult2_1);
|
|
this.CollectionResult1.Add(this.labelResult3_1);
|
|
this.CollectionResult1.Add(this.labelResult4_1);
|
|
this.CollectionResult1.Add(this.labelResult5_1);
|
|
this.CollectionResult1.Add(this.labelResult6_1);
|
|
this.CollectionResult1.Add(this.labelResult7_1);
|
|
this.CollectionResult1.Add(this.labelResult8_1);
|
|
this.CollectionResult1.Add(this.labelResult9_1);
|
|
this.CollectionResult1.Add(this.labelResult10_1);
|
|
|
|
this.CollectionDraw = new Collection<SmartDraw>();
|
|
this.CollectionDraw.Add(this.smartDraw1);
|
|
this.CollectionDraw.Add(this.smartDraw2);
|
|
this.CollectionDraw.Add(this.smartDraw3);
|
|
this.CollectionDraw.Add(this.smartDraw4);
|
|
this.CollectionDraw.Add(this.smartDraw5);
|
|
this.CollectionDraw.Add(this.smartDraw6);
|
|
this.CollectionDraw.Add(this.smartDraw7);
|
|
this.CollectionDraw.Add(this.smartDraw8);
|
|
this.CollectionDraw.Add(this.smartDraw9);
|
|
this.CollectionDraw.Add(this.smartDraw10);
|
|
|
|
this.ChildControl = new ControlMainDisplay(this.ParentForm);
|
|
this.Controls.Add(this.ChildControl);
|
|
this.ChildControl.Location = new Point(0, 118);
|
|
this.ChildControl.BringToFront();
|
|
this.ChildControl.Visible = false;
|
|
}
|
|
private void InitializeData()
|
|
{
|
|
for (int i = 0; i < 10; i++)
|
|
{
|
|
this.CollectionCurrentValue[i].Text = "0.000";
|
|
this.CollectionMaxValue[i].Text = "0.000";
|
|
this.CollectionStDev[i].Text = "0.0000";
|
|
this.CollectionResult[i].Text = "-";
|
|
this.CollectionResult[i].TextColor = this.ColorResultNone;
|
|
this.CollectionResult1[i].Text = "-";
|
|
this.CollectionResult1[i].TextColor = this.ColorResultNone;
|
|
this.CollectionResult1[i].Font = new Font("New Gulim", 48, FontStyle.Bold);
|
|
this.CollectionResultSD[i].Text = "0.0000";
|
|
this.CollectionDraw[i].Chart.PutDataAllClear();
|
|
}
|
|
}
|
|
private void InitializeDraw()
|
|
{
|
|
for (int i = 0; i < 10; i++)
|
|
{
|
|
// SetChartConfig
|
|
this.CollectionDraw[i].Chart.SetChartConfig(0, 102, 192, 102, 1, SmartDraw.ChartRefresh.LEFTSCROLL);
|
|
// BackLayer "0" 기준선 표시
|
|
this.CollectionDraw[i].BackLayer.SetPenStyle(Color.Gray, 1);
|
|
this.CollectionDraw[i].BackLayer.Line(0, 90, 192, 90);
|
|
}
|
|
}
|
|
|
|
private void GetJudgmentResult(LeakData data, SmartLabel label1, SmartLabel label2)
|
|
{
|
|
string value = "";
|
|
|
|
switch (data.JudgmentStatus)
|
|
{
|
|
case Define.E_JudgmentStatus.None:
|
|
value = "-";
|
|
label1.TextColor = this.ColorResultNone;
|
|
label2.TextColor = this.ColorResultNone;
|
|
label2.Font = new Font("New Gulim", 40, FontStyle.Bold);
|
|
break;
|
|
case Define.E_JudgmentStatus.Pass:
|
|
value = "정상";
|
|
label1.TextColor = this.ColorResultPass;
|
|
label2.TextColor = this.ColorResultPass;
|
|
label2.Font = new Font("New Gulim", 40, FontStyle.Bold);
|
|
break;
|
|
case Define.E_JudgmentStatus.Ng:
|
|
value = "리크";
|
|
label1.TextColor = this.ColorResultNG;
|
|
label2.TextColor = this.ColorResultNG;
|
|
label2.Font = new Font("New Gulim", 40, FontStyle.Bold);
|
|
break;
|
|
case Define.E_JudgmentStatus.Error:
|
|
value = "제품 없음";
|
|
label1.TextColor = this.ColorResultNone;
|
|
label2.TextColor = this.ColorResultNone;
|
|
label2.Font = new Font("New Gulim", 20, FontStyle.Bold);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
|
|
if (label1.Text != value)
|
|
label1.Text = value;
|
|
if (label2.Text != value)
|
|
label2.Text = value;
|
|
}
|
|
|
|
private void UpdateProgressStatusDisplay(Define.E_ProgressStatus status)
|
|
{
|
|
switch (status)
|
|
{
|
|
case Define.E_ProgressStatus.None:
|
|
this.labelProgress0.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress1.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress2.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress3.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress4.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress5.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress6.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress7.BackGroundColor = this.ColorProgressOff;
|
|
break;
|
|
case Define.E_ProgressStatus.Initial:
|
|
this.labelProgress0.BackGroundColor = this.ColorProgressOn;
|
|
this.labelProgress1.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress2.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress3.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress4.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress5.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress6.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress7.BackGroundColor = this.ColorProgressOff;
|
|
break;
|
|
case Define.E_ProgressStatus.ProductEntry:
|
|
this.labelProgress0.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress1.BackGroundColor = this.ColorProgressOn;
|
|
this.labelProgress2.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress3.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress4.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress5.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress6.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress7.BackGroundColor = this.ColorProgressOff;
|
|
|
|
// Label Initialize
|
|
//this.InitializeLabel();
|
|
break;
|
|
case Define.E_ProgressStatus.ChamberConbined:
|
|
this.labelProgress0.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress1.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress2.BackGroundColor = this.ColorProgressOn;
|
|
this.labelProgress3.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress4.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress5.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress6.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress7.BackGroundColor = this.ColorProgressOff;
|
|
break;
|
|
case Define.E_ProgressStatus.VacuumStart:
|
|
this.labelProgress0.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress1.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress2.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress3.BackGroundColor = this.ColorProgressOn;
|
|
this.labelProgress4.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress5.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress6.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress7.BackGroundColor = this.ColorProgressOff;
|
|
break;
|
|
case Define.E_ProgressStatus.VacuumHold:
|
|
this.labelProgress0.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress1.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress2.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress3.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress4.BackGroundColor = this.ColorProgressOn;
|
|
this.labelProgress5.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress6.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress7.BackGroundColor = this.ColorProgressOff;
|
|
break;
|
|
case Define.E_ProgressStatus.Judgment:
|
|
break;
|
|
case Define.E_ProgressStatus.VacuumBreak:
|
|
this.labelProgress0.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress1.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress2.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress3.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress4.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress5.BackGroundColor = this.ColorProgressOn;
|
|
this.labelProgress6.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress7.BackGroundColor = this.ColorProgressOff;
|
|
break;
|
|
case Define.E_ProgressStatus.ChamberSeparation:
|
|
this.labelProgress0.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress1.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress2.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress3.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress4.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress5.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress6.BackGroundColor = this.ColorProgressOn;
|
|
this.labelProgress7.BackGroundColor = this.ColorProgressOff;
|
|
break;
|
|
case Define.E_ProgressStatus.ProductRelease:
|
|
this.labelProgress0.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress1.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress2.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress3.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress4.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress5.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress6.BackGroundColor = this.ColorProgressOff;
|
|
this.labelProgress7.BackGroundColor = this.ColorProgressOn;
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
private void UpdateDotGraphDisplay(SmartDraw draw, LeakData data)
|
|
{
|
|
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 UpdateNomalLeakDataDisplay(Collection<LeakData> datas)
|
|
{
|
|
string value = "";
|
|
bool bValue = false;
|
|
|
|
if (this.FlagIgnoreCNT == this.ParentForm.SystemConfig.Chart1DrawStep)
|
|
{
|
|
bValue = true;
|
|
this.FlagIgnoreCNT = 0;
|
|
}
|
|
else
|
|
this.FlagIgnoreCNT++;
|
|
|
|
this.UpdateProgressStatusDisplay(datas[0].ProgressStatus);
|
|
|
|
for (int i = 0; i < datas.Count; i++)
|
|
{
|
|
// Current Value
|
|
value = Helper.StringToDecimalPlaces(datas[i].CurrentValue, this.ParentForm.DecimalPlaces3);
|
|
if (datas[i].CurrentValueSign == "-")
|
|
value = string.Format("{0}{1}", datas[i].CurrentValueSign, value);
|
|
if (this.CollectionCurrentValue[i].Text != value)
|
|
this.CollectionCurrentValue[i].Text = value;
|
|
|
|
// Max Value
|
|
value = Helper.StringToDecimalPlaces(datas[i].MaxValue, this.ParentForm.DecimalPlaces3);
|
|
if (datas[i].MaxValueSign == "-")
|
|
value = string.Format("{0}{1}", datas[i].MaxValueSign, value);
|
|
if (this.CollectionMaxValue[i].Text != value)
|
|
this.CollectionMaxValue[i].Text = value;
|
|
|
|
// Standard Deviation
|
|
value = Helper.StringToDecimalPlaces(datas[i].StDev, this.ParentForm.DecimalPlaces4);
|
|
if (this.CollectionStDev[i].Text != value)
|
|
this.CollectionStDev[i].Text = value;
|
|
|
|
// Draw
|
|
if (bValue == true)
|
|
this.UpdateDotGraphDisplay(this.CollectionDraw[i], datas[i]);
|
|
}
|
|
|
|
this.ChildControl.UpdateNomalLeakDataDisplay(datas);
|
|
}
|
|
public void UpdateStartLeakDataDisplay(Collection<LeakData> datas)
|
|
{
|
|
this.timerOn.Enabled = false;
|
|
this.timerOff.Enabled = false;
|
|
|
|
for (int i = 0; i < 10; i++)
|
|
this.CollectionResult1[i].Visible = true;
|
|
|
|
this.UpdateStartLeakData1Display(datas[4]);
|
|
this.UpdateStartLeakData2Display(datas[3]);
|
|
this.UpdateStartLeakData3Display(datas[2]);
|
|
this.UpdateStartLeakData4Display(datas[1]);
|
|
this.UpdateStartLeakData5Display(datas[0]);
|
|
this.UpdateStartLeakData6Display(datas[5]);
|
|
this.UpdateStartLeakData7Display(datas[6]);
|
|
this.UpdateStartLeakData8Display(datas[7]);
|
|
this.UpdateStartLeakData9Display(datas[8]);
|
|
this.UpdateStartLeakData10Display(datas[9]);
|
|
|
|
this.ChildControl.UpdateStartLeakDataDisplay(datas);
|
|
}
|
|
public void UpdateStartLeakData1Display(LeakData data)
|
|
{
|
|
string value = "";
|
|
|
|
//value = data.JudgmentStatus.ToString();
|
|
//if (this.labelResult1.Text != value)
|
|
// this.labelResult1.Text = value;
|
|
this.GetJudgmentResult(data, this.labelResult1, this.labelResult1_1);
|
|
|
|
value = Helper.StringToDecimalPlaces(data.ResultSD, this.ParentForm.DecimalPlaces4);
|
|
if (this.labelResultSD1.Text != value)
|
|
this.labelResultSD1.Text = value;
|
|
}
|
|
public void UpdateStartLeakData2Display(LeakData data)
|
|
{
|
|
string value = "";
|
|
|
|
//value = data.JudgmentStatus.ToString();
|
|
//if (this.labelResult2.Text != value)
|
|
// this.labelResult2.Text = value;
|
|
this.GetJudgmentResult(data, this.labelResult2, this.labelResult2_1);
|
|
|
|
value = Helper.StringToDecimalPlaces(data.ResultSD, this.ParentForm.DecimalPlaces4);
|
|
if (this.labelResultSD2.Text != value)
|
|
this.labelResultSD2.Text = value;
|
|
}
|
|
public void UpdateStartLeakData3Display(LeakData data)
|
|
{
|
|
string value = "";
|
|
|
|
//value = data.JudgmentStatus.ToString();
|
|
//if (this.labelResult3.Text != value)
|
|
// this.labelResult3.Text = value;
|
|
this.GetJudgmentResult(data, this.labelResult3, this.labelResult3_1);
|
|
|
|
value = Helper.StringToDecimalPlaces(data.ResultSD, this.ParentForm.DecimalPlaces4);
|
|
if (this.labelResultSD3.Text != value)
|
|
this.labelResultSD3.Text = value;
|
|
}
|
|
public void UpdateStartLeakData4Display(LeakData data)
|
|
{
|
|
string value = "";
|
|
|
|
//value = data.JudgmentStatus.ToString();
|
|
//if (this.labelResult4.Text != value)
|
|
// this.labelResult4.Text = value;
|
|
this.GetJudgmentResult(data, this.labelResult4, this.labelResult4_1);
|
|
|
|
value = Helper.StringToDecimalPlaces(data.ResultSD, this.ParentForm.DecimalPlaces4);
|
|
if (this.labelResultSD4.Text != value)
|
|
this.labelResultSD4.Text = value;
|
|
}
|
|
public void UpdateStartLeakData5Display(LeakData data)
|
|
{
|
|
string value = "";
|
|
|
|
//value = data.JudgmentStatus.ToString();
|
|
//if (this.labelResult5.Text != value)
|
|
// this.labelResult5.Text = value;
|
|
this.GetJudgmentResult(data, this.labelResult5, this.labelResult5_1);
|
|
|
|
value = Helper.StringToDecimalPlaces(data.ResultSD, this.ParentForm.DecimalPlaces4);
|
|
if (this.labelResultSD5.Text != value)
|
|
this.labelResultSD5.Text = value;
|
|
}
|
|
public void UpdateStartLeakData6Display(LeakData data)
|
|
{
|
|
string value = "";
|
|
|
|
//value = data.JudgmentStatus.ToString();
|
|
//if (this.labelResult6.Text != value)
|
|
// this.labelResult6.Text = value;
|
|
this.GetJudgmentResult(data, this.labelResult6, this.labelResult6_1);
|
|
|
|
value = Helper.StringToDecimalPlaces(data.ResultSD, this.ParentForm.DecimalPlaces4);
|
|
if (this.labelResultSD6.Text != value)
|
|
this.labelResultSD6.Text = value;
|
|
}
|
|
public void UpdateStartLeakData7Display(LeakData data)
|
|
{
|
|
string value = "";
|
|
|
|
//value = data.JudgmentStatus.ToString();
|
|
//if (this.labelResult7.Text != value)
|
|
// this.labelResult7.Text = value;
|
|
this.GetJudgmentResult(data, this.labelResult7, this.labelResult7_1);
|
|
|
|
value = Helper.StringToDecimalPlaces(data.ResultSD, this.ParentForm.DecimalPlaces4);
|
|
if (this.labelResultSD7.Text != value)
|
|
this.labelResultSD7.Text = value;
|
|
}
|
|
public void UpdateStartLeakData8Display(LeakData data)
|
|
{
|
|
string value = "";
|
|
|
|
//value = data.JudgmentStatus.ToString();
|
|
//if (this.labelResult8.Text != value)
|
|
// this.labelResult8.Text = value;
|
|
this.GetJudgmentResult(data, this.labelResult8, this.labelResult8_1);
|
|
|
|
value = Helper.StringToDecimalPlaces(data.ResultSD, this.ParentForm.DecimalPlaces4);
|
|
if (this.labelResultSD8.Text != value)
|
|
this.labelResultSD8.Text = value;
|
|
}
|
|
public void UpdateStartLeakData9Display(LeakData data)
|
|
{
|
|
string value = "";
|
|
|
|
//value = data.JudgmentStatus.ToString();
|
|
//if (this.labelResult9.Text != value)
|
|
// this.labelResult9.Text = value;
|
|
this.GetJudgmentResult(data, this.labelResult9, this.labelResult9_1);
|
|
|
|
value = Helper.StringToDecimalPlaces(data.ResultSD, this.ParentForm.DecimalPlaces4);
|
|
if (this.labelResultSD9.Text != value)
|
|
this.labelResultSD9.Text = value;
|
|
}
|
|
public void UpdateStartLeakData10Display(LeakData data)
|
|
{
|
|
string value = "";
|
|
|
|
//value = data.JudgmentStatus.ToString();
|
|
//if (this.labelResult10.Text != value)
|
|
// this.labelResult10.Text = value;
|
|
this.GetJudgmentResult(data, this.labelResult10, this.labelResult10_1);
|
|
|
|
value = Helper.StringToDecimalPlaces(data.ResultSD, this.ParentForm.DecimalPlaces4);
|
|
if (this.labelResultSD10.Text != value)
|
|
this.labelResultSD10.Text = value;
|
|
}
|
|
public void UpdateDisplayTime()
|
|
{
|
|
this.labelTime.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
|
}
|
|
|
|
public void DisplayRefresh()
|
|
{
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region Event Handler
|
|
private void labelStop_Click(object sender, EventArgs e)
|
|
{
|
|
this.ParentForm.TransferData(CommunicationCommand.Start, CommunicationID.MainBoard);
|
|
}
|
|
private void labelStart_Click(object sender, EventArgs e)
|
|
{
|
|
this.ParentForm.TransferData(CommunicationCommand.Stop, CommunicationID.MainBoard);
|
|
}
|
|
private void buttonSetting_Click(object sender, EventArgs e)
|
|
{
|
|
this.ParentForm.ChildFormConfig.DisplayRefresh();
|
|
this.ParentForm.FormChange((int)Define.E_FormStore.FormConfiguration);
|
|
}
|
|
private void buttonMainDisplayGraph_Click(object sender, EventArgs e)
|
|
{
|
|
this.ChildControl.DisplayRefresh(1);
|
|
this.ChildControl.Visible = true;
|
|
}
|
|
private void buttonCut_Click(object sender, EventArgs e)
|
|
{
|
|
this.ParentForm.TransferData(CommunicationCommand.CutInpupt, CommunicationID.MainBoard);
|
|
|
|
this.InitializeData();
|
|
this.ChildControl.ClearAllData();
|
|
|
|
for (int i = 0; i < 10; i++)
|
|
{
|
|
this.CollectionResult1[i].Font = new Font("New Gulim", 20, FontStyle.Bold);
|
|
this.CollectionResult1[i].Text = "검사 중..";
|
|
}
|
|
|
|
this.timerOn.Enabled = true;
|
|
}
|
|
|
|
private void smartDraw1_Click(object sender, EventArgs e)
|
|
{
|
|
this.ChildControl.DisplayRefresh(1);
|
|
this.ChildControl.Visible = true;
|
|
}
|
|
private void smartDraw2_Click(object sender, EventArgs e)
|
|
{
|
|
this.ChildControl.DisplayRefresh(2);
|
|
this.ChildControl.Visible = true;
|
|
}
|
|
private void smartDraw3_Click(object sender, EventArgs e)
|
|
{
|
|
this.ChildControl.DisplayRefresh(3);
|
|
this.ChildControl.Visible = true;
|
|
}
|
|
private void smartDraw4_Click(object sender, EventArgs e)
|
|
{
|
|
this.ChildControl.DisplayRefresh(4);
|
|
this.ChildControl.Visible = true;
|
|
}
|
|
private void smartDraw5_Click(object sender, EventArgs e)
|
|
{
|
|
this.ChildControl.DisplayRefresh(5);
|
|
this.ChildControl.Visible = true;
|
|
}
|
|
private void smartDraw6_Click(object sender, EventArgs e)
|
|
{
|
|
this.ChildControl.DisplayRefresh(6);
|
|
this.ChildControl.Visible = true;
|
|
}
|
|
private void smartDraw7_Click(object sender, EventArgs e)
|
|
{
|
|
this.ChildControl.DisplayRefresh(7);
|
|
this.ChildControl.Visible = true;
|
|
}
|
|
private void smartDraw8_Click(object sender, EventArgs e)
|
|
{
|
|
this.ChildControl.DisplayRefresh(8);
|
|
this.ChildControl.Visible = true;
|
|
}
|
|
private void smartDraw9_Click(object sender, EventArgs e)
|
|
{
|
|
this.ChildControl.DisplayRefresh(9);
|
|
this.ChildControl.Visible = true;
|
|
}
|
|
private void smartDraw10_Click(object sender, EventArgs e)
|
|
{
|
|
this.ChildControl.DisplayRefresh(10);
|
|
this.ChildControl.Visible = true;
|
|
}
|
|
private void buttonClear_Click(object sender, EventArgs e)
|
|
{
|
|
this.InitializeData();
|
|
this.ChildControl.ClearAllData();
|
|
}
|
|
|
|
private void timerOn_Tick(object sender, EventArgs e)
|
|
{
|
|
this.timerOn.Enabled = false;
|
|
|
|
for (int i = 0; i < 10; i++)
|
|
this.CollectionResult1[i].Visible = false;
|
|
|
|
this.timerOff.Enabled = true;
|
|
}
|
|
private void timerOff_Tick(object sender, EventArgs e)
|
|
{
|
|
this.timerOff.Enabled = false;
|
|
|
|
for (int i = 0; i < 10; i++)
|
|
this.CollectionResult1[i].Visible = true;
|
|
|
|
this.timerOn.Enabled = true;
|
|
}
|
|
#endregion
|
|
|
|
private void smartButton1_Click(object sender, EventArgs e)
|
|
{
|
|
int iValue1 = 0, iValue2 = 0;
|
|
|
|
iValue1 = -2000;
|
|
|
|
this.smartDraw1.Chart.PutDataAllClear();
|
|
this.smartDraw1.LayerSupport = SmartDraw.LayerSupportOption.BackAndDraw;
|
|
this.smartDraw1.Chart.SetChartConfig(0, 110, 192, 110, 1, SmartDraw.ChartRefresh.LEFTSCROLL);
|
|
this.smartDraw1.Chart.ChartDrawStep = 1;
|
|
this.smartDraw1.SetPenStyle(Color.Green, 2, SmartDraw.PenStyles.SOLID);
|
|
|
|
for (int j = 0; j < 192; j++)
|
|
{
|
|
iValue2 = (iValue1 + 2000) / 100;
|
|
this.smartDraw1.Chart.PutData(iValue2);
|
|
}
|
|
|
|
}
|
|
private void smartButton4_Click(object sender, EventArgs e)
|
|
{
|
|
int iValue1 = 0, iValue2 = 0;
|
|
|
|
iValue1 = 0;
|
|
|
|
this.smartDraw1.Chart.PutDataAllClear();
|
|
this.smartDraw1.LayerSupport = SmartDraw.LayerSupportOption.BackAndDraw;
|
|
this.smartDraw1.Chart.SetChartConfig(0, 110, 192, 110, 1, SmartDraw.ChartRefresh.LEFTSCROLL);
|
|
this.smartDraw1.Chart.ChartDrawStep = 1;
|
|
this.smartDraw1.SetPenStyle(Color.Green, 2, SmartDraw.PenStyles.SOLID);
|
|
|
|
for (int j = 0; j < 192; j++)
|
|
{
|
|
iValue2 = (iValue1 + 2000) / 100;
|
|
this.smartDraw1.Chart.PutData(iValue2);
|
|
}
|
|
|
|
}
|
|
private void smartButton5_Click(object sender, EventArgs e)
|
|
{
|
|
int iValue1 = 0, iValue2 = 0;
|
|
|
|
iValue1 = 7000;
|
|
|
|
this.smartDraw1.Chart.PutDataAllClear();
|
|
this.smartDraw1.LayerSupport = SmartDraw.LayerSupportOption.BackAndDraw;
|
|
this.smartDraw1.Chart.SetChartConfig(0, 110, 192, 110, 1, SmartDraw.ChartRefresh.LEFTSCROLL);
|
|
this.smartDraw1.Chart.ChartDrawStep = 1;
|
|
this.smartDraw1.SetPenStyle(Color.Green, 2, SmartDraw.PenStyles.SOLID);
|
|
|
|
for (int j = 0; j < 192; j++)
|
|
{
|
|
iValue2 = (iValue1 + 2000) / 100;
|
|
this.smartDraw1.Chart.PutData(iValue2);
|
|
}
|
|
|
|
}
|
|
private void smartButton6_Click(object sender, EventArgs e)
|
|
{
|
|
int iValue1 = 0, iValue2 = 0, iValue3 = 0;
|
|
|
|
iValue1 = -1000;
|
|
|
|
//this.smartDraw1.Chart.PutDataAllClear();
|
|
//this.smartDraw1.LayerSupport = SmartDraw.LayerSupportOption.BackAndDraw;
|
|
// this.smartDraw1.Chart.SetChartConfig(0, 110, 192, 110, 1, SmartDraw.ChartRefresh.LEFTSCROLL);
|
|
this.smartDraw1.Chart.SetChartConfig();
|
|
//this.smartDraw1.Chart.ChartDrawStep = 1;
|
|
//this.smartDraw1.SetPenStyle(Color.Green, 2, SmartDraw.PenStyles.SOLID);
|
|
|
|
for (int j = 0; j < 30; j++)
|
|
{
|
|
iValue2 = (iValue1 + 2000) / 100;
|
|
this.smartDraw1.Chart.PutData(iValue2);
|
|
}
|
|
|
|
iValue3 = -1000;
|
|
for (int j = 0; j < 10; j++)
|
|
{
|
|
iValue2 = ((iValue3 + 2000) / 100) + 7;
|
|
iValue3 = iValue2;
|
|
this.smartDraw1.Chart.PutData(iValue2);
|
|
}
|
|
|
|
iValue1 = 7000;
|
|
for (int j = 0; j < 110; j++)
|
|
{
|
|
iValue2 = (iValue1 + 2000) / 100;
|
|
this.smartDraw1.Chart.PutData(iValue2);
|
|
}
|
|
iValue3 = 7000;
|
|
for (int j = 0; j < 10; j++)
|
|
{
|
|
iValue2 = ((iValue3 + 2000) / 100) - 7;
|
|
iValue3 = iValue2;
|
|
this.smartDraw1.Chart.PutData(iValue2);
|
|
}
|
|
|
|
iValue1 = -1000;
|
|
for (int j = 0; j < 30; j++)
|
|
{
|
|
iValue2 = (iValue1 + 2000) / 100;
|
|
this.smartDraw1.Chart.PutData(iValue2);
|
|
}
|
|
}
|
|
|
|
private void buttonExit_Click(object sender, EventArgs e)
|
|
{
|
|
this.ParentForm.CloseSmartUartLink();
|
|
this.ParentForm.Dispose();
|
|
this.ParentForm.Close();
|
|
}
|
|
}
|
|
} |