http://members.westnet.com.au/bangfeast ... Muncher.7z
Just briefly:
1. All active appointments are set in bold to the calendargadget at program startup.
2. StickyWindow and ToolTip button images are now correct
3. An about window was added.
4. Shortcut keys were changed, check the source code.
5. Shortcut key text is added to the balloon tooltips.
6. PostEvent is used in several places to replace clumsy gadget event firing. Elegant.
7. The alarm module has duplicate checks for deleted and inactive appointments removed and now also sports the same icons as the main list. I know I duplicated some structures but didn't know how else to do it. So many things were fixed there.
I need help with two routines because I am not strong in logic. The first routine sets the correct icon based on the hour of the day/night. I know this isn't right. HourCheck.i contains a value between 0 and 23, is there a better way to work this?
Code: Select all
HourCheck.i = Val(StringField(Appointment\appTime, 1, ":"))
Select HourCheck.i
Case 0 To 12
ChangeIcon(#Gadget_AppointmentMuncher_Appointments, LineNumber.i, 2, Icon\LightMorning)
Case 12 To 18
ChangeIcon(#Gadget_AppointmentMuncher_Appointments, LineNumber.i, 2, Icon\LightNoon)
Case 18 To 24
ChangeIcon(#Gadget_AppointmentMuncher_Appointments, LineNumber.i, 2, Icon\LightNight)
EndSelect
Oh well, the program works for now. Few bugs left and am 'fleshing out the status messages too.
Code: Select all
AppointmentAlarm.i = ParseDate("%dd/%mm/%yyyy", Appointment\appAlarm) ; Turn text date into date integer
CurrentDate.i = ParseDate("%dd/%mm/%yyyy", Program\CurrentDate) ; Turn text date into date integer
If AppointmentAlarm.i < CurrentDate.i ; If alarm date is less than today's date
ChangeIcon(#Gadget_AppointmentMuncher_Appointments, LineNumber.i, 3, Icon\AlarmRed)
ElseIf AppointmentAlarm.i = CurrentDate.i ; If alarm date equals today's date
ChangeIcon(#Gadget_AppointmentMuncher_Appointments, LineNumber.i, 3, Icon\AlarmGreen)
ElseIf AppointmentAlarm.i > CurrentDate.i ; If alarm date is greater than today's date
ChangeIcon(#Gadget_AppointmentMuncher_Appointments, LineNumber.i, 3, Icon\AlarmBlue)
Else
ChangeIcon(#Gadget_AppointmentMuncher_Appointments, LineNumber.i, 3, Icon\AlarmBlank)
EndIf