1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
#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;
};