Skip to content

Giao diện dòng lệnh và viết lại class Identity sử dụng attribute#3

Open
lewtds wants to merge 18 commits into
AptechC1203L:masterfrom
lewtds-forks:attr
Open

Giao diện dòng lệnh và viết lại class Identity sử dụng attribute#3
lewtds wants to merge 18 commits into
AptechC1203L:masterfrom
lewtds-forks:attr

Conversation

@lewtds

@lewtds lewtds commented Aug 14, 2013

Copy link
Copy Markdown
  • Giao diện dòng lệnh được phân thành các trang, là các class inherit từ ChoiceScreen. Trong constructor của các class này sẽ sử dụng method AddChoice(String key, String description, Action callableMethod) để thêm tùy chọn trên giao diện. Sau đó gọi method Start để khởi động trang, Stop để trở về trang trước, Quit để thoát. Có thể thêm các hàm hook (event) trước khi hiển thị menu hoặc trước và sau khi chạy action.
  • Các class identity như Student bh chỉ cần inherit từ Identity và dùng attribute [Identity.ID] để đánh dấu property nào dùng để so sánh ngang bằng (Equals). Sau đó có thể cho vào HashSet thoải mái.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant