2026-10-04 00:04:20 +08:00
|
|
|
#include "stdafx.h"
|
2026-09-28 15:28:50 +08:00
|
|
|
#include "UIIValueRecord.h"
|
|
|
|
|
|
|
|
|
|
CUIIValueRecord::CUIIValueRecord()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CUIIValueRecord::CUIIValueRecord(const CUIIValueRecord& valueRecord)
|
|
|
|
|
{
|
|
|
|
|
m_strArValue.RemoveAll();
|
|
|
|
|
m_strArValue.Append(valueRecord.m_strArValue);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CUIIValueRecord::~CUIIValueRecord()
|
|
|
|
|
{
|
|
|
|
|
m_strArValue.RemoveAll();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CUIIValueRecord::GetLableValueAr(CStringArray &strArValue)
|
|
|
|
|
{
|
|
|
|
|
strArValue.RemoveAll();
|
|
|
|
|
if(m_strArValue.GetSize() > 0)
|
|
|
|
|
{
|
|
|
|
|
strArValue.Append(m_strArValue);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CUIIValueRecord::SetLableValueAr(CStringArray &strArValue)
|
|
|
|
|
{
|
|
|
|
|
if(strArValue.GetSize() > 0)
|
|
|
|
|
{
|
|
|
|
|
m_strArValue.RemoveAll();
|
|
|
|
|
m_strArValue.Append(strArValue);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int CUIIValueRecord::GetLableLogicSize()
|
|
|
|
|
{
|
|
|
|
|
int iSize;
|
|
|
|
|
iSize = (int)m_strArValue.GetSize();
|
|
|
|
|
return iSize;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CUIIValueRecord& CUIIValueRecord::operator =(const CUIIValueRecord &dataSrc)
|
|
|
|
|
{
|
|
|
|
|
if(this != &dataSrc)
|
|
|
|
|
{
|
|
|
|
|
m_strArValue.RemoveAll();
|
|
|
|
|
m_strArValue.Append(dataSrc.m_strArValue);
|
|
|
|
|
}
|
|
|
|
|
return *this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CUIIValueRecord::RemoveAll()
|
|
|
|
|
{
|
|
|
|
|
this->m_strArValue.RemoveAll();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CUIIValueRecord::Serialize( CArchive& ar )
|
|
|
|
|
{
|
|
|
|
|
if(ar.IsStoring())
|
|
|
|
|
{
|
|
|
|
|
int nSize = (int)this->m_strArValue.GetSize();
|
|
|
|
|
int i = 0;
|
|
|
|
|
CString sText;
|
|
|
|
|
|
|
|
|
|
ar << nSize;
|
|
|
|
|
|
|
|
|
|
for(i = 0;i<nSize;i++)
|
|
|
|
|
{
|
|
|
|
|
sText = m_strArValue.GetAt(i);
|
|
|
|
|
ar << sText;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
m_strArValue.RemoveAll();
|
|
|
|
|
int nSize = 0,i = 0;
|
|
|
|
|
ar >> nSize;
|
|
|
|
|
|
|
|
|
|
CString sText;
|
|
|
|
|
for(i = 0;i<nSize;i++)
|
|
|
|
|
{
|
|
|
|
|
ar >> sText;
|
|
|
|
|
m_strArValue.Add(sText);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BOOL CUIIValueRecord::GetValue(int nIndex,CString& sText)
|
|
|
|
|
{
|
|
|
|
|
int nSize = (int)this->m_strArValue.GetSize();
|
|
|
|
|
if(nIndex > -1 && nIndex < nSize)
|
|
|
|
|
{
|
|
|
|
|
sText = m_strArValue.GetAt(nIndex);
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|