BookInfo.h 3.2 KB
#pragma once
enum RESOURCE_TYPE
{
	RESOURCE_MP3,
	RESOURCE_MP4,
	RESOURCE_FILE
};
struct RESOURCE_INFO
{
	int x;
	int y;
	int page;
	CString fileName;
	CString itemName;
	int nType;
	int nPageHeight;
	int nPageWidth;
};
struct EXERCISE_INFO
{
	int x;
	int y;
	int w;
	int h;
	int page;
	CString fileAct;
	CString itemIcon;
	int pageheight;
	int pagewidth;

};
typedef std::vector<RESOURCE_INFO> ListResource;
typedef std::vector<EXERCISE_INFO> ListExercise;
enum Book_State
{
	Download_Not_Exist = -3,
	Download_Fail  = -2,
	Download_None  = -1,
	Download_OK    = 0,
	Download_Wait  = 1,
	Download_Pause = 2,
	Download_Continue = 3,
	Download_Cover_Import = 4,
	Download_Cover_OK = 5,
	Download_Doing = 6,
	Download_Book_OK = 7
};
//Add By Ray 2020-07-15
enum CompoundRes_State
{
	CompoundRES_Download_None  = -1,
	CompoundRES_Download_Pause = 2,
	CompoundRES_Download_Doing = 3,
	CompoundRES_Download_OK = 1
};
enum Book_Type
{
	None           = 0,
	PDF_Book       = 1,
	EPUB_Book      = 2,
	TXT_Book       = 3,
	ALL_Book       = 4,
	PDF_TOOL_BOOK  = 5,
	//Add By Ray  2020-07-14
	PDF_COMPOUNDS_RES_BOOK=6
};
enum Book_Grade
{
	GRADE1=1,
	GRADE2=2,
	GRADE3=3,
	GRADE4=4,
	GRADE5=5,
	GRADE6=6,
	GRADE7=7,
	GRADE8=8,
	GRADE9=9,
	GRADE10=10,
	GRADE11=11,
	GRADE12=12,
};
enum Book_Term
{
	TERM1=1,
	TERM2=2,
	TERM3=3,
	TERM4=4,
};
static CString Book_Grade_Name[]=
{
	L"无",
	L"一年级",
	L"二年级",
	L"三年级",
	L"四年级",
	L"五年级",
	L"六年级",
	L"七年级",
	L"八年级",
	L"九年级",
	L"十年级",
	L"十一年级",
	L"十二年级"
};
static CString Book_Term_Name[]=
{
	L"无",
	L"第一学期",
	L"第二学期",
	L"第三学期",
	L"第四学期"
};

struct BOOK_GRADE_CLASS
{
	CString strBookId;
	CString strGradeName;
	CString strClassName;
	int grade_order;
	int term_order;
};
struct BOOK_CLOUDNOTE_COUNT
{
	CString strBookId;
	int     nCloudNoteNum;
};
class CBookInfo
{
public:
	CBookInfo(void);
	~CBookInfo(void);
	bool CompareBookInfo(CBookInfo booInfo,int id);
	int GetTerm();
	int GetGrade();
	
	int        id;
	CString    bookId ;
	CString    bookName; 
	int        catalogId;
	CString    bookCoverPath;
	CString    bookTextPath ;
	Book_Type  bookType;
	Book_State bookState;
	long       recentNo;
	long       noteid;//打开位置
	int        notesCount; //笔记数目
	int        resCount; //资源数目
	int        exist;
	CString    strSubjectId;
	CString    strDownloadUrl;
	CString    strDownloadSize;
	CString    strFileSize;
	int        orderNo;
	CString    strCoverDigest;
	CString    strFileDigest;
	int		   unionId;
	CString     applicableTerm;//书籍可用学期
	int       startPage;    //图书正起始页文
	//Add By Ray 2018-06-11
	CString   updatetime;
	CString   strFileName;
	int		   nNoteNum;
	int		   nIsMoved;  //是否在书桌显示
	CString    strYear;
	//1=True 0=False
	int       nDiandu;
	int	      nExercise;
	int       nResource;
	CString    strDiandu_URL;
	CString	   strExercise_URL;
	CString    strPageExerciseURL;
	CString    strGrade;
	int		   lastPage;
	CRect	   DrawPos;
	float      BookPos;
	int        nIsHoistory;
	std::vector<BOOK_GRADE_CLASS> m_grade_list;
	
	string     strSecurityKey;

	bool bIsSelect;//当前是否被选中
	CString strShortName;//书籍简称

	static bool ComparPdfInfoByOrder(CBookInfo lhs,CBookInfo rhs);
private:
	int		   iTerm;//书所在的学期
	int		   iGrade;
};