69 |
How do I encode data as ICalendar format
|
68 |
How do I get the occurrences between giving start/end margins
|
67 |
How do I get the value of specified part in the recurrence expression
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) DevOut( "FREQ: " ) DevOut( Transform(oICalendar:RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",0/*exRecurFREQ*/),"") ) DevOut( "DTSTART: " ) DevOut( Transform(oICalendar:RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",1/*exRecurDTSTART*/),"") ) DevOut( "UNTIL: " ) DevOut( Transform(oICalendar:RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",2/*exRecurUNTIL*/),"") ) DevOut( "COUNT: " ) DevOut( Transform(oICalendar:RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",3/*exRecurCOUNT*/),"") ) DevOut( "INTERVAL: " ) DevOut( Transform(oICalendar:RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",4/*exRecurINTERVAL*/),"") ) DevOut( "WKST: " ) DevOut( Transform(oICalendar:RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",14/*exRecurWKST*/),"") ) DevOut( "BYDAY: " ) DevOut( Transform(oICalendar:RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",8/*exRecurBYDAY*/),"") ) DevOut( "BYMONTHDAY: " ) DevOut( Transform(oICalendar:RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",9/*exRecurBYMONTHDAY*/),"") ) DevOut( "BYYEARDAY: " ) DevOut( Transform(oICalendar:RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",10/*exRecurBYYEARDAY*/),"") ) DevOut( "BYWEEKNO: " ) DevOut( Transform(oICalendar:RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",11/*exRecurBYWEEKNO*/),"") ) DevOut( "BYMONTH: " ) DevOut( Transform(oICalendar:RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",12/*exRecurBYMONTH*/),"") ) DevOut( "BYSETPOS: " ) DevOut( Transform(oICalendar:RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",13/*exRecurBYSETPOS*/),"") ) DevOut( "BYHOUR: " ) DevOut( Transform(oICalendar:RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",7/*exRecurBYHOUR*/),"") ) DevOut( "BYMINUTE: " ) DevOut( Transform(oICalendar:RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",6/*exRecurBYMINUTE*/),"") ) DevOut( "BYSECOND: " ) DevOut( Transform(oICalendar:RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",5/*exRecurBYSECOND*/),"") ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
66 |
How do I check if the recurrence expression is syntactically correct (method 2)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) DevOut( "1.A) SyntaxError: " ) DevOut( Transform(oICalendar:RecurPartValue("DTSTART=20151205;FREQ=DAILY;BYDAY=MO",-1/*exRecurSyntaxError*/),"") ) DevOut( "1.B) SyntaxErrorInfo: " ) DevOut( Transform(oICalendar:RecurPartValue("DTSTART=20151205;FREQ=DAILY;BYDAY=MO",-2/*exRecurSyntaxErrorInfo*/),"") ) DevOut( "2.A) SyntaxError: " ) DevOut( Transform(oICalendar:RecurPartValue("FREQ=DAILY;BYDAY=MO",-1/*exRecurSyntaxError*/),"") ) DevOut( "2.B) SyntaxErrorInfo: " ) DevOut( Transform(oICalendar:RecurPartValue("FREQ=DAILY;BYDAY=MO",-2/*exRecurSyntaxErrorInfo*/),"") ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
65 |
How do I check if the recurrence expression is syntactically correct (method 1)
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) DevOut( "1. If negative, the expression is incorrect" ) DevOut( Transform(oICalendar:RecurCheck("DTSTART=20151205;FREQ=DAILY;BYDAY=MO","12/05/2015"),"") ) DevOut( "2. If negative, the expression is incorrect" ) DevOut( Transform(oICalendar:RecurCheck("junk","01/01/2001"),"") ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
64 |
How do I check if a specified date match the giving recurrence
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) DevOut( Transform("12/05/2015","") ) DevOut( Transform(oICalendar:RecurCheck("DTSTART=20151205;FREQ=DAILY;BYDAY=MO","12/05/2015"),"") ) DevOut( Transform("12/07/2015","") ) DevOut( Transform(oICalendar:RecurCheck("DTSTART=20151205;FREQ=DAILY;BYDAY=MO","12/07/2015"),"") ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
63 |
Recur: The 2nd to last weekday of the month
|
62 |
Recur: The 3rd instance into the month of one of Tuesday, Wednesday or Thursday, for the next 3 months
|
61 |
Recur: The last work day of the month
|
60 |
Recur: An example where the days generated makes a difference because of WKST (Sample 2)
|
59 |
Recur: An example where the days generated makes a difference because of WKST (Sample 1)
|
58 |
Recur: Every 20 minutes from 9:00 AM to 4:40 PM every day
|
57 |
Recur: Every hour and a half for 4 occurrences
|
56 |
Recur: Every 15 minutes for 6 occurrences
|
55 |
Recur: Every 3 hours from 9:00 AM to 5:00 PM on a specific day
|
54 |
Recur: Every four years, the first Tuesday after a Monday in November, forever (U.S. Presidential Election day)
|
53 |
Recur: The first Saturday that follows the first Sunday of the month, forever
|
52 |
Recur: Every Friday the 13th, forever
|
51 |
Recur: Every Thursday, but only during June, July, and August, forever
|
50 |
Recur: Every Thursday in March, forever
|
49 |
Recur: Monday of week number 20 (where the default start of the week is Monday), forever
|
48 |
Recur: Every 20th Monday of the year, forever
|
47 |
Recur: Every 3rd year on the 1st, 100th and 200th day for 10 occurrences
|
46 |
Recur: Every other year on January, February, and March for 10 occurrences
|
45 |
Recur: Yearly in June and July for 10 occurrences
|
44 |
Recur: Every Tuesday, every other month
|
43 |
Recur: Every 18 months on the 10th thru 15th of the month for 10 occurrences
|
42 |
Recur: Monthly on the first and last day of the month for 10 occurrences
|
41 |
Recur: Monthly on the 2nd and 15th of the month for 10 occurrences
|
40 |
Recur: Monthly on the third to the last day of the month, forever
|
39 |
Recur: Monthly on the second to last Monday of the month for 6 months
|
38 |
Recur: Every other month on the 1st and last Sunday of the month for 10 occurrences
|
37 |
Recur: Monthly on the 1st Friday until December 24, 1997
|
36 |
Recur: Monthly on the 1st Friday for ten occurrences
|
35 |
Recur: Every other week on Tuesday and Thursday, for 8 occurrences
|
34 |
Recur: Every other week on Monday, Wednesday and Friday until December 24, 1997, but starting on Tuesday, September 2, 1997
|
33 |
Recur: Weekly on Tuesday and Thursday for 5 weeks
|
32 |
Recur: Weekly on Tuesday and Thursday for 5 weeks
|
31 |
Recur: Every other day - forever
|
30 |
Recur: Daily until December 24, 1997
|
29 |
Recur: Daily for 10 occurrences
|
28 |
How can I add a property of UTC offset type
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar LOCAL oComponent oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) oComponent := oICalendar:Content():Components():Add("VCALENDAR") oComponent:Properties():Add("UTCOffset","+0100") DevOut( oICalendar:Save() ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
27 |
How can I add a property of URI type
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar LOCAL oComponent oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) oComponent := oICalendar:Content():Components():Add("VCALENDAR") oComponent:Properties():Add("URI","http://www.exontrol.com") DevOut( oICalendar:Save() ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
26 |
How can I add a property of time type
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar LOCAL oComponent LOCAL oProperty oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) oComponent := oICalendar:Content():Components():Add("VCALENDAR") oComponent:Properties():Add("Time1","12/30/1899 12:00:00") oComponent:Properties():Add("Time2",oICalendar:toICalendar(0.5,12/*exPropertyTypeTime*/)) oProperty := oComponent:Properties():Add("Time3") oProperty:Value := 0.5 oProperty:Type := 12/*exPropertyTypeTime*/ DevOut( oICalendar:Save() ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
25 |
How can I add a property of text/string type
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar LOCAL oComponent LOCAL oProperty oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) oComponent := oICalendar:Content():Components():Add("VCALENDAR") oComponent:Properties():Add("Text1","A1") oComponent:Properties():Add("Text2",oICalendar:toICalendar("A1",11/*exPropertyTypeText*/)) oProperty := oComponent:Properties():Add("Text3") oProperty:Value := "A1" oProperty:Type := 11/*exPropertyTypeText*/ DevOut( oICalendar:Save() ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
24 |
How can I find properties of recurence type
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar LOCAL oComponent LOCAL p LOCAL i oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) oComponent := oICalendar:Content():Components():Add("VCALENDAR") oComponent:Properties():Add("Recur","FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=SA,SU") p := oICalendar:Root:Properties:Item("Recur") i := oICalendar:toICalendar(p:Value(),p:GuessType()) DevOut( "icalendar:" ) DevOut( Transform(i,"") ) DevOut( "all:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),""),"") ) DevOut( "FREQ:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"FREQ"),"") ) DevOut( "UNTIL:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"UNTIL"),"") ) DevOut( "COUNT:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"COUNT"),"") ) DevOut( "INTERVAL:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"INTERVAL"),"") ) DevOut( "BYSECOND:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"BYSECOND"),"") ) DevOut( "BYMINUTE:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"BYMINUTE"),"") ) DevOut( "BYHOUR:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"BYHOUR"),"") ) DevOut( "BYDAY:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"BYDAY"),"") ) DevOut( "BYMONTHDAY:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"BYMONTHDAY"),"") ) DevOut( "BYYEARDAY:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"BYYEARDAY"),"") ) DevOut( "BYWEEKNO:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"BYWEEKNO"),"") ) DevOut( "BYMONTH:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"BYMONTH"),"") ) DevOut( "BYSETPOS:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"BYSETPOS"),"") ) DevOut( "WKST:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"WKST"),"") ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
23 |
How can I add a property of recurrence type
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar LOCAL oComponent oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) oComponent := oICalendar:Content():Components():Add("VCALENDAR") oComponent:Properties():Add("Recur","FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU") DevOut( oICalendar:Save() ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
22 |
How can I find the duration in weeks, days, hours, minutes, seconds from a property of duration type
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar LOCAL oComponent LOCAL p LOCAL i oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) oComponent := oICalendar:Content():Components():Add("VCALENDAR") oComponent:Properties():Add("Period",oICalendar:valuesToICalendar("Start=#1/1/2001#;Duration=1",9/*exPropertyTypePeriod*/)) p := oICalendar:Root:Properties:Item("Period") i := oICalendar:toICalendar(p:Value(),p:GuessType()) DevOut( "icalendar:" ) DevOut( Transform(i,"") ) DevOut( "all:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),""),"") ) DevOut( "start:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"Start"),"") ) DevOut( "end:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"End"),"") ) DevOut( "duration:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"Duration"),"") ) DevOut( "weeks:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"W"),"") ) DevOut( "days:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"D"),"") ) DevOut( "hour:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"H"),"") ) DevOut( "min:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"M"),"") ) DevOut( "sec:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"S"),"") ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
21 |
How can I add a property of period type
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar LOCAL oComponent oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) oComponent := oICalendar:Content():Components():Add("VCALENDAR") oComponent:Properties():Add("Period1",oICalendar:valuesToICalendar("Start=#1/1/2001#;Duration=1",9/*exPropertyTypePeriod*/)) oComponent:Properties():Add("Period2",oICalendar:valuesToICalendar("Start=#1/1/2001#;End=#1/2/2001#",9/*exPropertyTypePeriod*/)) oComponent:Properties():Add("Period3",oICalendar:valuesToICalendar("Duration=1;End=#1/2/2001#",9/*exPropertyTypePeriod*/)) DevOut( oICalendar:Save() ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
20 |
How can I add a property of integer type
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar LOCAL oComponent LOCAL oProperty oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) oComponent := oICalendar:Content():Components():Add("VCALENDAR") oComponent:Properties():Add("Integer1",1) oComponent:Properties():Add("Integer2",oICalendar:toICalendar(1,8/*exPropertyTypeInteger*/)) oProperty := oComponent:Properties():Add("Integer3") oProperty:Value := 1 oProperty:Type := 8/*exPropertyTypeInteger*/ DevOut( oICalendar:Save() ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
19 |
How can I add a property of float type
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar LOCAL oComponent LOCAL oProperty oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) oComponent := oICalendar:Content():Components():Add("VCALENDAR") oComponent:Properties():Add("Float1",1.5) oComponent:Properties():Add("Float2",oICalendar:toICalendar(1.5,7/*exPropertyTypeFloat*/)) oProperty := oComponent:Properties():Add("Float3") oProperty:Value := 1.5 oProperty:Type := 7/*exPropertyTypeFloat*/ DevOut( oICalendar:Save() ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
18 |
How do I get the type of the property
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar LOCAL oComponent LOCAL oProperty,oProperty1,oProperty2 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) oComponent := oICalendar:Content():Components():Add("VCALENDAR") oComponent:Properties():Add("Duration1",oICalendar:toICalendar(2.5,6/*exPropertyTypeDuration*/)) oProperty := oComponent:Properties():Add("Duration2") oProperty:Value := 2.5 oProperty:Type := 6/*exPropertyTypeDuration*/ oProperty1 := oICalendar:Root():Properties:Item("Duration1") DevOut( oProperty1:Name() ) DevOut( "Guess" ) DevOut( Transform(oProperty1:GuessType(),"") ) DevOut( oProperty1:Name() ) DevOut( "Type" ) DevOut( Transform(oProperty1:Type(),"") ) oProperty2 := oICalendar:Root():Properties:Item("Duration2") DevOut( oProperty2:Name() ) DevOut( "Guess" ) DevOut( Transform(oProperty2:GuessType(),"") ) DevOut( oProperty2:Name() ) DevOut( "Type" ) DevOut( Transform(oProperty2:Type(),"") ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
17 |
How can I get values of the duration iCalendar format
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) DevOut( "all:" ) DevOut( Transform(oICalendar:valuesFromICalendar("P1D",6/*exPropertyTypeDuration*/,""),"") ) DevOut( "duration:" ) DevOut( Transform(oICalendar:valuesFromICalendar("P1D",6/*exPropertyTypeDuration*/,"Duration"),"") ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
16 |
How can I find the duration in weeks, days, hours, minutes, seconds from a property of duration type
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar LOCAL oComponent LOCAL p LOCAL i oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) oComponent := oICalendar:Content():Components():Add("VCALENDAR") oComponent:Properties():Add("Duration",oICalendar:toICalendar(3.325,6/*exPropertyTypeDuration*/)) p := oICalendar:Root:Properties:Item("Duration") i := oICalendar:toICalendar(p:Value(),p:GuessType()) DevOut( "icalendar:" ) DevOut( Transform(i,"") ) DevOut( "all:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),""),"") ) DevOut( "duration:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"Duration"),"") ) DevOut( "weeks:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"W"),"") ) DevOut( "days:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"D"),"") ) DevOut( "hour:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"H"),"") ) DevOut( "min:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"M"),"") ) DevOut( "sec:" ) DevOut( Transform(oICalendar:valuesFromICalendar(Transform(i,""),p:GuessType(),"S"),"") ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
15 |
How can I add a property of duration type
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar LOCAL oComponent LOCAL oProperty oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) oComponent := oICalendar:Content():Components():Add("VCALENDAR") oComponent:Properties():Add("Duration1",oICalendar:toICalendar(2.5,6/*exPropertyTypeDuration*/)) oProperty := oComponent:Properties():Add("Duration2") oProperty:Value := 2.5 oProperty:Type := 6/*exPropertyTypeDuration*/ oComponent:Properties():Add("Duration3",oICalendar:valuesToICalendar("D=2;H=12",6/*exPropertyTypeDuration*/)) DevOut( oICalendar:Save() ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
14 |
How can I add a property of date-time type
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar LOCAL oComponent LOCAL oProperty oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) oComponent := oICalendar:Content():Components():Add("VCALENDAR") oComponent:Properties():Add("DateTime1","01/01/2001 12:00:00") oComponent:Properties():Add("DateTime2",oICalendar:toICalendar("01/01/2001",5/*exPropertyTypeDateTime*/)) oProperty := oComponent:Properties():Add("DateTime3") oProperty:Value := "01/01/2001" oProperty:Type := 5/*exPropertyTypeDateTime*/ DevOut( oICalendar:Save() ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
13 |
How can I add a property of date type
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar LOCAL oComponent LOCAL oProperty oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) oComponent := oICalendar:Content():Components():Add("VCALENDAR") oComponent:Properties():Add("Date1","01/01/2001") oComponent:Properties():Add("Date2",oICalendar:toICalendar("01/01/2001",4/*exPropertyTypeDate*/)) oProperty := oComponent:Properties():Add("Date3") oProperty:Value := "01/01/2001" oProperty:Type := 4/*exPropertyTypeDate*/ DevOut( oICalendar:Save() ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
12 |
How can I add a property of Calendar User Address type
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar LOCAL oComponent LOCAL oProperty oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) oComponent := oICalendar:Content():Components():Add("VCALENDAR") oComponent:Properties():Add("caladdress1","mailto:support@exontrol.com") oComponent:Properties():Add("caladdress2",oICalendar:toICalendar("mailto:support@exontrol.com",3/*exPropertyTypeCalAddress*/)) oProperty := oComponent:Properties():Add("caladdress3") oProperty:Value := "mailto:support@exontrol.com" oProperty:Type := 3/*exPropertyTypeCalAddress*/ DevOut( oICalendar:Save() ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
11 |
How can I add a property of boolean type
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar LOCAL oComponent LOCAL oProperty oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) oComponent := oICalendar:Content():Components():Add("VCALENDAR") oComponent:Properties():Add("Boolean1",.T.) oComponent:Properties():Add("Boolean2",oICalendar:toICalendar("TRUE",2/*exPropertyTypeBoolean*/)) oProperty := oComponent:Properties():Add("Boolean3") oProperty:Value := 0 oProperty:Type := 2/*exPropertyTypeBoolean*/ DevOut( oICalendar:Save() ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
10 |
How can I add a property of binary type
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar LOCAL oComponent LOCAL oProperty oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) oComponent := oICalendar:Content():Components():Add("VCALENDAR") oComponent:Properties():Add("Binary1",oICalendar:toICalendar("This is a bit of text converted to binary",1/*exPropertyTypeBinary*/)) oProperty := oComponent:Properties():Add("Binary2") oProperty:Value := "This is a bit of text converted to binary" oProperty:Type := 1/*exPropertyTypeBinary*/ DevOut( oICalendar:Save() ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
9 |
How can I access the root element of the iCalendar format
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) oICalendar:Load("BEGIN:VCALENDAR\r\nVERSION:2.0\r\nEND:VCALENDAR") DevOut( oICalendar:Root:Name() ) DevOut( Transform(oICalendar:Root:Properties:Item("Version"):Value(),"") ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
8 |
How can I get notified once the control loads a new component, property, when using Load or LoadFile methods
PROCEDURE OnAddComponent(oICalendar,NewComponent) DevOut( Transform(NewComponent,"") ) RETURN PROCEDURE OnAddProperty(oICalendar,NewPropery) DevOut( Transform(NewPropery,"") ) RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) oICalendar:AddComponent := {|NewComponent| OnAddComponent(oICalendar,NewComponent)} /*Occurs when a new component is added.*/ oICalendar:AddProperty := {|NewPropery| OnAddProperty(oICalendar,NewPropery)} /*Occurs when a new property is added.*/ oICalendar:FireEvents := .T. oICalendar:Load("BEGIN:VCALENDAR\r\nVERSION:2.0\r\nEND:VCALENDAR") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
7 |
How can I add a property with parameters
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar LOCAL oComponent LOCAL oProperties oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) oComponent := oICalendar:Content():Components():Add("VCALENDAR") oProperties := oComponent:Components():Add("VEVENT"):Properties() oProperties:Add("SUMMARY","Company Holiday Party"):Parameters():Add("LANGUAGE","en-US") oProperties:Add("DATE","01/01/2001") DevOut( oICalendar:Save() ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
6 |
How can I load iCalendar from a string
|
5 |
How can I add VEVENT objects
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar LOCAL oComponent LOCAL oProperties,oProperties1,oProperties2 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) oComponent := oICalendar:Content():Components():Add("VCALENDAR") oProperties := oComponent:Properties() oProperties:Add("Version","2.0") oProperties:Add("PRODID","-//hacksw/handcal//NONSGML v1.0//EN") oProperties1 := oComponent:Components():Add("VEVENT"):Properties() oProperties1:Add("DTSTART","01/01/2001") oProperties1:Add("DTEND","01/02/2001") oProperties1:Add("SUMMARY","First Party") oProperties2 := oComponent:Components():Add("VEVENT"):Properties() oProperties2:Add("DTSTART","01/04/2001") oProperties2:Add("DTEND","01/05/2001") oProperties2:Add("SUMMARY","Second Party") DevOut( oICalendar:Save() ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
4 |
How can I save the control's content to iCalendar format, as a file
|
3 |
How can I load the iCalendar format from a file
|
2 |
How do I export the control's content to iCalendar format
|
1 |
How can I generate a VCALENDAR object
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oICalendar LOCAL oProperties oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oICalendar := XbpActiveXControl():new( oForm:drawingArea ) oICalendar:CLSID := "Exontrol.ICalendar.1" /*{D6C87100-38E2-4ABB-8AC2-4C0097AEE2D6}*/ oICalendar:create(,, {10,60},{610,370} ) oProperties := oICalendar:Content():Components():Add("VCALENDAR"):Properties() oProperties:Add("Version","2.0") oProperties:Add("PRODID","-//hacksw/handcal//NONSGML v1.0//EN") DevOut( oICalendar:Save() ) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |