[성현모] History OK Avg,min,max 추가
This commit is contained in:
@ -39,6 +39,8 @@
|
|||||||
this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
|
this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
|
||||||
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||||
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
|
this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
|
||||||
|
this.labelControlOKTestTime = new DevExpress.XtraEditors.LabelControl();
|
||||||
|
this.labelControl4 = new DevExpress.XtraEditors.LabelControl();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.gridControlMain)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.gridControlMain)).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.gridViewMain)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.gridViewMain)).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
|
||||||
@ -122,6 +124,8 @@
|
|||||||
//
|
//
|
||||||
// groupControl1
|
// groupControl1
|
||||||
//
|
//
|
||||||
|
this.groupControl1.Controls.Add(this.labelControlOKTestTime);
|
||||||
|
this.groupControl1.Controls.Add(this.labelControl4);
|
||||||
this.groupControl1.Controls.Add(this.labelControlTestTime);
|
this.groupControl1.Controls.Add(this.labelControlTestTime);
|
||||||
this.groupControl1.Controls.Add(this.labelControl3);
|
this.groupControl1.Controls.Add(this.labelControl3);
|
||||||
this.groupControl1.Controls.Add(this.labelControlTestResult);
|
this.groupControl1.Controls.Add(this.labelControlTestResult);
|
||||||
@ -131,10 +135,11 @@
|
|||||||
this.groupControl1.Size = new System.Drawing.Size(912, 53);
|
this.groupControl1.Size = new System.Drawing.Size(912, 53);
|
||||||
this.groupControl1.TabIndex = 5;
|
this.groupControl1.TabIndex = 5;
|
||||||
this.groupControl1.Text = "Summary";
|
this.groupControl1.Text = "Summary";
|
||||||
|
this.groupControl1.Paint += new System.Windows.Forms.PaintEventHandler(this.groupControl1_Paint);
|
||||||
//
|
//
|
||||||
// labelControlTestTime
|
// labelControlTestTime
|
||||||
//
|
//
|
||||||
this.labelControlTestTime.Location = new System.Drawing.Point(453, 29);
|
this.labelControlTestTime.Location = new System.Drawing.Point(522, 28);
|
||||||
this.labelControlTestTime.Name = "labelControlTestTime";
|
this.labelControlTestTime.Name = "labelControlTestTime";
|
||||||
this.labelControlTestTime.Size = new System.Drawing.Size(4, 14);
|
this.labelControlTestTime.Size = new System.Drawing.Size(4, 14);
|
||||||
this.labelControlTestTime.TabIndex = 3;
|
this.labelControlTestTime.TabIndex = 3;
|
||||||
@ -142,11 +147,11 @@
|
|||||||
//
|
//
|
||||||
// labelControl3
|
// labelControl3
|
||||||
//
|
//
|
||||||
this.labelControl3.Location = new System.Drawing.Point(379, 29);
|
this.labelControl3.Location = new System.Drawing.Point(416, 28);
|
||||||
this.labelControl3.Name = "labelControl3";
|
this.labelControl3.Name = "labelControl3";
|
||||||
this.labelControl3.Size = new System.Drawing.Size(68, 14);
|
this.labelControl3.Size = new System.Drawing.Size(100, 14);
|
||||||
this.labelControl3.TabIndex = 2;
|
this.labelControl3.TabIndex = 2;
|
||||||
this.labelControl3.Text = "Test Time : ";
|
this.labelControl3.Text = "Total Test Time : ";
|
||||||
//
|
//
|
||||||
// labelControlTestResult
|
// labelControlTestResult
|
||||||
//
|
//
|
||||||
@ -199,6 +204,22 @@
|
|||||||
this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
|
this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
|
||||||
this.layoutControlItem3.TextVisible = false;
|
this.layoutControlItem3.TextVisible = false;
|
||||||
//
|
//
|
||||||
|
// labelControlOKTestTime
|
||||||
|
//
|
||||||
|
this.labelControlOKTestTime.Location = new System.Drawing.Point(885, 28);
|
||||||
|
this.labelControlOKTestTime.Name = "labelControlOKTestTime";
|
||||||
|
this.labelControlOKTestTime.Size = new System.Drawing.Size(4, 14);
|
||||||
|
this.labelControlOKTestTime.TabIndex = 5;
|
||||||
|
this.labelControlOKTestTime.Text = "-";
|
||||||
|
//
|
||||||
|
// labelControl4
|
||||||
|
//
|
||||||
|
this.labelControl4.Location = new System.Drawing.Point(791, 28);
|
||||||
|
this.labelControl4.Name = "labelControl4";
|
||||||
|
this.labelControl4.Size = new System.Drawing.Size(88, 14);
|
||||||
|
this.labelControl4.TabIndex = 4;
|
||||||
|
this.labelControl4.Text = "OK Test Time : ";
|
||||||
|
//
|
||||||
// UcTRATestHistHost
|
// UcTRATestHistHost
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||||
@ -234,5 +255,7 @@
|
|||||||
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
|
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
|
||||||
private DevExpress.XtraEditors.LabelControl labelControl3;
|
private DevExpress.XtraEditors.LabelControl labelControl3;
|
||||||
private DevExpress.XtraEditors.LabelControl labelControlTestTime;
|
private DevExpress.XtraEditors.LabelControl labelControlTestTime;
|
||||||
|
private DevExpress.XtraEditors.LabelControl labelControlOKTestTime;
|
||||||
|
private DevExpress.XtraEditors.LabelControl labelControl4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -156,11 +156,20 @@ namespace SystemX.Product.TRA.UIControl
|
|||||||
double dRatio = (((double)(nOKTestCount * 100)) / (nOKTestCount + nNGTestCount));
|
double dRatio = (((double)(nOKTestCount * 100)) / (nOKTestCount + nNGTestCount));
|
||||||
labelControlTestResult.Text = $"{nOKTestCount + nNGTestCount} (OK: {nOKTestCount}/NG: {nNGTestCount}) - Ratio: {dRatio.ToString(".##")}%";
|
labelControlTestResult.Text = $"{nOKTestCount + nNGTestCount} (OK: {nOKTestCount}/NG: {nNGTestCount}) - Ratio: {dRatio.ToString(".##")}%";
|
||||||
|
|
||||||
|
//total
|
||||||
|
|
||||||
labelControlTestTime.Text = vnTestTime.Count > 0 ?
|
labelControlTestTime.Text = vnTestTime.Count > 0 ?
|
||||||
$"Average = {(vnTestTime.Average()/1000).ToString(".##")}s, Min = {(((double)vnTestTime.Min()) / 1000).ToString(".##")}s, Max = {(((double)vnTestTime.Max()) / 1000).ToString(".##")}s" :
|
$"Average = {(vnTestTime.Average()/1000).ToString(".##")}s, Min = {(((double)vnTestTime.Min()) / 1000).ToString(".##")}s, Max = {(((double)vnTestTime.Max()) / 1000).ToString(".##")}s" :
|
||||||
$"Average = -, Min = -, Max = -";
|
$"Average = -, Min = -, Max = -";
|
||||||
|
|
||||||
|
//ok
|
||||||
|
List<int> vnOKTestTime = (from drData in dtResult.AsEnumerable()
|
||||||
|
where drData[DMTestHistory.eColList.TestResult.ToString()].ToString() == "OK"
|
||||||
|
let nTime = Convert.ToInt32(drData[DMTestHistory.eColList.Duration.ToString()].ToString())
|
||||||
|
select nTime).ToList();
|
||||||
|
|
||||||
|
labelControlOKTestTime.Text = vnOKTestTime.Count > 0 ?
|
||||||
|
$"Average = {(vnOKTestTime.Average() / 1000).ToString(".##")}s, Min = {(((double)vnOKTestTime.Min()) / 1000).ToString(".##")}s, Max = {(((double)vnOKTestTime.Max()) / 1000).ToString(".##")}s" :
|
||||||
|
$"Average = -, Min = -, Max = -";
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisplayResultTable(DataTable dtResult)
|
void DisplayResultTable(DataTable dtResult)
|
||||||
@ -376,5 +385,10 @@ namespace SystemX.Product.TRA.UIControl
|
|||||||
e.HighPriority = true;
|
e.HighPriority = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void groupControl1_Paint(object sender, PaintEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user