|
@@ -5,9 +5,23 @@
|
|
|
#include "BrukerSPXFileMgr.h"
|
|
|
#include "ControllerHelper.h"
|
|
|
#include <COTSUtilityDllFunExport.h>
|
|
|
-
|
|
|
+
|
|
|
namespace OTSController {
|
|
|
-
|
|
|
+ namespace
|
|
|
+ {
|
|
|
+ void Split(CString source, CStringArray& dest, CString division)
|
|
|
+ {
|
|
|
+ dest.RemoveAll();
|
|
|
+ int pos = 0;
|
|
|
+ int pre_pos = 0;
|
|
|
+ while (-1 != pos) {
|
|
|
+ pre_pos = pos;
|
|
|
+ pos = source.Find(division, (pos + 1));
|
|
|
+ dest.Add(source.Mid(pre_pos, (pos - pre_pos)));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
unsigned int DEFAULT_MAX_WAIT_TIME_COLLECT_COUNTS = 5000;
|
|
|
|
|
|
const CString DllXMLFileName = "./Config/ProData/HardwareConfig.xml";
|
|
@@ -1399,6 +1413,24 @@ BOOL COTSBrukerImpl::QuantifyPosXrayPointOnLine(CPosXrayPtr a_vXRayPart)
|
|
|
{
|
|
|
char* pcMethod = "Default";//"Default";//"Automatic";
|
|
|
char* pcParams = "ResultType=quantification";
|
|
|
+ if (m_ifAutoId == TRUE)
|
|
|
+ {
|
|
|
+ pcParams = "ResultType=quantification";
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+
|
|
|
+ CStringArray eles;
|
|
|
+ CString elementspara;
|
|
|
+ Split(m_knownElements, eles, _T(","));
|
|
|
+ for (int i = 0; i < eles.GetSize(); i++)
|
|
|
+ {
|
|
|
+ elementspara += _T("Element=") + eles.GetAt(i) + _T(" ");
|
|
|
+ }
|
|
|
+ elementspara.TrimRight();
|
|
|
+ CString pcPara = _T("ResultType=quantification ") + elementspara;
|
|
|
+ pcParams = pcPara.GetBuffer();
|
|
|
+ }
|
|
|
char cResult[10000];
|
|
|
memset(cResult, 0, 10000);
|
|
|
|
|
@@ -2238,11 +2270,20 @@ BOOL COTSBrukerImpl::QuantifyPosXrayPointsOnLine(CPosXrayList& a_listXrayPois)
|
|
|
char* pcParams;
|
|
|
if (m_ifAutoId == TRUE)
|
|
|
{
|
|
|
- pcParams = "ResultType=quantification";
|
|
|
+ pcParams = "ResultType=quantification";
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- CString pcPara = _T("ResultType=quantification Element=" ) + m_knownElements;
|
|
|
+
|
|
|
+ CStringArray eles;
|
|
|
+ CString elementspara;
|
|
|
+ Split(m_knownElements, eles, _T(","));
|
|
|
+ for (int i = 0; i < eles.GetSize(); i++)
|
|
|
+ {
|
|
|
+ elementspara += _T("Element=") + eles.GetAt(i) + _T(" ");
|
|
|
+ }
|
|
|
+ elementspara.TrimRight();
|
|
|
+ CString pcPara = _T("ResultType=quantification ") + elementspara;
|
|
|
pcParams = pcPara.GetBuffer();
|
|
|
}
|
|
|
|
|
@@ -2383,6 +2424,15 @@ BOOL COTSBrukerImpl::SetXRayPointsByFeature(CPosXrayList& a_vXPoints, const DWOR
|
|
|
// quantify the spectrum
|
|
|
char* pcMethod = "Default";//"Default";// "Automatic";
|
|
|
char* pcParams = "ResultType=quantification";
|
|
|
+ if (m_ifAutoId == TRUE)
|
|
|
+ {
|
|
|
+ pcParams = "ResultType=quantification";
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ CString pcPara = _T("ResultType=quantification ") + m_knownElements;
|
|
|
+ pcParams = pcPara.GetBuffer();
|
|
|
+ }
|
|
|
char cResult[10000];
|
|
|
int index = a_vXPoints[i]->GetIndex();
|
|
|
memset(cResult, 0, 10000);
|