📄 dbconfiginfounit.h
字号:
//---------------------------------------------------------------------------
/*
* Copyright (c) 2008,杭州中正生物认证技术有限公司
* All rights reserved.
* 文件名称:DBConfigInfoUnit.h
* 文件标识:见配置管理计划书
* 摘 要:
定义了数据库配置信息管理类。
* 当前版本:1.0
* 代码设计:王从骏
* 完成日期:2008年11月
*/
//---------------------------------------------------------------------------
#ifndef DBConfigInfoUnitH
#define DBConfigInfoUnitH
#include <vcl.h>
#include <XMLIntf.hpp>
//--------------------------------------
typedef enum
{
FileDB_T, //文件数据库
RelationDB_T //关系数据库
}DB_T;
//数据库配置信息
typedef struct
{
int DBType; //数据类型
char dbAccessFile[512]; //文件数据库名
char dbProvider[120]; //数据库提供者
char dbHostName[50]; //数据库主机名
char dbDatabaseName[50]; //数据库名
char dbUserName[50]; //用户名
char dbPassword[20]; //用户密码
int dbFlag; //标识位
}DBConfigInfo_T,*pDBConfigInfo_T;
//界面配置信息
typedef struct
{
int fvWarningEventColor; //警告事件颜色
int fvUncloseEventColor; //门未关好颜色
int fvDangerEventColor; //胁迫事件颜色
int fvDeviceErrorColor; //设备异常颜色
int fvOtherColor; //其它事件颜色
int WarningPanelStyle; //警告事件面板右边或下面
int ShowMaxCount; //显示最大记录数
}FormViewConfig_T;
typedef struct
{
char CompanyName[64]; //公司简称
DBConfigInfo_T DBConfig;
FormViewConfig_T ViewConfig;
}SystemConfig_T;
//--------------------------------------
class TBaseConfigInfo
{
protected:
virtual bool GetConfigInfo(SystemConfig_T& oConfigInfo) = 0;
virtual bool SetConfigInfo(SystemConfig_T iConfigInfo) = 0;
};
//--------------------------------------
class TConfigInfoXML :public TBaseConfigInfo
{
private:
AnsiString FConfigFile; //配置文件名
_di_IXMLDocument pCurXML;
SystemConfig_T FConfigInfo;
public:
TConfigInfoXML(const AnsiString iConfigFile);
~TConfigInfoXML();
bool GetConfigInfo(SystemConfig_T& oConfigInfo);
bool GetDefaultConfigInfo(SystemConfig_T& oConfigInfo);
bool SetConfigInfo(SystemConfig_T iConfigInfo);
bool SaveConfigInfo(AnsiString iConfigFileName);
bool SaveConfigInfo();
};
//--------------------------------------
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -