The ITimeRestriction interface provides the option to set the period of time during which the presentation will be available to users. This interface can be obtained using the IProtectionSettings.TimeRestriction property.
Table 1. Properties
Property | Value Type | Access | Default value | Property description |
---|
StartDate | Date | Read/Write | Empty | The presentation will be available from the specified date. |
EndDate | Date | Read/Write | Empty | The presentation will be available until the specified date. |
If both parameters are specified, the presentation will be available during the specified time range.
If none of the parameters are specified, the presentation will be displayed with no time restrictions.
Table 2. Methods
Method | Description |
---|
void Reset() |
|
C# - set time restriction
var timeRestriction = converter.Settings.Protection.TimeRestriction;
timeRestriction.StartDate = new DateTime(2020, 3, 17);
timeRestriction.EndDate = new DateTime(2020, 4, 12);
converter.GenerateHtml5Presentation("c:\\presentation\\index.html");
C#