|
@@ -83,6 +83,8 @@ namespace OTSIncAReportGrids
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+ //int item= (int)m_frmReportApp.m_conditionChoose.m_SourceGridData.GetPropItemDisplayValueByPropItem(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE);
|
|
|
+ //m_frmReportApp.m_rstDataMgr.SetWorkingResult(item);
|
|
|
addGrid(m_frmReportApp.m_rstDataMgr.ResultFilesList[m_frmReportApp.m_rstDataMgr.GetWorkingResult()]);
|
|
|
}
|
|
|
}
|
|
@@ -93,7 +95,7 @@ namespace OTSIncAReportGrids
|
|
|
/// <returns></returns>
|
|
|
public Dictionary<string, string> GetData_ResultGrid()
|
|
|
{
|
|
|
- ResultFile resfile = m_frmReportApp.m_rstDataMgr.ResultFilesList[m_frmReportApp.m_rstDataMgr.getSelectedIndex()];
|
|
|
+ ResultFile resfile = m_frmReportApp.m_rstDataMgr.ResultFilesList[m_frmReportApp.m_rstDataMgr.GetWorkingResult()];
|
|
|
|
|
|
Dictionary<string, string> keyValues = new Dictionary<string, string>() { };
|
|
|
keyValues.Add(table["col1"].ToString(), resfile.FileName);
|
|
@@ -168,6 +170,83 @@ namespace OTSIncAReportGrids
|
|
|
return keyValues;
|
|
|
}
|
|
|
|
|
|
+ public Dictionary<string, string> GetData_ResultGrid_Report()
|
|
|
+ {
|
|
|
+ ResultFile resfile = m_frmReportApp.m_rstDataMgr.ResultFilesList[m_frmReportApp.m_rstDataMgr.getSelectedIndex()];
|
|
|
+
|
|
|
+ Dictionary<string, string> keyValues = new Dictionary<string, string>() { };
|
|
|
+ keyValues.Add(table["col1"].ToString(), resfile.FileName);
|
|
|
+
|
|
|
+ string path = resfile.FilePath;
|
|
|
+ FieldData fielddata = new FieldData(path);
|
|
|
+ DataTable dt = fielddata.GetGeneralInfo();
|
|
|
+ DateTime star = new DateTime();
|
|
|
+ DateTime end = new DateTime();
|
|
|
+
|
|
|
+ System.Globalization.DateTimeFormatInfo dtFormat = new System.Globalization.DateTimeFormatInfo();
|
|
|
+ dtFormat.ShortDatePattern = "dd/MM/yyyy hh:mm:ss";
|
|
|
+
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ for (int i = 0; i < dt.Rows.Count; i++)
|
|
|
+ {
|
|
|
+ if (dt.Rows[i]["name"].ToString() == "TimeStart")
|
|
|
+ {
|
|
|
+ star = Convert.ToDateTime(dt.Rows[i]["value"], dtFormat);
|
|
|
+ }
|
|
|
+ if (dt.Rows[i]["name"].ToString() == "TimeEnd")
|
|
|
+ {
|
|
|
+ end = Convert.ToDateTime(dt.Rows[i]["value"], dtFormat);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ TimeSpan timeSpan = end - star;
|
|
|
+
|
|
|
+ int filedCount = fielddata.GetFiledCount();
|
|
|
+ Dictionary<string, object> sampleMembers = ((Dictionary<string, object>)((Dictionary<string, object>)resfile.ResultInfo["Sample"])["Members"]);
|
|
|
+ Dictionary<string, object> semDataMsr = (Dictionary<string, object>)sampleMembers["SEMDataMsr"];
|
|
|
+ double scanFieldSize = Convert.ToDouble(semDataMsr["ScanFieldSize"]);
|
|
|
+ Dictionary<string, object> imageScanParam = (Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)sampleMembers["MsrParams"])["Members"])["ImageScanParam"];
|
|
|
+ string ImageResolution = imageScanParam["ImageResolution"].ToString();
|
|
|
+ double wide = Convert.ToDouble(ImageResolution.Split('_')[1]);
|
|
|
+ double high = Convert.ToDouble(ImageResolution.Split('_')[2]);
|
|
|
+ double pixelSize = scanFieldSize / wide;
|
|
|
+ double filedsArea = Math.Round(high * wide * pixelSize * pixelSize * filedCount, 2);
|
|
|
+ int particleArea = fielddata.GetparticleArea();
|
|
|
+
|
|
|
+ double ratio = particleArea / filedsArea;
|
|
|
+
|
|
|
+ //报告参数文件
|
|
|
+ string xmlpath = Application.StartupPath + m_frmReportApp.m_OTSReportMgrParamFile;
|
|
|
+ DataSet ds = XMLoperate.GetXmlData(xmlpath, "XMLData");
|
|
|
+ DataTable dt1 = ds.Tables["Member"];
|
|
|
+ string sizestr = "1000";
|
|
|
+ for (int i = 0; i < dt1.Rows.Count; i++)
|
|
|
+ {
|
|
|
+ if (dt1.Rows[i]["RegName"].ToString() == "Scale")
|
|
|
+ {
|
|
|
+ sizestr = dt1.Rows[i]["strValue"].ToString();
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ keyValues.Add(table["col2"].ToString(), star.ToString("yyyy-MM-dd HH:mm:ss"));
|
|
|
+ keyValues.Add(table["col3"].ToString(), end.ToString("yyyy-MM-dd HH:mm:ss"));
|
|
|
+ keyValues.Add(table["col4"].ToString(), Math.Round(timeSpan.TotalMinutes, 2).ToString() + "mins");
|
|
|
+ keyValues.Add(table["col5"].ToString(), filedCount.ToString());
|
|
|
+
|
|
|
+ keyValues.Add(table["col6"].ToString(), ((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)resfile.ResultInfo["Sample"])["Members"])["MsrParams"])["STDName"].ToString());
|
|
|
+ keyValues.Add(table["col7"].ToString(), fielddata.GetparticleCount().ToString());
|
|
|
+ keyValues.Add(table["col8"].ToString(), filedsArea.ToString());
|
|
|
+ keyValues.Add(table["col9"].ToString(), particleArea.ToString());
|
|
|
+ keyValues.Add(table["col10"].ToString(), ratio.ToString());
|
|
|
+
|
|
|
+ keyValues.Add(table["col11"].ToString(), sizestr);
|
|
|
+
|
|
|
+ return keyValues;
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 绑定GridView显示
|
|
|
/// </summary>
|