Exemplo n.º 1
0
		void MsgPackage::PackageMsgData(char* &r_lpCharMsg){
			if (0!=_lpCharReturnPackaged){
				r_lpCharMsg=_lpCharReturnPackaged;
			}
			else{
				this->_lpCharReturnPackaged=new char[_usPackageTotalLength];
				//char* _lpTempPackaged=new char[_usPackageTotalLength];
				int intPos=ConstInt_Length_Of_PackageHead;
				int vLength=_vMsgData.size();
				for(int i=0;i<vLength;i++){
					char lpCharContent[256];
					int len=PackageData(_vMsgData[i],lpCharContent);
					//USHORT j=_vMsgData[i]->action;
					memcpy(_lpCharReturnPackaged+intPos,lpCharContent,len);
					intPos+=len;
				}
				r_lpCharMsg=_lpCharReturnPackaged;
			}
		}
Exemplo n.º 2
0
void PackageList::showData(const String& pattern) {
	// clear
	packages.clear();
	// find matching packages
	vector<PackagedP> matching;
	{
		PROFILER(_("find matching packages"));
		package_manager.findMatching(pattern, matching);
	}
	FOR_EACH(p, matching) {
		// open image
		PROFILER(_("load package image"));
		InputStreamP stream = p->openIconFile();
		Image img;
		Bitmap bmp;
		if (stream && img.LoadFile(*stream)) {
			bmp = Bitmap(img);
		}
		// add to list
		packages.push_back(PackageData(p, bmp));
	}