69
|
How do I encode data as ICalendar format

public void init()
{
COM com_Component,com_Component1,com_Component2,com_Components,com_Parameters,com_Properties,com_Property,com_exicalendar1;
anytype exicalendar1,var_Component,var_Component1,var_Component2,var_Components,var_Parameters,var_Properties,var_Property;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
var_Component = com_exicalendar1.Content(); com_Component = var_Component;
var_Components = COM::createFromObject(com_Component.Components()); com_Components = var_Components;
var_Component1 = COM::createFromObject(com_Components).Add("VCALENDAR"); com_Component1 = var_Component1;
var_Properties = COM::createFromObject(com_Component1.Properties()); com_Properties = var_Properties;
var_Property = COM::createFromObject(com_Properties).Add("VERSION","2.1"); com_Property = var_Property;
var_Parameters = COM::createFromObject(com_Property).Parameters(); com_Parameters = var_Parameters;
com_Parameters.Add("UNICODE",COMVariant::createFromStr(com_exicalendar1.toICalendar(COMVariant::createFromBoolean(true),2/*exPropertyTypeBoolean*/)));
var_Properties = COM::createFromObject(com_Component1.Properties()); com_Properties = var_Properties;
com_Properties.Add("TEXT","This is just a bit of text to be encoded.");
var_Properties = COM::createFromObject(com_Component1.Properties()); com_Properties = var_Properties;
com_Properties.Add("BINARY",COMVariant::createFromStr(com_exicalendar1.toICalendar("This is just a bit of text to be encoded.",1/*exPropertyTypeBinary*/)));
var_Components = COM::createFromObject(com_Component1.Components()); com_Components = var_Components;
var_Component2 = COM::createFromObject(com_Components).Add("VEVENT"); com_Component2 = var_Component2;
var_Properties = COM::createFromObject(com_Component2.Properties()); com_Properties = var_Properties;
com_Properties.Add("DTSTART",COMVariant::createFromDate(str2Date("1/1/2001",213)));
var_Properties = COM::createFromObject(com_Component2.Properties()); com_Properties = var_Properties;
com_Properties.Add("DTEND",COMVariant::createFromUtcDateTime(str2Datetime("1/2/2001 10:00:00",213)));
print( com_exicalendar1.Save() );
}
|
68
|
How do I get the occurrences between giving start/end margins

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( "AsArray: " );
print( com_exicalendar1.RecurRange("DTSTART=19970310;FREQ=YEARLY;INTERVAL=2;COUNT=10;BYMONTH=1,2,3",str2Date("1/1/2001",213),str2Date("1/1/2002",213)) );
print( "AsString: " );
print( com_exicalendar1.RecurRangeAsString("DTSTART=19970310;FREQ=YEARLY;INTERVAL=2;COUNT=10;BYMONTH=1,2,3",str2Date("1/1/2001",213),str2Date("1/1/2002",213)) );
}
|
67
|
How do I get the value of specified part in the recurrence expression

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( "FREQ: " );
print( com_exicalendar1.RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",0/*exRecurFREQ*/) );
print( "DTSTART: " );
print( com_exicalendar1.RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",1/*exRecurDTSTART*/) );
print( "UNTIL: " );
print( com_exicalendar1.RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",2/*exRecurUNTIL*/) );
print( "COUNT: " );
print( com_exicalendar1.RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",3/*exRecurCOUNT*/) );
print( "INTERVAL: " );
print( com_exicalendar1.RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",4/*exRecurINTERVAL*/) );
print( "WKST: " );
print( com_exicalendar1.RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",14/*exRecurWKST*/) );
print( "BYDAY: " );
print( com_exicalendar1.RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",8/*exRecurBYDAY*/) );
print( "BYMONTHDAY: " );
print( com_exicalendar1.RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",9/*exRecurBYMONTHDAY*/) );
print( "BYYEARDAY: " );
print( com_exicalendar1.RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",10/*exRecurBYYEARDAY*/) );
print( "BYWEEKNO: " );
print( com_exicalendar1.RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",11/*exRecurBYWEEKNO*/) );
print( "BYMONTH: " );
print( com_exicalendar1.RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",12/*exRecurBYMONTH*/) );
print( "BYSETPOS: " );
print( com_exicalendar1.RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",13/*exRecurBYSETPOS*/) );
print( "BYHOUR: " );
print( com_exicalendar1.RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",7/*exRecurBYHOUR*/) );
print( "BYMINUTE: " );
print( com_exicalendar1.RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",6/*exRecurBYMINUTE*/) );
print( "BYSECOND: " );
print( com_exicalendar1.RecurPartValue("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",5/*exRecurBYSECOND*/) );
}
|
66
|
How do I check if the recurrence expression is syntactically correct (method 2)

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( "1.A) SyntaxError: " );
print( com_exicalendar1.RecurPartValue("DTSTART=20151205;FREQ=DAILY;BYDAY=MO",-1/*exRecurSyntaxError*/) );
print( "1.B) SyntaxErrorInfo: " );
print( com_exicalendar1.RecurPartValue("DTSTART=20151205;FREQ=DAILY;BYDAY=MO",-2/*exRecurSyntaxErrorInfo*/) );
print( "2.A) SyntaxError: " );
print( com_exicalendar1.RecurPartValue("FREQ=DAILY;BYDAY=MO",-1/*exRecurSyntaxError*/) );
print( "2.B) SyntaxErrorInfo: " );
print( com_exicalendar1.RecurPartValue("FREQ=DAILY;BYDAY=MO",-2/*exRecurSyntaxErrorInfo*/) );
}
|
65
|
How do I check if the recurrence expression is syntactically correct (method 1)

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( "1. If negative, the expression is incorrect" );
print( com_exicalendar1.RecurCheck("DTSTART=20151205;FREQ=DAILY;BYDAY=MO",str2Date("12/5/2015",213)) );
print( "2. If negative, the expression is incorrect" );
print( com_exicalendar1.RecurCheck("junk",str2Date("1/1/2001",213)) );
}
|
64
|
How do I check if a specified date match the giving recurrence

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( str2Date("12/5/2015",213) );
print( com_exicalendar1.RecurCheck("DTSTART=20151205;FREQ=DAILY;BYDAY=MO",str2Date("12/5/2015",213)) );
print( str2Date("12/7/2015",213) );
print( com_exicalendar1.RecurCheck("DTSTART=20151205;FREQ=DAILY;BYDAY=MO",str2Date("12/7/2015",213)) );
}
|
63
|
Recur: The 2nd to last weekday of the month

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970929;FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-2",COMVariant::createFromInt(12)) );
}
|
62
|
Recur: The 3rd instance into the month of one of Tuesday, Wednesday or Thursday, for the next 3 months

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970904;FREQ=MONTHLY;COUNT=3;BYDAY=TU,WE,TH;BYSETPOS=3",COMVariant::createFromInt(12)) );
}
|
61
|
Recur: The last work day of the month

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970805;FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-1",COMVariant::createFromInt(12)) );
}
|
60
|
Recur: An example where the days generated makes a difference because of WKST (Sample 2)

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=SU",COMVariant::createFromInt(12)) );
}
|
59
|
Recur: An example where the days generated makes a difference because of WKST (Sample 1)

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970805T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU;WKST=MO",COMVariant::createFromInt(12)) );
}
|
58
|
Recur: Every 20 minutes from 9:00 AM to 4:40 PM every day

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970902T090000;FREQ=DAILY;BYHOUR=9,10,11,12,13,14,15,16;BYMINUTE=0,20,40",COMVariant::createFromInt(12)) );
}
|
57
|
Recur: Every hour and a half for 4 occurrences

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970902T090000;FREQ=MINUTELY;INTERVAL=90;COUNT=4",COMVariant::createFromInt(12)) );
}
|
56
|
Recur: Every 15 minutes for 6 occurrences

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970902T090000;FREQ=MINUTELY;INTERVAL=15;COUNT=6",COMVariant::createFromInt(12)) );
}
|
55
|
Recur: Every 3 hours from 9:00 AM to 5:00 PM on a specific day

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970902T090000;FREQ=HOURLY;INTERVAL=3;UNTIL=19970902T170000Z",COMVariant::createFromInt(12)) );
}
|
54
|
Recur: Every four years, the first Tuesday after a Monday in November, forever (U.S. Presidential Election day)

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19961105T090000;FREQ=YEARLY;INTERVAL=4;BYMONTH=11;BYDAY=TU;BYMONTHDAY=2,3,4,5,6,7,8",COMVariant::createFromInt(12)) );
}
|
53
|
Recur: The first Saturday that follows the first Sunday of the month, forever

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970913T090000;FREQ=MONTHLY;BYDAY=SA;BYMONTHDAY=7,8,9,10,11,12,13",COMVariant::createFromInt(12)) );
}
|
52
|
Recur: Every Friday the 13th, forever

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970902T090000;FREQ=MONTHLY;BYDAY=FR;BYMONTHDAY=13",COMVariant::createFromInt(12)) );
}
|
51
|
Recur: Every Thursday, but only during June, July, and August, forever

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970605T090000;FREQ=YEARLY;BYDAY=TH;BYMONTH=6,7,8",COMVariant::createFromInt(12)) );
}
|
50
|
Recur: Every Thursday in March, forever

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970313T090000;FREQ=YEARLY;BYMONTH=3;BYDAY=TH",COMVariant::createFromInt(12)) );
}
|
49
|
Recur: Monday of week number 20 (where the default start of the week is Monday), forever

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970512T090000;FREQ=YEARLY;BYWEEKNO=20;BYDAY=MO",COMVariant::createFromInt(12)) );
}
|
48
|
Recur: Every 20th Monday of the year, forever

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970101T090000;FREQ=YEARLY;BYDAY=20MO",COMVariant::createFromInt(12)) );
}
|
47
|
Recur: Every 3rd year on the 1st, 100th and 200th day for 10 occurrences

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970101T090000;FREQ=YEARLY;INTERVAL=3;COUNT=10;BYYEARDAY=1,100,200",COMVariant::createFromInt(12)) );
}
|
46
|
Recur: Every other year on January, February, and March for 10 occurrences

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970310T090000;FREQ=YEARLY;INTERVAL=2;COUNT=10;BYMONTH=1,2,3",COMVariant::createFromInt(12)) );
}
|
45
|
Recur: Yearly in June and July for 10 occurrences

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970610T090000;FREQ=YEARLY;COUNT=10;BYMONTH=6,7",COMVariant::createFromInt(12)) );
}
|
44
|
Recur: Every Tuesday, every other month

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970902T090000;FREQ=MONTHLY;INTERVAL=2;BYDAY=TU",COMVariant::createFromInt(12)) );
}
|
43
|
Recur: Every 18 months on the 10th thru 15th of the month for 10 occurrences

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970910T090000;FREQ=MONTHLY;INTERVAL=18;COUNT=10;BYMONTHDAY=10,11,12,13,14,15",COMVariant::createFromInt(12)) );
}
|
42
|
Recur: Monthly on the first and last day of the month for 10 occurrences

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970930T090000;FREQ=MONTHLY;COUNT=10;BYMONTHDAY=1,-1",COMVariant::createFromInt(12)) );
}
|
41
|
Recur: Monthly on the 2nd and 15th of the month for 10 occurrences

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970902T090000;FREQ=MONTHLY;COUNT=10;BYMONTHDAY=2,15",COMVariant::createFromInt(12)) );
}
|
40
|
Recur: Monthly on the third to the last day of the month, forever

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970928T090000;FREQ=MONTHLY;BYMONTHDAY=-3",COMVariant::createFromInt(12)) );
}
|
39
|
Recur: Monthly on the second to last Monday of the month for 6 months

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970922T090000;FREQ=MONTHLY;COUNT=6;BYDAY=-2MO",COMVariant::createFromInt(12)) );
}
|
38
|
Recur: Every other month on the 1st and last Sunday of the month for 10 occurrences

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970907T090000;FREQ=MONTHLY;INTERVAL=2;COUNT=10;BYDAY=1SU,-1SU",COMVariant::createFromInt(12)) );
}
|
37
|
Recur: Monthly on the 1st Friday until December 24, 1997

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970905T090000;FREQ=MONTHLY;UNTIL=19971224T000000Z;BYDAY=1FR",COMVariant::createFromInt(12)) );
}
|
36
|
Recur: Monthly on the 1st Friday for ten occurrences

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970905T090000;FREQ=MONTHLY;COUNT=10;BYDAY=1FR",COMVariant::createFromInt(12)) );
}
|
35
|
Recur: Every other week on Tuesday and Thursday, for 8 occurrences

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970902T090000;FREQ=WEEKLY;INTERVAL=2;COUNT=8;WKST=SU;BYDAY=TU,TH",COMVariant::createFromInt(12)) );
}
|
34
|
Recur: Every other week on Monday, Wednesday and Friday until December 24, 1997, but starting on Tuesday, September 2, 1997

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970902T090000;FREQ=WEEKLY;INTERVAL=2;UNTIL=19971224T000000Z;WKST=SU;BYDAY=MO,WE,FR",COMVariant::createFromInt(12)) );
}
|
33
|
Recur: Weekly on Tuesday and Thursday for 5 weeks

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970902T090000;FREQ=WEEKLY;UNTIL=19971007T000000Z;WKST=SU;BYDAY=TU,TH",COMVariant::createFromInt(12)) );
}
|
32
|
Recur: Weekly on Tuesday and Thursday for 5 weeks

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970902T090000;FREQ=WEEKLY;COUNT=10;WKST=SU;BYDAY=TU,TH",COMVariant::createFromInt(12)) );
}
|
31
|
Recur: Every other day - forever

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970902T090000;FREQ=DAILY;INTERVAL=2",COMVariant::createFromInt(12)) );
}
|
30
|
Recur: Daily until December 24, 1997

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970902T090000;FREQ=DAILY;UNTIL=19971224T000000Z",COMVariant::createFromInt(12)) );
}
|
29
|
Recur: Daily for 10 occurrences

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( com_exicalendar1.RecurAllAsString("DTSTART=19970902T090000;FREQ=DAILY;COUNT=10",COMVariant::createFromInt(12)) );
}
|
28
|
How can I add a property of UTC offset type

