|
@@ -584,7 +584,6 @@ namespace OTSIncAReportGrids
|
|
|
|
|
|
dgV_ParticlesDevidePage.Rows.Clear();
|
|
|
dgV_ParticlesDevidePage.Columns.Clear();
|
|
|
- //string startFun = ((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)result.ResultInfo["Sample"])["Members"])["MsrParams"])["SysType"].ToString();
|
|
|
|
|
|
var startFun = m_ReportApp.m_RptConfigFile.Systype;
|
|
|
//从报告xml文件中加载,显示计算列,显示元素信息
|
|
@@ -715,8 +714,12 @@ namespace OTSIncAReportGrids
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- /*int columndid = */
|
|
|
dgV_ParticlesDevidePage.Columns.Add(en.Current.Key, en.Current.Value);
|
|
|
+ if (en.Current.Key == "Area" || en.Current.Key == "EquivalentCircleDiameter" || en.Current.Key == "MaxDiameter" || en.Current.Key == "MinDiameter" || en.Current.Key == "DiameterRatio" || en.Current.Key == "FerretDiameter" || en.Current.Key == "PERP" || en.Current.Key == "PERI" || en.Current.Key == "INSCR" || en.Current.Key == "MEAN" || en.Current.Key == "ELONG" || en.Current.Key == "ASPECT_ELONG" || en.Current.Key == "Orientation")
|
|
|
+ {
|
|
|
+ int id = dgV_ParticlesDevidePage.Columns.Count;
|
|
|
+ dgV_ParticlesDevidePage.Columns[id - 1].Tag = "NumericType";
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -746,6 +749,8 @@ namespace OTSIncAReportGrids
|
|
|
for (int i = 0; i < ElementTypeSort.Count; i++)
|
|
|
{
|
|
|
dgV_ParticlesDevidePage.Columns.Add(ElementTypeSort[i], ElementTypeSort[i]);
|
|
|
+ int id = dgV_ParticlesDevidePage.Columns.Count;
|
|
|
+ dgV_ParticlesDevidePage.Columns[id - 1].Tag = "NumericType";
|
|
|
}
|
|
|
double jd = 95f / (double)particles.Rows.Count;//计算进度刻度
|
|
|
|
|
@@ -1057,24 +1062,10 @@ namespace OTSIncAReportGrids
|
|
|
private void dgV_ParticlesDevidePage_SortCompare(object sender, DataGridViewSortCompareEventArgs e)
|
|
|
{
|
|
|
//排序中
|
|
|
- if (this.dgV_ParticlesDevidePage.Rows[e.RowIndex1].Tag != null && this.dgV_ParticlesDevidePage.Rows[e.RowIndex1].Tag.ToString() == "统计行")
|
|
|
- {
|
|
|
- //ROW1>ROW2
|
|
|
- e.SortResult = 1;
|
|
|
- if (this.dgV_ParticlesDevidePage.SortOrder == SortOrder.Descending)
|
|
|
- e.SortResult = -1;
|
|
|
- e.Handled = true;
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- if (this.dgV_ParticlesDevidePage.Rows[e.RowIndex2].Tag != null && this.dgV_ParticlesDevidePage.Rows[e.RowIndex2].Tag.ToString() == "统计行")
|
|
|
+ if (e.Column.Tag != null && e.Column.Tag.ToString() == "NumericType")
|
|
|
{
|
|
|
- //ROW1<ROW2
|
|
|
- e.SortResult = -1;
|
|
|
- if (this.dgV_ParticlesDevidePage.SortOrder == SortOrder.Descending)
|
|
|
- e.SortResult = 1;
|
|
|
+ e.SortResult = double.Parse(e.CellValue1.ToString()).CompareTo(double.Parse(e.CellValue2.ToString()));
|
|
|
e.Handled = true;
|
|
|
- return;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1878,6 +1869,7 @@ namespace OTSIncAReportGrids
|
|
|
|
|
|
if (sfd.ShowDialog() == DialogResult.OK)
|
|
|
{
|
|
|
+ Cursor = Cursors.WaitCursor;
|
|
|
//IWorkbook workbook = new HSSFWorkbook(); //用于创建.xls office2003开始以前的
|
|
|
IWorkbook workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(); //用于创建.xlsx office2007开始以后的
|
|
|
ISheet sheet;
|
|
@@ -2064,6 +2056,7 @@ namespace OTSIncAReportGrids
|
|
|
|
|
|
MessageBox.Show("Export complete!");
|
|
|
|
|
|
+ Cursor = Cursors.Default;
|
|
|
//导出完成后,打开Excel文件
|
|
|
if (File.Exists(sfd.FileName))
|
|
|
{
|