|
@@ -36,6 +36,7 @@ namespace OTSIncAReportGrids
|
|
|
/// </summary>
|
|
|
public void BindDataGridView(string path, int num, string filename)
|
|
|
{
|
|
|
+
|
|
|
OTSGridView gridView = new OTSGridView();
|
|
|
|
|
|
OTSIncAReportApp.DataOperation.DataAccess.ParticleData particledata = new OTSIncAReportApp.DataOperation.DataAccess.ParticleData(path);
|
|
@@ -50,6 +51,7 @@ namespace OTSIncAReportGrids
|
|
|
string str9 = table["str9"].ToString();
|
|
|
string str10 = table["str10"].ToString();
|
|
|
string str11 = table["str11"].ToString();
|
|
|
+ string str13 = table["str13"].ToString();
|
|
|
//创建Grid的列序号
|
|
|
gridView.Columns.Add("rowid", str1);
|
|
|
//创建Grid的列颗粒名
|
|
@@ -60,6 +62,8 @@ namespace OTSIncAReportGrids
|
|
|
gridView.Columns.Add("con", str10);
|
|
|
//创建Grid的列颗粒数
|
|
|
//gridView.Columns.Add("SmallParticle", str11);
|
|
|
+ //创建Grid的列面积占比
|
|
|
+ gridView.Columns.Add("AreaRadio", str13);
|
|
|
string con = m_ReportApp.m_conditionChoose.m_SourceGridData.GetPropItemDisplayValueByPropItemName(OTS_REPORT_PROP_GRID_ITEMS.SIZE_CAL_METHOD_TYPE).ToString();
|
|
|
string po = "";
|
|
|
switch (con)
|
|
@@ -78,7 +82,7 @@ namespace OTSIncAReportGrids
|
|
|
//创建Grid的列最大直径
|
|
|
gridView.Columns.Add("max", str7);
|
|
|
break;
|
|
|
- case "Area":
|
|
|
+ case "CIRCLE":
|
|
|
po = "Area";
|
|
|
//创建Grid的列平均直径
|
|
|
gridView.Columns.Add("av", str3);
|
|
@@ -93,9 +97,11 @@ namespace OTSIncAReportGrids
|
|
|
gridView.Columns.Add("max", str7);
|
|
|
break;
|
|
|
}
|
|
|
+ double totalarea = 0;
|
|
|
|
|
|
//int idx = m_ReportApp.m_DataMgrFun.GetPropIndexByPropItemName(m_ReportApp.SourceGridData.ConditionItemList, OTSIncAReportApp.OTSSampleReportInfo.OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
|
|
|
- int sel = m_ReportApp.m_conditionChoose.m_SourceGridData.GetPropIndexByPropItemName(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
|
|
|
+ //int sel = m_ReportApp.m_conditionChoose.m_SourceGridData.GetPropIndexByPropItemName(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
|
|
|
+ int sel = m_ReportApp.m_conditionChoose.m_SourceGridData.GetComboDownListIndexByItemName(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
|
|
|
string filedAndParticl = "";
|
|
|
if (sel == 1)
|
|
|
{
|
|
@@ -108,8 +114,15 @@ namespace OTSIncAReportGrids
|
|
|
{
|
|
|
filedAndParticl = filedAndParticl + ",";
|
|
|
}
|
|
|
+ totalarea = OTSIncAReportApp.frmReportApp.selectedRegion.Width * OTSIncAReportApp.frmReportApp.selectedRegion.Height;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ double ScanFieldSize = Convert.ToDouble(((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)result.ResultInfo["Sample"])["Members"])["SEMDataMsr"])["ScanFieldSize"]);
|
|
|
+ double ImagePixelSize = Convert.ToDouble(((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)result.ResultInfo["Sample"])["Members"])["MsrParams"])["Members"])["ImageScanParam"])["ImagePixelSize"]);
|
|
|
+ int filedCount = Convert.ToInt32(((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)result.ResultInfo["Sample"])["Members"])["SEMDataMsr"])["TotalFields"]);
|
|
|
+ totalarea = ScanFieldSize * ScanFieldSize / ImagePixelSize * filedCount;
|
|
|
}
|
|
|
-
|
|
|
DataTable dt = particledata.GetParticleListByIncA(po, filedAndParticl);
|
|
|
List<int> FLID = new List<int>() { 0, 1, 2, 4, 6, 7, 8, 9 };
|
|
|
List<string> NameList = new List<string>() { table["partcletype0"].ToString(), table["partcletype1"].ToString(), table["partcletype2"].ToString(), table["partcletype4"].ToString(), table["partcletype6"].ToString(), table["partcletype7"].ToString(), table["partcletype8"].ToString(), table["partcletype9"].ToString() };
|
|
@@ -137,9 +150,22 @@ namespace OTSIncAReportGrids
|
|
|
}
|
|
|
else if (gridView.Columns[k].Name.ToLower() == "av" || gridView.Columns[k].Name.ToLower() == "max")
|
|
|
{
|
|
|
- gridView.Rows[add_rowindex].Cells[k].Value = Math.Round(Convert.ToDouble(dt.Rows[i][gridView.Columns[k].Name]), 2);
|
|
|
+ if (con == "CIRCLE")
|
|
|
+ {
|
|
|
+ double Area = Convert.ToDouble(dt.Rows[i][gridView.Columns[k].Name]);
|
|
|
+ gridView.Rows[add_rowindex].Cells[k].Value = Math.Round(Math.Sqrt(Area / Math.PI), 2);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ gridView.Rows[add_rowindex].Cells[k].Value = Math.Round(Convert.ToDouble(dt.Rows[i][gridView.Columns[k].Name]), 2);
|
|
|
+ }
|
|
|
gridView.Rows[add_rowindex].Cells[k].Style.BackColor = Color.Azure;
|
|
|
}
|
|
|
+ else if (gridView.Columns[k].Name.ToLower() == "AreaRadio")
|
|
|
+ {
|
|
|
+ gridView.Rows[add_rowindex].Cells[k].Value = dt.Rows[i]["Area"].ToString();
|
|
|
+
|
|
|
+ }
|
|
|
else
|
|
|
{
|
|
|
gridView.Rows[add_rowindex].Cells[k].Value = dt.Rows[i][gridView.Columns[k].Name];
|
|
@@ -173,7 +199,15 @@ namespace OTSIncAReportGrids
|
|
|
}
|
|
|
else if (gridView.Columns[k].Name.ToLower() == "av" || gridView.Columns[k].Name.ToLower() == "max")
|
|
|
{
|
|
|
- gridView.Rows[add_rowindex].Cells[k].Value = Math.Round(Convert.ToDouble(dt.Rows[i][gridView.Columns[k].Name]), 2);
|
|
|
+ if (con == "CIRCLE")
|
|
|
+ {
|
|
|
+ double Area = Convert.ToDouble(dt.Rows[i][gridView.Columns[k].Name]);
|
|
|
+ gridView.Rows[add_rowindex].Cells[k].Value = Math.Round(Math.Sqrt(Area / Math.PI), 2);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ gridView.Rows[add_rowindex].Cells[k].Value = Math.Round(Convert.ToDouble(dt.Rows[i][gridView.Columns[k].Name]), 2);
|
|
|
+ }
|
|
|
gridView.Rows[add_rowindex].Cells[k].Style.BackColor = Color.Azure;
|
|
|
}
|
|
|
else if (gridView.Columns[k].Name == "TypeName")
|
|
@@ -282,6 +316,7 @@ namespace OTSIncAReportGrids
|
|
|
private void CompositionDistributionGrid_Load(object sender, EventArgs e)
|
|
|
{
|
|
|
//int idx = m_ReportApp.m_DataMgrFun.GetPropIndexByPropItemName(m_ReportApp.SourceGridData.ConditionItemList, OTSIncAReportApp.OTSSampleReportInfo.OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE);
|
|
|
+ //string sou = m_ReportApp.m_conditionChoose.m_SourceGridData.GetPropItemValueByPropItemName(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE).ToString();
|
|
|
string sou = m_ReportApp.m_conditionChoose.m_SourceGridData.GetPropItemDisplayValueByPropItemName(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE).ToString();
|
|
|
if (sou.Contains("+"))
|
|
|
{
|
|
@@ -368,6 +403,7 @@ namespace OTSIncAReportGrids
|
|
|
}
|
|
|
|
|
|
//int idx = m_ReportApp.m_DataMgrFun.GetPropIndexByPropItemName(m_ReportApp.SourceGridData.ConditionItemList, OTSIncAReportApp.OTSSampleReportInfo.OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE);
|
|
|
+ //string sou = source.GetPropItemValueByPropItemName(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE).ToString();
|
|
|
string sou = source.GetPropItemDisplayValueByPropItemName(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE).ToString();
|
|
|
if (sou.Contains("+"))
|
|
|
{
|