|
@@ -4,6 +4,7 @@ using DevExpress.XtraEditors.Filtering;
|
|
|
using OTSCommon.DBOperate;
|
|
using OTSCommon.DBOperate;
|
|
|
using OTSCommon.DBOperate.Model;
|
|
using OTSCommon.DBOperate.Model;
|
|
|
using OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration;
|
|
using OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration;
|
|
|
|
|
+using OTSIncAReportApp.OTSRstMgrFunction;
|
|
|
using OTSIncAReportGraph.Controls;
|
|
using OTSIncAReportGraph.Controls;
|
|
|
using OTSPeriodicTable;
|
|
using OTSPeriodicTable;
|
|
|
using System;
|
|
using System;
|
|
@@ -767,7 +768,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
|
|
|
|
|
public DataTable GetInfoForPartucleDevidePage_analyticalParticle(string condition)
|
|
public DataTable GetInfoForPartucleDevidePage_analyticalParticle(string condition)
|
|
|
{
|
|
{
|
|
|
- string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,TypeName,TypeColor,'' as Element from INcAData where (xrayid > -1 and typeid !=9 and typeid !=-1 and typeid !=4)" +
|
|
|
|
|
|
|
+ string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,SubParticles,TypeName,TypeColor,'' as Element from INcAData where (xrayid > -1 and typeid !=9 and typeid !=-1 and typeid !=4 and SubParticles is not 'IsSubParticle') " +
|
|
|
condition;
|
|
condition;
|
|
|
DataTable DT = new DataTable();
|
|
DataTable DT = new DataTable();
|
|
|
DT = dbHelper.ExecuteQuery(sqliteString);
|
|
DT = dbHelper.ExecuteQuery(sqliteString);
|
|
@@ -777,7 +778,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
|
|
|
|
|
public DataTable GetInfoForPartucleDevidePage_otherParticle(string condition)
|
|
public DataTable GetInfoForPartucleDevidePage_otherParticle(string condition)
|
|
|
{
|
|
{
|
|
|
- string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,TypeName,TypeColor,'' as Element from INcAData where (xrayid > -1 and typeid =9 or typeid =-1 or typeid =4) " +
|
|
|
|
|
|
|
+ string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,SubParticle,TypeName,TypeColor,'' as Element from INcAData where (xrayid > -1 and SubParticles is not 'IsSubParticle' and (typeid =9 or typeid =0 or typeid =-1 or typeid =4)) " +
|
|
|
condition;
|
|
condition;
|
|
|
DataTable DT = new DataTable();
|
|
DataTable DT = new DataTable();
|
|
|
DT = dbHelper.ExecuteQuery(sqliteString);
|
|
DT = dbHelper.ExecuteQuery(sqliteString);
|
|
@@ -790,31 +791,39 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
|
public DataTable GetInfoForPartucleDevidePage_mergeParticles(string condition)
|
|
public DataTable GetInfoForPartucleDevidePage_mergeParticles(string condition)
|
|
|
{
|
|
{
|
|
|
- string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,FieldPosX " +
|
|
|
|
|
- "as 'SEMPosX',FieldPosY as 'SEMPosY',XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,TypeName,TypeColor,SubParticles,''as Element from MergedParticleInfo where 1=1 " + condition;
|
|
|
|
|
|
|
+ string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,SubParticle,TypeName,TypeColor,'' as Element from INcAData where (SubParticles Is not null and SubParticles is not 'IsSubParticle' )" + condition;
|
|
|
DataTable DT1 = new DataTable();
|
|
DataTable DT1 = new DataTable();
|
|
|
try
|
|
try
|
|
|
{
|
|
{
|
|
|
DT1 = dbHelper.ExecuteQuery(sqliteString);
|
|
DT1 = dbHelper.ExecuteQuery(sqliteString);
|
|
|
}
|
|
}
|
|
|
- catch
|
|
|
|
|
|
|
+ catch
|
|
|
{
|
|
{
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
return DT1;
|
|
return DT1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public DataTable GetInfoForPartucleDevidePage_allParticles(string condition)
|
|
public DataTable GetInfoForPartucleDevidePage_allParticles(string condition)
|
|
|
{
|
|
{
|
|
|
- string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,TypeName,TypeColor,'' as Element from INcAData where xrayid > -1 " +
|
|
|
|
|
|
|
+ string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,SubParticle,TypeName,TypeColor,'' as Element from INcAData where xrayid > -1 and SubParticles is not 'IsSubParticle' " +
|
|
|
condition;
|
|
condition;
|
|
|
DataTable DT = new DataTable();
|
|
DataTable DT = new DataTable();
|
|
|
DT = dbHelper.ExecuteQuery(sqliteString);
|
|
DT = dbHelper.ExecuteQuery(sqliteString);
|
|
|
return DT;
|
|
return DT;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
public DataTable GetInfoForPartucleDevidePage_NotIdentifyParticle(string condition)
|
|
public DataTable GetInfoForPartucleDevidePage_NotIdentifyParticle(string condition)
|
|
|
{
|
|
{
|
|
|
- string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,TypeName,TypeColor,'' as Element from INcAData where xrayid > -1 and typeid =9 " +
|
|
|
|
|
|
|
+ string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,SubParticle,TypeName,TypeColor,'' as Element from INcAData where xrayid > -1 and typeid =9 " +
|
|
|
condition;
|
|
condition;
|
|
|
DataTable DT = new DataTable();
|
|
DataTable DT = new DataTable();
|
|
|
DT = dbHelper.ExecuteQuery(sqliteString);
|
|
DT = dbHelper.ExecuteQuery(sqliteString);
|
|
@@ -822,7 +831,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
}
|
|
}
|
|
|
public DataTable GetInfoForPartucleDevidePage_InvalidParticle(string condition)
|
|
public DataTable GetInfoForPartucleDevidePage_InvalidParticle(string condition)
|
|
|
{
|
|
{
|
|
|
- string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,TypeName,TypeColor,'' as Element from INcAData where xrayid > -1 and typeid =-1 " +
|
|
|
|
|
|
|
+ string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,SubParticle,TypeName,TypeColor,'' as Element from INcAData where xrayid > -1 and typeid =-1 " +
|
|
|
condition;
|
|
condition;
|
|
|
DataTable DT = new DataTable();
|
|
DataTable DT = new DataTable();
|
|
|
DT = dbHelper.ExecuteQuery(sqliteString);
|
|
DT = dbHelper.ExecuteQuery(sqliteString);
|
|
@@ -830,7 +839,7 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
}
|
|
}
|
|
|
public DataTable GetInfoForPartucleDevidePage_LowCountsParticle(string condition)
|
|
public DataTable GetInfoForPartucleDevidePage_LowCountsParticle(string condition)
|
|
|
{
|
|
{
|
|
|
- string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,TypeName,TypeColor,'' as Element from INcAData where xrayid > -1 typeid =4 " +
|
|
|
|
|
|
|
+ string sqliteString = "select fieldid,particleid,AveGray,RectLeft,RectTop,RectWidth,RectHeight,Area,PosX,PosY,TypeId,SegmentNum,SEMPosX,SEMPosY,XrayId,DMAX,DMIN,DPERP,PERIMETER,ORIENTATION,DINSCR,DMEAN,DELONG,DFERET,SubParticle,TypeName,TypeColor,'' as Element from INcAData where xrayid > -1 typeid =4 " +
|
|
|
condition;
|
|
condition;
|
|
|
DataTable DT = new DataTable();
|
|
DataTable DT = new DataTable();
|
|
|
DT = dbHelper.ExecuteQuery(sqliteString);
|
|
DT = dbHelper.ExecuteQuery(sqliteString);
|
|
@@ -1400,6 +1409,46 @@ namespace OTSIncAReportApp.DataOperation.DataAccess
|
|
|
list_showelementinfo.Sort((p1, p2) => p2.Percentage.CompareTo(p1.Percentage));
|
|
list_showelementinfo.Sort((p1, p2) => p2.Percentage.CompareTo(p1.Percentage));
|
|
|
return list_showelementinfo;
|
|
return list_showelementinfo;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ public Bitmap GetParticlescreenshot(string subt, ResultFile result)
|
|
|
|
|
+ {
|
|
|
|
|
+ Bitmap bmap = null;
|
|
|
|
|
+ KeyValuePair<string, Bitmap> FieldImage = new KeyValuePair<string, Bitmap>();
|
|
|
|
|
+ if (subt != null && subt != "" && subt != "IsSubParticle")
|
|
|
|
|
+ {
|
|
|
|
|
+ double ScanFieldSize = result.GetScanFieldSizeX();
|
|
|
|
|
+ string filePatht = result.FilePath + "\\FIELD_FILES\\";
|
|
|
|
|
+ string imagePatht = filePatht + "Field" + subt.Split(',')[0].Split(':')[0].ToString() + ".bmp";
|
|
|
|
|
+ Bitmap tempbit = ReadImageFile(imagePatht);
|
|
|
|
|
+ int pixw = tempbit.Width;
|
|
|
|
|
+ double xs = pixw / ScanFieldSize;
|
|
|
|
|
+ OTS_X_AXIS_DIRECTION X_AXIS_DIRECTION = result.GetXAxisDirEnum();
|
|
|
|
|
+ OTS_Y_AXIS_DIRECTION Y_AXIS_DIRECTION = result.GetYAxisDirEnum();
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ bmap = GetBitmapForBig(subt, xs, result.FilePath, tempbit.Height, tempbit.Width, X_AXIS_DIRECTION, Y_AXIS_DIRECTION);
|
|
|
|
|
+ if (bmap != null)
|
|
|
|
|
+ {
|
|
|
|
|
+ string[] str = subt.Split(',');
|
|
|
|
|
+ //bmap.Tag = new List<string>() { str[0].Split(':')[0], str[0].Split(':')[1], particles.Rows[i]["TypeId"].ToString() };
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (subt != "IsSubParticle")
|
|
|
|
|
+ {
|
|
|
|
|
+ //if (FieldImage.Key != particles.Rows[i]["fieldid"].ToString() || FieldImage.Value == null)
|
|
|
|
|
+ //{
|
|
|
|
|
+ // string imagePath = filePath + "Field" + particles.Rows[i]["fieldid"].ToString() + ".bmp";
|
|
|
|
|
+ // FieldImage = new KeyValuePair<string, Bitmap>(particles.Rows[i]["fieldid"].ToString(), Particledata.ReadImageFile(imagePath));
|
|
|
|
|
+ //}
|
|
|
|
|
+ //Rectangle rectangle = new Rectangle() { X = Convert.ToInt32(particles.Rows[i]["RectLeft"]), Y = Convert.ToInt32(particles.Rows[i]["RectTop"]), Width = Convert.ToInt32(particles.Rows[i]["RectWidth"]), Height = Convert.ToInt32(particles.Rows[i]["RectHeight"]) };
|
|
|
|
|
+ //Bitmap bmap = GetBitmapByParticle(FieldImage.Value, rectangle);
|
|
|
|
|
+ //bmap.Tag = new List<string>() { particles.Rows[i]["FieldId"].ToString(), particles.Rows[i]["ParticleId"].ToString(), particles.Rows[i]["TypeId"].ToString(), particles.Rows[i]["XrayId"].ToString() };
|
|
|
|
|
+ //dgV_ParticlesDevidePage.Rows[add_rowindex].Cells[k].Value = bmap;
|
|
|
|
|
+ //dgV_ParticlesDevidePage.Rows[add_rowindex].Height = bmap.Height + 20;
|
|
|
|
|
+ }
|
|
|
|
|
+ return bmap;
|
|
|
|
|
+ }
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|