|
@@ -123,7 +123,7 @@ namespace OTSModelSharp
|
|
|
//获取测量项目文件
|
|
|
XmlDocument doc = new XmlDocument();
|
|
|
//载入xml文件
|
|
|
- doc.Load(strPathName);
|
|
|
+ doc.Load(strPathName);
|
|
|
XmlNode root = doc.SelectSingleNode("XMLData");
|
|
|
Serialize(false, doc, root);
|
|
|
|
|
@@ -158,16 +158,20 @@ namespace OTSModelSharp
|
|
|
CMsrDisplayResults poMsrResults = smpl.GetMsrResults();
|
|
|
double aFldArea = smpl.CalculateAFieldArea();
|
|
|
SetPathName(strIncAFilename);
|
|
|
- if (GetAllFieldsFromDB(ref allMeasuredFlds,ref poMsrStatus, poMsrResults, aFldArea))
|
|
|
+
|
|
|
+ int w, h;
|
|
|
+ smpl.GetBSESize(out w, out h);
|
|
|
+ double pixelsize = smpl.CalculatePixelSize();
|
|
|
+
|
|
|
+
|
|
|
+ if (GetAllFieldsFromDB(ref allMeasuredFlds,ref poMsrStatus, poMsrResults, aFldArea,new Size(w,h),pixelsize))
|
|
|
{
|
|
|
|
|
|
|
|
|
var nodataFields = smpl.GetFieldsData();//there's only the field postion info in the xml file,so the initial filed has only postion info.
|
|
|
List<COTSFieldData> allflddata = new List<COTSFieldData>() ;//contains all the field
|
|
|
//------------complete the infomation that doesn't contained in database-----
|
|
|
- int w, h;
|
|
|
- smpl.GetBSESize(out w, out h);
|
|
|
- double pixelsize = smpl.CalculatePixelSize();
|
|
|
+
|
|
|
foreach (var f in allMeasuredFlds)
|
|
|
{
|
|
|
f.SetPixelSize(pixelsize);
|
|
@@ -276,7 +280,7 @@ namespace OTSModelSharp
|
|
|
// file pathname
|
|
|
public String GetPathName() { return m_strPathName; }
|
|
|
|
|
|
- public bool GetAllFieldsFromDB(ref List<COTSFieldData> allFlds, ref CMsrSampleStatus status, CMsrDisplayResults rst, double aFieldArea)
|
|
|
+ public bool GetAllFieldsFromDB(ref List<COTSFieldData> allFlds, ref CMsrSampleStatus status, CMsrDisplayResults rst, double aFieldArea,Size picSize,double pixelSize)
|
|
|
{
|
|
|
String sDatabaseName = m_strPathName;
|
|
|
|
|
@@ -291,6 +295,15 @@ namespace OTSModelSharp
|
|
|
List<COTSFieldData> allFldsWithdata=new List<COTSFieldData>();
|
|
|
m_IncADataDB.GetAllFieldsRecord(ref allFldsWithdata);
|
|
|
|
|
|
+
|
|
|
+ foreach (var f in allFldsWithdata)
|
|
|
+ {
|
|
|
+ f.Width = picSize.Width;
|
|
|
+ f.Height = picSize.Height;
|
|
|
+ f.SetPixelSize(pixelSize);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
var eleChemistryDB = incAFileMgr.GetPosXrayDBMgr().GetElementChemistryDB();
|
|
|
Dictionary<string, CPosXrayClr> mapXrayInfo=new Dictionary<string, CPosXrayClr>();
|
|
|
eleChemistryDB.GetAllMapedXrayInfo(ref mapXrayInfo);
|
|
@@ -1493,14 +1506,20 @@ namespace OTSModelSharp
|
|
|
doc.Load(filename);
|
|
|
|
|
|
XmlNode root = doc.SelectSingleNode("XMLData");
|
|
|
-
|
|
|
- var members = root.SelectNodes("Sample");
|
|
|
-
|
|
|
+ var members = root.SelectNodes("Member");
|
|
|
foreach (XmlNode member1 in members)
|
|
|
{
|
|
|
- var paramNode = member1.SelectSingleNode("MsrParams");
|
|
|
-
|
|
|
- ((XmlElement)paramNode).SetAttribute("STDName",stdFileName);
|
|
|
+ if(member1.Attributes["RegName"].Value== "Sample")
|
|
|
+ {
|
|
|
+ var paramNode = member1.SelectNodes("Member");
|
|
|
+ foreach (XmlNode member2 in paramNode)
|
|
|
+ {
|
|
|
+ if(member2.Attributes["RegName"].Value == "MsrParams")
|
|
|
+ {
|
|
|
+ ((XmlElement)member2).SetAttribute("STDName", stdFileName);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
doc.Save(filename);
|
|
@@ -1512,6 +1531,7 @@ namespace OTSModelSharp
|
|
|
foreach (var part in fld.GetListAnalysisParticles())
|
|
|
{
|
|
|
part.SetType((int)OTS_PARTCLE_TYPE.NOT_IDENTIFIED);
|
|
|
+ part.SetTypeName("Not Identified");
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1551,7 +1571,8 @@ namespace OTSModelSharp
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- if (stdFileName != "NoSTDDB")
|
|
|
+
|
|
|
+ if (stdFileName != "NoSTDDB.db")
|
|
|
{
|
|
|
var m_classifyEngine = new CClassifyEngine();
|
|
|
IClassifyEngine engine = m_classifyEngine.GetParticleEngine(stdFileName);
|
|
@@ -1618,6 +1639,7 @@ namespace OTSModelSharp
|
|
|
Collection<CHoleBSEImg> xholeBSEImgs = new Collection<CHoleBSEImg>();
|
|
|
Collection<COTSSample> xsamples = new Collection<COTSSample>();
|
|
|
Slo slo = new Slo();
|
|
|
+
|
|
|
slo.Register("ProjMgrFileMark", xProjMgrFileMark);
|
|
|
slo.Register("ProjMgrFileVersion", xProjMgrFileVersion);
|
|
|
slo.Register("strPathName", xstrPathName);
|