public void init()
{
COM com_Component,com_Properties,com_exicalendar1;
anytype exicalendar1,var_Component,var_Properties;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
var_Component = COM::createFromObject(com_exicalendar1.Content().Components()).Add("VCALENDAR"); com_Component = var_Component;
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("UTCOffset","+0100");
print( com_exicalendar1.Save() );
}
|
27
|
How can I add a property of URI type

public void init()
{
COM com_Component,com_Properties,com_exicalendar1;
anytype exicalendar1,var_Component,var_Properties;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
var_Component = COM::createFromObject(com_exicalendar1.Content().Components()).Add("VCALENDAR"); com_Component = var_Component;
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("URI","http://www.exontrol.com");
print( com_exicalendar1.Save() );
}
|
26
|
How can I add a property of time type

public void init()
{
COM com_Component,com_Properties,com_Property,com_exicalendar1;
anytype exicalendar1,var_Component,var_Properties,var_Property;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
var_Component = COM::createFromObject(com_exicalendar1.Content().Components()).Add("VCALENDAR"); com_Component = var_Component;
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("Time1",COMVariant::createFromUtcDateTime(str2Datetime("12/30/1899 12:00:00",213)));
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("Time2",COMVariant::createFromStr(com_exicalendar1.toICalendar(COMVariant::createFromReal(0.5),12/*exPropertyTypeTime*/)));
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
var_Property = COM::createFromObject(com_Properties).Add("Time3"); com_Property = var_Property;
com_Property.Value(COMVariant::createFromReal(0.5));
com_Property.Type(12/*exPropertyTypeTime*/);
print( com_exicalendar1.Save() );
}
|
25
|
How can I add a property of text/string type

