This repository has been archived by the owner on Dec 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBookCard.h
78 lines (62 loc) · 1.88 KB
/
BookCard.h
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
#pragma once
#include "Book.h"
ref class BookCard : System::Windows::Forms::Panel {
private:
System::Windows::Forms::ContextMenu^ cm;
System::Windows::Forms::PictureBox^ Cover;
System::Windows::Forms::Label^ Title;
System::Windows::Forms::Label^ Author;
System::Windows::Forms::Label^ Chapters;
System::Windows::Forms::Label^ ChaptersRead;
System::Windows::Forms::Label^ PercentageRead;
property bool openFlag2;
public:
property bool openFlag {
void set(bool value) {
openFire(this, System::EventArgs::Empty, 0);
}
};
property bool updateNFlag {
void set(bool value) {
openFire(this, System::EventArgs::Empty, 1);
}
};
property bool deleteFlag {
void set(bool value) {
openFire(this, System::EventArgs::Empty, 2);
}
};
property bool updateCLFlag {
void set(bool value) {
openFire(this, System::EventArgs::Empty, 3);
}
};
property bool SendCardClickEvent {
void set(bool value) {
CardClick();
}
};
delegate void OpenHandler(System::Object^ sender, System::EventArgs^ e);
Book^ AttachedBook;
//Events
event OpenHandler^ OnOpen;
event OpenHandler^ OnDelete;
event OpenHandler^ OnUpdateCLClick;
event OpenHandler^ OnUpdateNClick;
delegate void CardHandler(BookCard^ sender);
event CardHandler^ OnCardClick;
int bookIndex;
bool CoverOnly;
BookCard(Book^ book, bool coveronly);
~BookCard();
void OpenBook(System::Object^ sender, System::EventArgs^ e);
void DeleteBook(System::Object^ sender, System::EventArgs^ e);
void UpdateFromNetBook(System::Object^ sender, System::EventArgs^ e);
void UpdateChapterListBook(System::Object^ sender, System::EventArgs^ e);
virtual void openFire(System::Object^ sender, System::EventArgs^ e, unsigned int i);
virtual void CardClick() {
OnCardClick(this);
}
void OnClick(System::Object^ sender, System::EventArgs^ e);
void OnMouseClick(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e);
};