GraffitiCalendarRestriction

View Categories

Enumerations #

Name Values
This class exposes no enumerations.

Constants #

Name Type Value
This class exposes no constants.

Events #

Definition Description
This class exposes no events.

Methods #

Definition Parameters Return Type Description
Constructor StartTime as DateTime None Creates a new class instance for hiding specified days of the week within a timeframe.
StartTime as DateTime
EndTime as DateTime
ParamArray Days as Integer
Constructor RestrictionID as String None Creates a new class instance for showing only certain days of the week in the calendar view.
ParamArray VisibleDays as Integer

Properties #

Name Type Default Value Description
Friday Boolean False Allow Friday in View
ID String “” The ID of this restriction
Monday Boolean False Allow Monday in View
Saturday Boolean False Allow Saturday in View
Sunday Boolean False Allow Sunday in View
Thursday Boolean False Allow Thursday in View
TimeEnd Date Nil The end time for the restriction.
TimeStart Date Nil The start time for the restriction.
Tuesday Boolean False Allow Tuesday in View
Wednesday Boolean False Allow Wednesday in View

Notes #

How it Works #

TimeEnd and TimeStart (and their matching Constructor parameters) apply the time to the allowed days of the week. These are not to specify a timeframe of when the restriction is applied. It is possible to disable days within a timeframe using the DisableDays method (Example).

Examples #

Custom Restriction #

var dStart as new DateTime( 2022, 1, 1, 8, 0, 0 )
var dEnd as new DateTime( 2022, 1, 1, 17, 0, 0 )
var r as new GraffitiCalendarRestriction( "noMonWedFri", dStart, dEnd, 1, 3, 5 )
myCalendar.AddRestriction( r )
myCalendar.RestrictView = True

This example will create a restriction which allows Monday, Wednesday and Friday..

Hide Days of the Week #

var r as new GraffitiCalendarRestriction( "noWeekends", 1, 2, 3, 4, 5 )
me.AddRestriction( r )

This example will create a restriction that hides Saturday and Sunday from the calendar.