public void init()
{
COM com_Component,com_Properties,com_Property,com_exicalendar1;
anytype exicalendar1,var_Component,var_Properties,var_Property;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
var_Component = COM::createFromObject(com_exicalendar1.Content().Components()).Add("VCALENDAR"); com_Component = var_Component;
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("Text1","A1");
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("Text2",COMVariant::createFromStr(com_exicalendar1.toICalendar("A1",11/*exPropertyTypeText*/)));
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
var_Property = COM::createFromObject(com_Properties).Add("Text3"); com_Property = var_Property;
com_Property.Value("A1");
com_Property.Type(11/*exPropertyTypeText*/);
print( com_exicalendar1.Save() );
}
|
24
|
How can I find properties of recurence type

public void init()
{
COM com_Component,com_Properties,com_exicalendar1,com_p;
anytype exicalendar1,p,var_Component,var_Properties;
str i;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
var_Component = COM::createFromObject(com_exicalendar1.Content().Components()).Add("VCALENDAR"); com_Component = var_Component;
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("Recur","FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=SA,SU");
p = COM::createFromObject(com_exicalendar1.Root().Properties()).Item("Recur"); com_p = p;
i = com_exicalendar1.toICalendar(p.Value(),p.GuessType());
print( "icalendar:" );
print( i );
print( "all:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"") );
print( "FREQ:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"FREQ") );
print( "UNTIL:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"UNTIL") );
print( "COUNT:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"COUNT") );
print( "INTERVAL:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"INTERVAL") );
print( "BYSECOND:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"BYSECOND") );
print( "BYMINUTE:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"BYMINUTE") );
print( "BYHOUR:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"BYHOUR") );
print( "BYDAY:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"BYDAY") );
print( "BYMONTHDAY:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"BYMONTHDAY") );
print( "BYYEARDAY:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"BYYEARDAY") );
print( "BYWEEKNO:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"BYWEEKNO") );
print( "BYMONTH:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"BYMONTH") );
print( "BYSETPOS:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"BYSETPOS") );
print( "WKST:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"WKST") );
}
|
23
|
How can I add a property of recurrence type

public void init()
{
COM com_Component,com_Properties,com_exicalendar1;
anytype exicalendar1,var_Component,var_Properties;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
var_Component = COM::createFromObject(com_exicalendar1.Content().Components()).Add("VCALENDAR"); com_Component = var_Component;
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("Recur","FREQ=WEEKLY;INTERVAL=2;COUNT=4;BYDAY=TU,SU");
print( com_exicalendar1.Save() );
}
|
22
|
How can I find the duration in weeks, days, hours, minutes, seconds from a property of duration type

public void init()
{
COM com_Component,com_Properties,com_exicalendar1,com_p;
anytype exicalendar1,p,var_Component,var_Properties;
str i;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
var_Component = COM::createFromObject(com_exicalendar1.Content().Components()).Add("VCALENDAR"); com_Component = var_Component;
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("Period",COMVariant::createFromStr(com_exicalendar1.valuesToICalendar("Start=#1/1/2001#;Duration=1",9/*exPropertyTypePeriod*/)));
p = COM::createFromObject(com_exicalendar1.Root().Properties()).Item("Period"); com_p = p;
i = com_exicalendar1.toICalendar(p.Value(),p.GuessType());
print( "icalendar:" );
print( i );
print( "all:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"") );
print( "start:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"Start") );
print( "end:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"End") );
print( "duration:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"Duration") );
print( "weeks:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"W") );
print( "days:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"D") );
print( "hour:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"H") );
print( "min:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"M") );
print( "sec:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"S") );
}
|
21
|
How can I add a property of period type

public void init()
{
COM com_Component,com_Properties,com_exicalendar1;
anytype exicalendar1,var_Component,var_Properties;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
var_Component = COM::createFromObject(com_exicalendar1.Content().Components()).Add("VCALENDAR"); com_Component = var_Component;
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("Period1",COMVariant::createFromStr(com_exicalendar1.valuesToICalendar("Start=#1/1/2001#;Duration=1",9/*exPropertyTypePeriod*/)));
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("Period2",COMVariant::createFromStr(com_exicalendar1.valuesToICalendar("Start=#1/1/2001#;End=#1/2/2001#",9/*exPropertyTypePeriod*/)));
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("Period3",COMVariant::createFromStr(com_exicalendar1.valuesToICalendar("Duration=1;End=#1/2/2001#",9/*exPropertyTypePeriod*/)));
print( com_exicalendar1.Save() );
}
|
20
|
How can I add a property of integer type

public void init()
{
COM com_Component,com_Properties,com_Property,com_exicalendar1;
anytype exicalendar1,var_Component,var_Properties,var_Property;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
var_Component = COM::createFromObject(com_exicalendar1.Content().Components()).Add("VCALENDAR"); com_Component = var_Component;
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("Integer1",COMVariant::createFromInt(1));
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("Integer2",COMVariant::createFromStr(com_exicalendar1.toICalendar(COMVariant::createFromInt(1),8/*exPropertyTypeInteger*/)));
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
var_Property = COM::createFromObject(com_Properties).Add("Integer3"); com_Property = var_Property;
com_Property.Value(COMVariant::createFromInt(1));
com_Property.Type(8/*exPropertyTypeInteger*/);
print( com_exicalendar1.Save() );
}
|
19
|
How can I add a property of float type

public void init()
{
COM com_Component,com_Properties,com_Property,com_exicalendar1;
anytype exicalendar1,var_Component,var_Properties,var_Property;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
var_Component = COM::createFromObject(com_exicalendar1.Content().Components()).Add("VCALENDAR"); com_Component = var_Component;
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("Float1",COMVariant::createFromReal(1.5));
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("Float2",COMVariant::createFromStr(com_exicalendar1.toICalendar(COMVariant::createFromReal(1.5),7/*exPropertyTypeFloat*/)));
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
var_Property = COM::createFromObject(com_Properties).Add("Float3"); com_Property = var_Property;
com_Property.Value(COMVariant::createFromReal(1.5));
com_Property.Type(7/*exPropertyTypeFloat*/);
print( com_exicalendar1.Save() );
}
|
18
|
How do I get the type of the property

public void init()
{
COM com_Component,com_Properties,com_Property,com_Property1,com_Property2,com_exicalendar1;
anytype exicalendar1,var_Component,var_Properties,var_Property,var_Property1,var_Property2;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
var_Component = COM::createFromObject(com_exicalendar1.Content().Components()).Add("VCALENDAR"); com_Component = var_Component;
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("Duration1",COMVariant::createFromStr(com_exicalendar1.toICalendar(COMVariant::createFromReal(2.5),6/*exPropertyTypeDuration*/)));
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
var_Property = COM::createFromObject(com_Properties).Add("Duration2"); com_Property = var_Property;
com_Property.Value(COMVariant::createFromReal(2.5));
com_Property.Type(6/*exPropertyTypeDuration*/);
var_Property1 = COM::createFromObject(com_exicalendar1.Root().Properties()).Item("Duration1"); com_Property1 = var_Property1;
print( com_Property1.Name() );
print( "Guess" );
print( com_Property1.GuessType() );
print( com_Property1.Name() );
print( "Type" );
print( com_Property1.Type() );
var_Property2 = COM::createFromObject(com_exicalendar1.Root().Properties()).Item("Duration2"); com_Property2 = var_Property2;
print( com_Property2.Name() );
print( "Guess" );
print( com_Property2.GuessType() );
print( com_Property2.Name() );
print( "Type" );
print( com_Property2.Type() );
}
|
17
|
How can I get values of the duration iCalendar format

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
print( "all:" );
print( com_exicalendar1.valuesFromICalendar("P1D",6/*exPropertyTypeDuration*/,"") );
print( "duration:" );
print( com_exicalendar1.valuesFromICalendar("P1D",6/*exPropertyTypeDuration*/,"Duration") );
}
|
16
|
How can I find the duration in weeks, days, hours, minutes, seconds from a property of duration type

public void init()
{
COM com_Component,com_Properties,com_exicalendar1,com_p;
anytype exicalendar1,p,var_Component,var_Properties;
str i;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
var_Component = COM::createFromObject(com_exicalendar1.Content().Components()).Add("VCALENDAR"); com_Component = var_Component;
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("Duration",COMVariant::createFromStr(com_exicalendar1.toICalendar(COMVariant::createFromReal(3.325),6/*exPropertyTypeDuration*/)));
p = COM::createFromObject(com_exicalendar1.Root().Properties()).Item("Duration"); com_p = p;
i = com_exicalendar1.toICalendar(p.Value(),p.GuessType());
print( "icalendar:" );
print( i );
print( "all:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"") );
print( "duration:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"Duration") );
print( "weeks:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"W") );
print( "days:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"D") );
print( "hour:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"H") );
print( "min:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"M") );
print( "sec:" );
print( com_exicalendar1.valuesFromICalendar(i,p.GuessType(),"S") );
}
|
15
|
How can I add a property of duration type

public void init()
{
COM com_Component,com_Properties,com_Property,com_exicalendar1;
anytype exicalendar1,var_Component,var_Properties,var_Property;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
var_Component = COM::createFromObject(com_exicalendar1.Content().Components()).Add("VCALENDAR"); com_Component = var_Component;
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("Duration1",COMVariant::createFromStr(com_exicalendar1.toICalendar(COMVariant::createFromReal(2.5),6/*exPropertyTypeDuration*/)));
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
var_Property = COM::createFromObject(com_Properties).Add("Duration2"); com_Property = var_Property;
com_Property.Value(COMVariant::createFromReal(2.5));
com_Property.Type(6/*exPropertyTypeDuration*/);
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("Duration3",COMVariant::createFromStr(com_exicalendar1.valuesToICalendar("D=2;H=12",6/*exPropertyTypeDuration*/)));
print( com_exicalendar1.Save() );
}
|
14
|
How can I add a property of date-time type

public void init()
{
COM com_Component,com_Properties,com_Property,com_exicalendar1;
anytype exicalendar1,var_Component,var_Properties,var_Property;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
var_Component = COM::createFromObject(com_exicalendar1.Content().Components()).Add("VCALENDAR"); com_Component = var_Component;
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("DateTime1",COMVariant::createFromUtcDateTime(str2Datetime("1/1/2001 12:00:00",213)));
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("DateTime2",COMVariant::createFromStr(com_exicalendar1.toICalendar(COMVariant::createFromDate(str2Date("1/1/2001",213)),5/*exPropertyTypeDateTime*/)));
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
var_Property = COM::createFromObject(com_Properties).Add("DateTime3"); com_Property = var_Property;
com_Property.Value(COMVariant::createFromDate(str2Date("1/1/2001",213)));
com_Property.Type(5/*exPropertyTypeDateTime*/);
print( com_exicalendar1.Save() );
}
|
13
|
How can I add a property of date type

public void init()
{
COM com_Component,com_Properties,com_Property,com_exicalendar1;
anytype exicalendar1,var_Component,var_Properties,var_Property;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
var_Component = COM::createFromObject(com_exicalendar1.Content().Components()).Add("VCALENDAR"); com_Component = var_Component;
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("Date1",COMVariant::createFromDate(str2Date("1/1/2001",213)));
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("Date2",COMVariant::createFromStr(com_exicalendar1.toICalendar(COMVariant::createFromDate(str2Date("1/1/2001",213)),4/*exPropertyTypeDate*/)));
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
var_Property = COM::createFromObject(com_Properties).Add("Date3"); com_Property = var_Property;
com_Property.Value(COMVariant::createFromDate(str2Date("1/1/2001",213)));
com_Property.Type(4/*exPropertyTypeDate*/);
print( com_exicalendar1.Save() );
}
|
12
|
How can I add a property of Calendar User Address type

public void init()
{
COM com_Component,com_Properties,com_Property,com_exicalendar1;
anytype exicalendar1,var_Component,var_Properties,var_Property;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
var_Component = COM::createFromObject(com_exicalendar1.Content().Components()).Add("VCALENDAR"); com_Component = var_Component;
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("caladdress1","mailto:support@exontrol.com");
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("caladdress2",COMVariant::createFromStr(com_exicalendar1.toICalendar("mailto:support@exontrol.com",3/*exPropertyTypeCalAddress*/)));
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
var_Property = COM::createFromObject(com_Properties).Add("caladdress3"); com_Property = var_Property;
com_Property.Value("mailto:support@exontrol.com");
com_Property.Type(3/*exPropertyTypeCalAddress*/);
print( com_exicalendar1.Save() );
}
|
11
|
How can I add a property of boolean type

public void init()
{
COM com_Component,com_Properties,com_Property,com_exicalendar1;
anytype exicalendar1,var_Component,var_Properties,var_Property;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
var_Component = COM::createFromObject(com_exicalendar1.Content().Components()).Add("VCALENDAR"); com_Component = var_Component;
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("Boolean1",COMVariant::createFromBoolean(true));
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("Boolean2",COMVariant::createFromStr(com_exicalendar1.toICalendar("TRUE",2/*exPropertyTypeBoolean*/)));
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
var_Property = COM::createFromObject(com_Properties).Add("Boolean3"); com_Property = var_Property;
com_Property.Value(COMVariant::createFromInt(0));
com_Property.Type(2/*exPropertyTypeBoolean*/);
print( com_exicalendar1.Save() );
}
|
10
|
How can I add a property of binary type

public void init()
{
COM com_Component,com_Properties,com_Property,com_exicalendar1;
anytype exicalendar1,var_Component,var_Properties,var_Property;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
var_Component = COM::createFromObject(com_exicalendar1.Content().Components()).Add("VCALENDAR"); com_Component = var_Component;
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
com_Properties.Add("Binary1",COMVariant::createFromStr(com_exicalendar1.toICalendar("This is a bit of text converted to binary",1/*exPropertyTypeBinary*/)));
var_Properties = COM::createFromObject(com_Component.Properties()); com_Properties = var_Properties;
var_Property = COM::createFromObject(com_Properties).Add("Binary2"); com_Property = var_Property;
com_Property.Value("This is a bit of text converted to binary");
com_Property.Type(1/*exPropertyTypeBinary*/);
print( com_exicalendar1.Save() );
}
|
9
|
How can I access the root element of the iCalendar format

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
com_exicalendar1.Load("BEGIN:VCALENDAR\\r\\nVERSION:2.0\\r\\nEND:VCALENDAR");
print( com_exicalendar1.Root().Name() );
print( com_exicalendar1.Root().Properties().Item("Version").Value() );
}
|
8
|
How can I get notified once the control loads a new component, property, when using Load or LoadFile methods

// AddComponent event - Occurs when a new component is added.
void onEvent_AddComponent(COM _NewComponent)
{
;
print( _NewComponent );
}
// AddProperty event - Occurs when a new property is added.
void onEvent_AddProperty(COM _NewPropery)
{
;
print( _NewPropery );
}
public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
com_exicalendar1.FireEvents(true);
com_exicalendar1.Load("BEGIN:VCALENDAR\\r\\nVERSION:2.0\\r\\nEND:VCALENDAR");
}
|
7
|
How can I add a property with parameters

public void init()
{
COM com_Component,com_Component1,com_Components,com_Parameters,com_Properties,com_Property,com_exicalendar1;
anytype exicalendar1,var_Component,var_Component1,var_Components,var_Parameters,var_Properties,var_Property;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
var_Component = COM::createFromObject(com_exicalendar1.Content().Components()).Add("VCALENDAR"); com_Component = var_Component;
var_Components = COM::createFromObject(com_Component.Components()); com_Components = var_Components;
var_Component1 = COM::createFromObject(com_Components).Add("VEVENT"); com_Component1 = var_Component1;
var_Properties = com_Component1.Properties(); com_Properties = var_Properties;
var_Property = COM::createFromObject(com_Properties.Add("SUMMARY","Company Holiday Party")); com_Property = var_Property;
var_Parameters = COM::createFromObject(com_Property).Parameters(); com_Parameters = var_Parameters;
com_Parameters.Add("LANGUAGE","en-US");
com_Properties.Add("DATE",COMVariant::createFromDate(str2Date("1/1/2001",213)));
print( com_exicalendar1.Save() );
}
|
6
|
How can I load iCalendar from a string

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
com_exicalendar1.Load("BEGIN:VCALENDAR\\r\\nVERSION:2.0\\r\\nEND:VCALENDAR");
print( com_exicalendar1.Content().Components().Item(COMVariant::createFromInt(0)).Name() );
}
|
5
|
How can I add VEVENT objects

public void init()
{
COM com_Component,com_Component1,com_Components,com_Properties,com_Properties1,com_Properties2,com_exicalendar1;
anytype exicalendar1,var_Component,var_Component1,var_Components,var_Properties,var_Properties1,var_Properties2;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
var_Component = COM::createFromObject(com_exicalendar1.Content().Components()).Add("VCALENDAR"); com_Component = var_Component;
var_Properties = com_Component.Properties(); com_Properties = var_Properties;
com_Properties.Add("Version","2.0");
com_Properties.Add("PRODID","-//hacksw/handcal//NONSGML v1.0//EN");
var_Components = COM::createFromObject(com_Component.Components()); com_Components = var_Components;
var_Component1 = COM::createFromObject(com_Components).Add("VEVENT"); com_Component1 = var_Component1;
var_Properties1 = com_Component1.Properties(); com_Properties1 = var_Properties1;
com_Properties1.Add("DTSTART",COMVariant::createFromDate(str2Date("1/1/2001",213)));
com_Properties1.Add("DTEND",COMVariant::createFromDate(str2Date("1/2/2001",213)));
com_Properties1.Add("SUMMARY","First Party");
var_Components = COM::createFromObject(com_Component.Components()); com_Components = var_Components;
var_Component1 = COM::createFromObject(com_Components).Add("VEVENT"); com_Component1 = var_Component1;
var_Properties2 = com_Component1.Properties(); com_Properties2 = var_Properties2;
com_Properties2.Add("DTSTART",COMVariant::createFromDate(str2Date("1/4/2001",213)));
com_Properties2.Add("DTEND",COMVariant::createFromDate(str2Date("1/5/2001",213)));
com_Properties2.Add("SUMMARY","Second Party");
print( com_exicalendar1.Save() );
}
|
4
|
How can I save the control's content to iCalendar format, as a file
public void init()
{
COM com_Component,com_Component1,com_Components,com_Properties,com_Properties1,com_exicalendar1;
anytype exicalendar1,var_Component,var_Component1,var_Components,var_Properties,var_Properties1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
var_Component = COM::createFromObject(com_exicalendar1.Content().Components()).Add("VCALENDAR"); com_Component = var_Component;
var_Properties = com_Component.Properties(); com_Properties = var_Properties;
com_Properties.Add("Version","2.0");
com_Properties.Add("PRODID","-//hacksw/handcal//NONSGML v1.0//EN");
var_Components = COM::createFromObject(com_Component.Components()); com_Components = var_Components;
var_Component1 = COM::createFromObject(com_Components).Add("VEVENT"); com_Component1 = var_Component1;
var_Properties1 = com_Component1.Properties(); com_Properties1 = var_Properties1;
com_Properties1.Add("DTSTART",COMVariant::createFromDate(str2Date("1/1/2001",213)));
com_Properties1.Add("DTEND",COMVariant::createFromDate(str2Date("1/2/2001",213)));
com_Properties1.Add("SUMMARY","Bastille Day Party");
com_exicalendar1.SaveFile("c:/temp/test.ical");
}
|
3
|
How can I load the iCalendar format from a file

public void init()
{
COM com_exicalendar1;
anytype exicalendar1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
com_exicalendar1.LoadFile("c:/temp/test.ical");
print( com_exicalendar1.Content().Components().Item("VCALENDAR").Properties().Item("PRODID").Value() );
}
|
2
|
How do I export the control's content to iCalendar format

public void init()
{
COM com_Component,com_Component1,com_Components,com_Properties,com_Properties1,com_exicalendar1;
anytype exicalendar1,var_Component,var_Component1,var_Components,var_Properties,var_Properties1;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
var_Component = COM::createFromObject(com_exicalendar1.Content().Components()).Add("VCALENDAR"); com_Component = var_Component;
var_Properties = com_Component.Properties(); com_Properties = var_Properties;
com_Properties.Add("Version","2.0");
com_Properties.Add("PRODID","-//hacksw/handcal//NONSGML v1.0//EN");
var_Components = COM::createFromObject(com_Component.Components()); com_Components = var_Components;
var_Component1 = COM::createFromObject(com_Components).Add("VEVENT"); com_Component1 = var_Component1;
var_Properties1 = com_Component1.Properties(); com_Properties1 = var_Properties1;
com_Properties1.Add("DTSTART",COMVariant::createFromDate(str2Date("1/1/2001",213)));
com_Properties1.Add("DTEND",COMVariant::createFromDate(str2Date("1/2/2001",213)));
com_Properties1.Add("SUMMARY","Bastille Day Party");
print( com_exicalendar1.Save() );
}
|
1
|
How can I generate a VCALENDAR object

public void init()
{
COM com_Component,com_Properties,com_exicalendar1;
anytype exicalendar1,var_Component,var_Properties;
;
super();
// Add 'exicalendar.dll(ExICalendar.dll)' reference to your project.
exicalendar1 = COM::createFromObject(new EXICALENDARLib.exicalendar()); com_exicalendar1 = exicalendar1;
var_Component = COM::createFromObject(com_exicalendar1.Content().Components()).Add("VCALENDAR"); com_Component = var_Component;
var_Properties = com_Component.Properties(); com_Properties = var_Properties;
com_Properties.Add("Version","2.0");
com_Properties.Add("PRODID","-//hacksw/handcal//NONSGML v1.0//EN");
print( com_exicalendar1.Save() );
}
|