delphi - adding a timer to implement reminders in application -


i have reminders table in apps database

fieldname = 'id' fieldname = 'title' fieldname = 'description' fieldname = 'start_date' fieldname = 'start_time' fieldname = 'end_date' fieldname = 'end_time' fieldname = 'repeat'  (true/false) fieldname = 'occurs'  (integer = 1-daily, 2-weekly, 3-monthy, 4-annually) fieldname = 'completed" (true/false) 

is there way use ttimer display title , description of reminder whenever event occurs? if so, please explain in code/seudo code, or text.

a reminder either onetime - or - re-occurring event

if 1 time (occurs = 1 daily) , date , time stored in start_date & start time reminder should display @ time. after displayed, table field "completed" set true.

if re-occurring, date , time stored in start_date & start time , end date , end time stored. reminder should display @ day , time, each day (1), week (2), month(3), or year(4)

if daily, reminder should display @ time every day, until end date reached

if weekly, reminder should display @ time, on particular day (of each week), until end date reached

if monthly, reminder should display @ time, on particular day (of each month), until end date reached

if annually, reminder should display @ time, on particular day (of each year), until end date reached

when end date reached, completed updated true

thanks, hope do-able out additional components or libraries

<ironic>

your question: there way use ttimer display title , description of reminder whenever event occurs?

my answer

yes, there way it.

requirement: if so, please explain in code.

anwer fillfull requirement

pseudocode:

procedure teventsmanager.setnexteventtimer; begin   if assigned(nextocurringevent)   begin     timer1.interval := millisecondsbetween(now, nextocurringevent.datetime);     timer1.enabled := true;   end; end;  procedure teventsmanager.timer1timer(sender: tobject); begin   timer1.enabled := false;   displayreminder(nextocurringevent);   setnexteventtimer; end; 

</ironic>


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -