SetRelativePeriod

Parent Previous Next

SetRelativePeriod

This function sets the period that the alarms will be tracked in the Alarm Object. This function has six ways to be used:


Function Definition:


void SetRelativePeriod(TimeSpan period);


void SetRelativePeriod(string period);


void SetRelativePeriod(double period);


void SetRelativePeriod(TimeSpan period, bool isBackward, bool isForward);


void SetRelativePeriod(string period, bool isBackward, bool isForward);


void SetRelativePeriod(double period, bool isBackward, bool isForward);


.     TimeSpan period: A DateTime parameter that Represents the period that the alarms will be tracked.

.     String period: A string parameter that Represents the period that the alarms will be tracked.

.     Double period: A double parameter that Represents the period that the alarms will be tracked.

.     isBackward: A Boolean value that represents if it will be backwards or not
       True - It means that it will be backwards. .
       False - It means that it will not be backwards.

.     isForward: A Boolean value that represents if it will be forwards or not
       True - It means that it will be forwards. .
       False - It means that it will not be forwards.



To configure this property, follow the steps below:


1.   In an object event, configure the SetRelativePeriod function: AlarmObjectName.SetRelativePeriod(period);


2.   During the execution of RunTime, run the configured event.



Example with SetRelativePeriod(TimeSpan period):


In the graphic document, the user has one Alarm object (named as Alarm1). In a Button object (named as Button1) the user configures the MouseUp event with the following event:


Alarm1.SetRelativePeriod(@periodTag);


In this event, the Relative Period will be set to the double tag "@periodTag".



 

Note: This property exists only to the following objects:

.    Alarm


 

Note: To use TimeSpan you can use the following configurations:

TimeSpan(long ticks);

TimeSpan(int hours, int minutes, int seconds);

TimeSpan(int days, int hours, int minutes, int seconds);

TimeSpan(int days, int hours, int minutes, int seconds, int milliseconds);