📄 configinfo.cpp
字号:
// ConfigInfo.cpp: implementation of the CConfigInfo class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "resource.h"
#include "ConfigInfo.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CConfigInfo::CConfigInfo()
{
m_nIsUse = 0;// 策略是否被清空或被禁用 [5/12/2008 By willing]
m_nDes = 0;// DES算法是否可用 [5/12/2008 By willing]
m_n3Des = 0;// 3DES算法是否可用 [5/12/2008 By willing]
m_nEncryptType = 0;// 加密类型 [5/12/2008 By willing]
m_nPwdLen = 0;// 密码的长度 [5/12/2008 By willing]
}
CConfigInfo::~CConfigInfo()
{
}
// 清空配置 [5/12/2008 By willing]
void CConfigInfo::ClearConfig()
{
m_nIsUse = 0;// 策略是否被清空或被禁用 [5/12/2008 By willing]
m_nDes = 0;// DES算法是否可用 [5/12/2008 By willing]
m_n3Des = 0;// 3DES算法是否可用 [5/12/2008 By willing]
m_nEncryptType = 0;// 加密类型 [5/12/2008 By willing]
m_nPwdLen = 0;// 密码的长度 [5/12/2008 By willing]
}
// 设置项的值 [5/12/2008 By willing]
void CConfigInfo::SetItemValue(const CString strName,const CString strValue)
{
CString mstrName = strName;
mstrName.MakeUpper();
if ("DES" == mstrName)
{
m_nDes = atoi(strValue);
}else if ("3DES" == mstrName)
{
m_n3Des = atoi(strValue);
}else if ("ENCTYPE" == mstrName)
{
m_nEncryptType = atoi(strValue);
}else if ("PWDLEN" == mstrName)
{
m_nPwdLen = atoi(strValue);
}else if ("ISUSE" == mstrName)
{
m_nIsUse = atoi(strValue);
}else{
CString strMsg = "";
strMsg.Format("无法识别的配置项%s",strName);
DEGBUGLOG("CConfigInfo","SetItemValue",strMsg);
}
return ;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -