Guest User

Untitled

a guest
Dec 11th, 2017
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. /*********************************************************************
  2. * title_name : Auto Notice System
  3. * date_created : 2017.11.01
  4. * filename : AutoNotice.h
  5. * author : TreeN
  6. * version : Version 0.0.1
  7. */
  8.  
  9. class CAutoNotice : public singleton<CAutoNotice>
  10. {
  11. enum AutoNoticeSettings
  12. {
  13. ENABLE_HOURLY_ANNOUCEMENT = true,
  14. // set the minute in hour when horuly annoucement will show(00 - 59)
  15. // it will show every hour at choosen time, ex. if HOURLY_MINUTE = 15 then notice will show at 10:15, 11:15, ... 23:15 etc.
  16. HOURLY_MINUTE = 20,
  17.  
  18. // if you want make some special hour annoucements simply turn this variable to TRUE and set table in SpecialHourAnnoucement() function
  19. ENABLE_SPECIAL_HOUR_ANNOUCEMENT = false,
  20.  
  21. // if you want make same annoucement in time intervals then turn this variable to TRUE and set tables in TimeIntervalAnnoucement() function
  22. ENABLE_TIME_INTERVAL_ANNOUCEMENT = false,
  23.  
  24. MONDAY = 1,
  25. TUESDAY = 2,
  26. WEDNESDAY = 3,
  27. THURSDAY = 4,
  28. FRIDAY = 5,
  29. SATURDAY = 6,
  30. SUNDAY = 0,
  31. EVERYDAY = 100,
  32. };
  33.  
  34. public:
  35. CAutoNotice();
  36. virtual ~CAutoNotice();
  37. void Check(int day, int hour, int minute, int second);
  38.  
  39. private:
  40. void SendNoticeLine(const char * format, ...);
  41. void HourlyAnnouncement(int minute, int second);
  42. void SpecialHourAnnoucement(int day, int hour, int minute, int second);
  43. void TimeIntervalAnnoucement(int day, int hour, int minute, int second);
  44.  
  45. };
Advertisement
Add Comment
Please, Sign In to add comment