当前位置: 首页>>代码示例>>C++>>正文


C++ CStringArray::IsEmpty方法代码示例

本文整理汇总了C++中CStringArray::IsEmpty方法的典型用法代码示例。如果您正苦于以下问题:C++ CStringArray::IsEmpty方法的具体用法?C++ CStringArray::IsEmpty怎么用?C++ CStringArray::IsEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CStringArray的用法示例。


在下文中一共展示了CStringArray::IsEmpty方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

const CStringArray& CCaliMethodOn::StringNames()
{
	static CStringArray sa;
	if(sa.IsEmpty())
	{
		sa.Add(_T("峰面积"));
		sa.Add(_T("峰高"));
	}
	return sa;
}
开发者ID:Wanghuaichen,项目名称:SignalProcess,代码行数:10,代码来源:CaliData.cpp

示例2: GetSampleFullPath

bool CCaliData::GetSampleFullPath(CStringArray& strArry)
{
	if(!strArry.IsEmpty()) strArry.RemoveAll();

	const int itemNum = m_CaliItems.size();
	std::set<CString> sampleFullPath;
	for (int i=0; i<itemNum; i++)
	{
		sampleFullPath.insert(m_CaliItems[i].szSampleFullName);
	}
	//遍历SampleNames容器后放入deque<SamleFileInfo> m_InFileInfo
	typedef std::set<CString>::iterator SetIter;
	for (SetIter iter=sampleFullPath.begin(); iter!=sampleFullPath.end(); ++iter)
	{
		CString szPath = *iter;
		strArry.Add(szPath);
	}
	return true;
}
开发者ID:Wanghuaichen,项目名称:SignalProcess,代码行数:19,代码来源:CaliData.cpp

示例3: Sample_PrepareAcquire


//.........这里部分代码省略.........
			}
		}
		else if(g_cConfigIni.CurrentSystemName().Compare(PASYSTEM_NAME_IC1800) == 0)
		{
			static LPCTSTR vs[] =
			{
				_T("Instrument/Pump/InitFLow")
			};
			for(int i=0; i<sizeof(vs)/sizeof(LPCTSTR); ++i)
			{
				if(adSample.CompareValue_Double(sp + vs[i], ad, vs[i]) != CAnalysisData::CR_EQUAL) notequal.Add(vs[i]);
			}

			static LPCTSTR vs2[] =
			{
				_T("Instrument/Detector/Temp"),
				_T("Instrument/Detector/YZQDL")/*,
											   _T("Instrument/Detector/Range")//*/
			};
			for(int i=0; i<sizeof(vs2)/sizeof(LPCTSTR); ++i)
			{
				if(adSample.CompareValue_Double(sp + vs2[i], ad, vs2[i]) != CAnalysisData::CR_EQUAL) notequal.Add(vs2[i]);
			}

			static LPCTSTR vs3[] =
			{
				_T("Instrument/ColumnBox/Temp")
			};
			for(int i=0; i<sizeof(vs3)/sizeof(LPCTSTR); ++i)
			{
				if(adSample.CompareValue_Double(sp + vs3[i], ad, vs3[i]) != CAnalysisData::CR_EQUAL) notequal.Add(vs3[i]);
			}
		}
		if(!notequal.IsEmpty())
		{
			CString name, sv, cv, tr;
			// 弹出不同对话框
			CString msg(_T("<table border='1'><tr><td>名称</td><td>样品参值</td><td>当前参值</td></tr>"));
			for(int i=0; i<=notequal.GetUpperBound(); ++i)
			{
				const CString& si = notequal.GetAt(i);
				adSample.GetProperty(sp + si, XMLPROP_NAME, name);
				adSample.GetValue_String(sp + si, sv);
				if((ad.GetValue_String(si, cv) != IAERROR_SUCCESS) || cv.IsEmpty()) cv = _T("&nbsp;");
				if((g_cConfigIni.CurrentSystemName().Compare(PASYSTEM_NAME_IC1800) == 0) && (si == _T("Instrument/Detector/Temp")))
				{
					if(sv == _T("0")) sv = _T("40℃");
					else if(sv == _T("1")) sv = _T("50℃");
					else if(sv == _T("2")) sv = _T("60℃");
					else sv = _T("参数错误");

					if(cv == _T("0")) cv = _T("40℃");
					else if(cv == _T("1")) cv = _T("50℃");
					else if(cv == _T("2")) cv = _T("60℃");
					else cv = _T("参数错误");
				}
				tr.Format(_T("<tr><td>%s</td><td>%s</td><td>%s</td></tr>"), name, sv, cv);
				msg += tr;
			}
			msg += _T("</table>");
			switch(HTMLMessageBox(NULL, msg, _T("当前设置参数与样品中的仪器参数不一致"), _T("采用样品中的仪器参数;采用当前设置参数;取消"), _T(";"), ICON_QUESTION))
			{
			case 0:
				// 采用样品中的仪器参数
				if(adSample.GetValue_XMLString(XMLPATH_SAMPLE_PARAM_INSTRUMENT, xmlString) != IAERROR_SUCCESS) return IAERROR_CG_SAMPLE_NOTREADY;
				if(pcInstru->Base_DownloadToDevice(xmlString) != IAERROR_SUCCESS) return IAERROR_CG_SAMPLE_NOTREADY;
开发者ID:Wanghuaichen,项目名称:SignalProcess,代码行数:67,代码来源:Base_AnalysisTemplate.cpp

示例4: OnApply

BOOL CPPgDirectories::OnApply()
{
	bool testtempdirchanged=false;
	CString testincdirchanged = thePrefs.GetMuleDirectory(EMULE_INCOMINGDIR);

	CString strIncomingDir;
	GetDlgItemText(IDC_INCFILES, strIncomingDir);
	MakeFoldername(strIncomingDir);
	if (strIncomingDir.IsEmpty()){
		strIncomingDir = thePrefs.GetDefaultDirectory(EMULE_INCOMINGDIR, true); // will create the directory here if it doesnt exists
		SetDlgItemText(IDC_INCFILES, strIncomingDir);
	}
	else if (thePrefs.IsInstallationDirectory(strIncomingDir)){
		AfxMessageBox(GetResString(IDS_WRN_INCFILE_RESERVED));
		return FALSE;
	}
	else if (strIncomingDir.CompareNoCase(testincdirchanged) != 0 && strIncomingDir.CompareNoCase(thePrefs.GetDefaultDirectory(EMULE_INCOMINGDIR, false)) != 0){
		// if the user chooses a non-default directory which already contains files, inform him that all those files
		// will be shared
		CFileFind ff;
		CString strSearchPath;
		strSearchPath.Format(_T("%s\\*"),strIncomingDir);
		bool bEnd = !ff.FindFile(strSearchPath, 0);
		bool bExistingFile = false;
		while (!bEnd)
		{
			bEnd = !ff.FindNextFile();
			if (ff.IsDirectory() || ff.IsDots() || ff.IsSystem() || ff.IsTemporary() || ff.GetLength()==0 || ff.GetLength()>MAX_EMULE_FILE_SIZE)
				continue;

			// ignore real LNK files
			TCHAR szExt[_MAX_EXT];
			_tsplitpath(ff.GetFileName(), NULL, NULL, NULL, szExt);
			if (_tcsicmp(szExt, _T(".lnk")) == 0){
				SHFILEINFO info;
				if (SHGetFileInfo(ff.GetFilePath(), 0, &info, sizeof(info), SHGFI_ATTRIBUTES) && (info.dwAttributes & SFGAO_LINK)){
					if (!thePrefs.GetResolveSharedShellLinks())
						continue;
				}
			}

			// ignore real THUMBS.DB files -- seems that lot of ppl have 'thumbs.db' files without the 'System' file attribute
			if (ff.GetFileName().CompareNoCase(_T("thumbs.db")) == 0)
				continue;

			bExistingFile = true;
			break;
		}
		if (bExistingFile
			&& AfxMessageBox(GetResString(IDS_WRN_INCFILE_EXISTS), MB_OKCANCEL | MB_ICONINFORMATION) == IDCANCEL)
		{
			return FALSE;
		}
	}
	
	// checking specified tempdir(s)
	CString strTempDir;
	GetDlgItemText(IDC_TEMPFILES, strTempDir);
	if (strTempDir.IsEmpty()){
		strTempDir = thePrefs.GetDefaultDirectory(EMULE_TEMPDIR, true); // will create the directory here if it doesnt exists
		SetDlgItemText(IDC_TEMPFILES, strTempDir);
	}

	int curPos=0;
	CStringArray temptempfolders;
	CString atmp=strTempDir.Tokenize(_T("|"), curPos);
	while (!atmp.IsEmpty())
	{
		atmp.Trim();
		if (!atmp.IsEmpty()) {
			if (CompareDirectories(strIncomingDir, atmp)==0){
					AfxMessageBox(GetResString(IDS_WRN_INCTEMP_SAME));
					return FALSE;
			}	
			if (thePrefs.IsInstallationDirectory(atmp)){
				AfxMessageBox(GetResString(IDS_WRN_TEMPFILES_RESERVED));
				return FALSE;
			}
			bool doubled=false;
			for (int i=0;i<temptempfolders.GetCount();i++)	// avoid double tempdirs
				if (temptempfolders.GetAt(i).CompareNoCase(atmp)==0) {
					doubled=true;
					break;
				}
			if (!doubled) {
				temptempfolders.Add(atmp);
				if (thePrefs.tempdir.GetCount()>=temptempfolders.GetCount()) {
					if( atmp.CompareNoCase(thePrefs.GetTempDir(temptempfolders.GetCount()-1))!=0	)
						testtempdirchanged=true;
				} else testtempdirchanged=true;

			}
		}
		atmp = strTempDir.Tokenize(_T("|"), curPos);
	}

	if (temptempfolders.IsEmpty())
		temptempfolders.Add(strTempDir = thePrefs.GetDefaultDirectory(EMULE_TEMPDIR, true));

	if (temptempfolders.GetCount()!=thePrefs.tempdir.GetCount())
//.........这里部分代码省略.........
开发者ID:dalinhuang,项目名称:dmibox,代码行数:101,代码来源:PPgDirectories.cpp

示例5: DoEvaMsg

void CCallThread::DoEvaMsg(const MSG& msg)
{
	SLZEvaData* pEvaData = (SLZEvaData*)msg.wParam;

	SLZWindow Window;
	BOOL flag = m_rInlineQueData.m_rWindowTable.QueryWindowByEvaId(pEvaData->GetEvaluatorId(),Window);
	if(flag)
	{
		SLZData data;
		//找出正在呼叫的那条数据
		if(m_rCalledQueData.GetCalledQueData(Window.GetWindowId(),data))
		{
			data.SetEvaluateLevel(pEvaData->GetEvaLevel());
			data.SetIsFinshEva(TRUE);
			CTime curTime = CTime::GetCurrentTime();
			data.SetFinishTime(curTime);
			if(m_rCalledQueData.DeleteCalledQueData(data))//删除正在呼叫的那条数据
			{
				m_rFinshQueData.Add(data);//加入完成队列
			}
		}
		else//不呼叫只评价
		{
			data.SetEvaluateLevel(pEvaData->GetEvaLevel());
			data.SetIsFinshEva(TRUE);
			CTime curTime = CTime::GetCurrentTime();
			data.SetFinishTime(curTime);
			data.SetWindowId(Window.GetWindowId());
			data.SetWindowShowId(Window.GetShowWndId());
			CString staffID = m_map_login[Window.GetWindowId()];
			data.SetStaffId(staffID);
			CString bussinessType;
			/*
			处理业务ID
			*/
			SLZWindow window;
			m_rInlineQueData.m_rWindowTable.QueryWindowById(data.GetWindowId(),window);
			CStringArray arrayQueID;
			window.GetArrayQueId(arrayQueID);
			if(!arrayQueID.IsEmpty())
			{
				bussinessType = arrayQueID[0];
			}
			else
			{
				CMap<int,int,CQueueInfo,CQueueInfo&>::CPair* pCurEva;
				int count = m_map_que.GetCount();
				for(int i=0;i<count;i++)
				{
					pCurEva = m_map_que.PLookup(i);
					bussinessType = pCurEva->value.GetQueID();
					break;
				}
			}
			////////////////////////////////
			data.SetBussinessType(bussinessType);
			data.SetOrganId(theApp.m_logicVariables.strOrganID);
			data.SetOrganName(theApp.m_logicVariables.strOrganNmae);
//			data.SetQueSerialID(_T("1"));
			data.SetQueueNumber(_T("0"));
			data.SetCallTime(curTime);
			data.SetTakingNumTime(curTime);
			m_rFinshQueData.Add(data);//加入完成队列
		}
	}
	if(pEvaData)//释放资源
		delete pEvaData;
}
开发者ID:myhlj,项目名称:HallQueFront,代码行数:68,代码来源:CallThread.cpp

示例6: OnApply

BOOL CPPgDirectories::OnApply()
{
	bool testtempdirchanged=false;
	CString testincdirchanged=thePrefs.GetIncomingDir();

	CString strIncomingDir;
	GetDlgItemText(IDC_INCFILES, strIncomingDir);
	if (strIncomingDir.IsEmpty()){
		strIncomingDir = thePrefs.GetAppDir() + _T("incoming");
		SetDlgItemText(IDC_INCFILES, strIncomingDir);
	}
	if (thePrefs.IsInstallationDirectory(strIncomingDir)){
		AfxMessageBox(GetResString(IDS_WRN_INCFILE_RESERVED));
		return FALSE;
	}
	
	// checking specified tempdir(s)
	CString strTempDir;
	GetDlgItemText(IDC_TEMPFILES, strTempDir);
	if (strTempDir.IsEmpty()){
		strTempDir = thePrefs.GetAppDir() + _T("temp");
		SetDlgItemText(IDC_TEMPFILES, strTempDir);
	}

	int curPos=0;
	CStringArray temptempfolders;
	CString atmp=strTempDir.Tokenize(_T("|"), curPos);
	while (!atmp.IsEmpty())
	{
		atmp.Trim();
		if (!atmp.IsEmpty()) {
			if (CompareDirectories(strIncomingDir, atmp)==0){
					AfxMessageBox(GetResString(IDS_WRN_INCTEMP_SAME));
					return FALSE;
			}	
			if (thePrefs.IsInstallationDirectory(atmp)){
		AfxMessageBox(GetResString(IDS_WRN_TEMPFILES_RESERVED));
		return FALSE;
	}
			bool doubled=false;
			for (int i=0;i<temptempfolders.GetCount();i++)	// avoid double tempdirs
				if (temptempfolders.GetAt(i).CompareNoCase(atmp)==0) {
					doubled=true;
					break;
				}
			if (!doubled) {
				temptempfolders.Add(atmp);
				if (thePrefs.tempdir.GetCount()>=temptempfolders.GetCount()) {
					if( atmp.CompareNoCase(thePrefs.GetTempDir(temptempfolders.GetCount()-1))!=0	)
						testtempdirchanged=true;
				} else testtempdirchanged=true;

			}
		}
		atmp = strTempDir.Tokenize(_T("|"), curPos);
	}

	if (temptempfolders.IsEmpty())
		temptempfolders.Add(strTempDir = thePrefs.GetAppDir() + _T("temp"));

	if (temptempfolders.GetCount()!=thePrefs.tempdir.GetCount())
		testtempdirchanged=true;

	// applying tempdirs
	if (testtempdirchanged) {
		thePrefs.tempdir.RemoveAll();
		for (int i=0;i<temptempfolders.GetCount();i++) {
			CString toadd=temptempfolders.GetAt(i);
			MakeFoldername( toadd.GetBuffer(MAX_PATH) );
			if (!PathFileExists(toadd))
				CreateDirectory(toadd,NULL);
			if (PathFileExists(toadd))
				thePrefs.tempdir.Add(toadd);
		}
	}

	// incomingdir
	_sntprintf(thePrefs.incomingdir, ARRSIZE(thePrefs.incomingdir), _T("%s"), strIncomingDir);
	MakeFoldername(thePrefs.incomingdir);
	_stprintf(thePrefs.GetCategory(0)->incomingpath,_T("%s"),thePrefs.incomingdir);


	thePrefs.shareddir_list.RemoveAll();
	m_ShareSelector.GetSharedDirectories(&thePrefs.shareddir_list);
	for (int i = 0; i < m_ctlUncPaths.GetItemCount(); i++)
		thePrefs.shareddir_list.AddTail(m_ctlUncPaths.GetItemText(i, 0));

	// check shared directories for reserved folder names
	POSITION pos = thePrefs.shareddir_list.GetHeadPosition();
	while (pos){
		POSITION posLast = pos;
		const CString& rstrDir = thePrefs.shareddir_list.GetNext(pos);
		if (!thePrefs.IsShareableDirectory(rstrDir))
			thePrefs.shareddir_list.RemoveAt(posLast);
	}

	theApp.emuledlg->sharedfileswnd->Reload();

	if (testtempdirchanged)
		AfxMessageBox(GetResString(IDS_SETTINGCHANGED_RESTART));
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:nextemf,代码行数:101,代码来源:PPgDirectories.cpp


注:本文中的CStringArray::IsEmpty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。