📄 global.h
字号:
// Global.h: interface for the CGlobal class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_GLOBAL_H__487D7312_5AE7_4383_8F9B_ABDFF8260ACB__INCLUDED_)
#define AFX_GLOBAL_H__487D7312_5AE7_4383_8F9B_ABDFF8260ACB__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define REGISTRY_KEY "Software\\NCUT\\Computer Department\\Teaching\\GPMIS\\"
#define REGISTRY_DB_KEY "Software\\ODBC\\ODBC.ini\\"
#define DEFAULT_DB_STR "Provider=MSDASQL;DSN=GPMIS;DataBase=GPMIS;UID=root;PWD=root"
#define DEFAULT_DB_TYPE "MS Access"
#define CRYPT_KEY "2004"
#define LOCAL_HOST _T("127.0.0.1")
#define LIGHT_YELLOW RGB(248,250,177)
#define LIGHT_BLUE RGB(172,244,249)
#define LIGHT_RED RGB(250,131,223)
class CStudent;
class CTeacher;
typedef CTypedPtrList<CPtrList, CStudent*> CStudentList;
typedef CTypedPtrList<CPtrList, CTeacher*> CTeacherList;
enum {
SQLSERVER_DB = 0,
MSACCESS_DB = 1
};
enum VIEW_STYLE {
TIME_STYLE = 101,
SHEET_STYLE = 102,
THEME_STYLE = 103,
SCORE_STYLE = 104,
DOCUMENT_STYLE = 105,
};
enum eType{
eEdit,
eCombo,
eLast
};
class CGlobal
{
public:
~CGlobal(){
}
static CGlobal& GetInstance();
void RemoveStudentList();
void CreateStudentList(int nYear);
void RemoveTeacherList();
void CreateTeacherList(int nYear);
void RemoveClassList();
void CreateClassList(int nYear);
void RemoveTitleMap();
void CreateTitleMap();
void RemoveOthersMap();
void CreateOthersMap();
BOOL IsIP(CString strData);
CString GetIPByUrl(CString strUrl, BOOL bHostName = FALSE);
CTeacher* FindTeacher(const CString& );
CStudent* FindStudent(int nID, const CString& strNumber);
CStudent* FindStudent(const CString& strNumber, int nYear);
CStudentList m_studentList;
CTeacherList m_teacherList;
CPtrList m_classList;
CMapStringToString m_TitleMap;
CMapStringToString m_LevelMap;
CMapStringToString m_ThemeTypeMap;
CMapStringToString m_ThemeKindMap;
CMapStringToString m_ExperienceMap;
private:
CGlobal() {
}
CGlobal(const CGlobal&);
CGlobal& operator = (const CGlobal&);
static CGlobal m_Instance;
};
#endif // !defined(AFX_GLOBAL_H__487D7312_5AE7_4383_8F9B_ABDFF8260ACB__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -