Analysis 구현
This commit is contained in:
@@ -32,6 +32,52 @@ namespace friction
|
||||
dgvAnalysis.Columns.Add("chTemp", "Temperature");
|
||||
dgvAnalysis.Columns.Add("chHumi", "Rel. Humidity");
|
||||
dgvAnalysis.Columns.Add("chVel", "Velocity");
|
||||
|
||||
Color green = Color.YellowGreen;
|
||||
Color yellow = Color.Gold;
|
||||
Color red = Color.DarkOrange;
|
||||
Color gray = Color.DarkGray;
|
||||
Color white = Color.Snow;
|
||||
|
||||
string strSpring = data.GetCurSpring();
|
||||
foreach(string strTable in data.GetTableList())
|
||||
{
|
||||
DataHandler.CalcResult result = data.GetCalc(strSpring, strTable);
|
||||
|
||||
int iIdx = dgvAnalysis.Rows.Add(strTable, result.m_iCnt, result.m_fAvgRPN, result.m_fStdRPN, result.m_fDiffByForce, result.m_fDiffByTemp, result.m_fDiffByHumid, result.m_fDiffByVel);
|
||||
|
||||
if (result.m_fAvgRPN <= 4)
|
||||
dgvAnalysis.Rows[iIdx].Cells[2].Style.BackColor = green;
|
||||
else if(result.m_fAvgRPN <= 7)
|
||||
dgvAnalysis.Rows[iIdx].Cells[2].Style.BackColor = yellow;
|
||||
else
|
||||
dgvAnalysis.Rows[iIdx].Cells[2].Style.BackColor = red;
|
||||
|
||||
if(result.m_iCnt <= 5)
|
||||
{
|
||||
dgvAnalysis.Rows[iIdx].Cells[3].Style.BackColor = white;
|
||||
dgvAnalysis.Rows[iIdx].Cells[4].Style.BackColor = white;
|
||||
dgvAnalysis.Rows[iIdx].Cells[5].Style.BackColor = white;
|
||||
dgvAnalysis.Rows[iIdx].Cells[6].Style.BackColor = white;
|
||||
dgvAnalysis.Rows[iIdx].Cells[7].Style.BackColor = white;
|
||||
}
|
||||
else if(result.m_iCnt <= 10)
|
||||
{
|
||||
dgvAnalysis.Rows[iIdx].Cells[3].Style.BackColor = gray;
|
||||
dgvAnalysis.Rows[iIdx].Cells[4].Style.BackColor = gray;
|
||||
dgvAnalysis.Rows[iIdx].Cells[5].Style.BackColor = gray;
|
||||
dgvAnalysis.Rows[iIdx].Cells[6].Style.BackColor = gray;
|
||||
dgvAnalysis.Rows[iIdx].Cells[7].Style.BackColor = gray;
|
||||
}
|
||||
else
|
||||
{
|
||||
dgvAnalysis.Rows[iIdx].Cells[3].Style.BackColor = (result.m_fStdRPN <= 1.5) ? green : red;
|
||||
dgvAnalysis.Rows[iIdx].Cells[4].Style.BackColor = (result.m_fDiffByForce <= 1.5) ? green : red;
|
||||
dgvAnalysis.Rows[iIdx].Cells[5].Style.BackColor = (result.m_fDiffByTemp <= 1.5) ? green : red;
|
||||
dgvAnalysis.Rows[iIdx].Cells[6].Style.BackColor = (result.m_fDiffByHumid <= 1.5) ? green : red;
|
||||
dgvAnalysis.Rows[iIdx].Cells[7].Style.BackColor = (result.m_fDiffByVel <= 1.5) ? green : red;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user