You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
832 B
C++

#include "StdAfx.h"
#include "ValStrSN.h"
#include "GlobalFunction.h"
CValStrSN::CValStrSN(void)
{
m_ValStrType = _STR_SN;
m_SnMin = 0;//<2F><>С<EFBFBD><D0A1><EFBFBD><EFBFBD>
m_SnMax = 9999;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
m_SnCur = 1;//<2F><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>
m_SnInc = 1;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
m_EachMarkTimes = 1;//ÿ<><C3BF><EFBFBD><EFBFBD><EFBFBD>̴<EFBFBD><CCB4><EFBFBD>
m_CurMarkTimes = 0;//<2F><>ǰ<EFBFBD><C7B0><EFBFBD>̴<EFBFBD><CCB4><EFBFBD>
}
CValStrSN::~CValStrSN(void)
{
}
CString CValStrSN::GetTypeStr()
{
return "SN";
}
//<2F><><EFBFBD>㵱ǰ<E3B5B1><C7B0><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>
void CValStrSN::UpdateValStr()
{
//<2F><>ǰֵ<C7B0><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
m_SnCur += m_SnInc;
}
CString CValStrSN::GetStr()
{
CString str;
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>ǰ<EFBFBD><C7B0>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>0
int Cnt1 = GetNumDigit(m_SnMax);
int Cnt2 = GetNumDigit(m_SnCur);
for(int i=0;i<(Cnt1-Cnt2);i++)
{
str += "0";
}
CString SnCurStr;
SnCurStr.Format("%ld",m_SnCur);
str += SnCurStr;
return str;
}