SetRelativeDatePeriod
This function sets the Relative Start Date and the Period that the alarms will be tracked in the Alarm Object. This function has eleven ways to be used:
Function Definition:
void SetRelativeDatePeriod(DateTime date, TimeSpan period);
void SetRelativeDatePeriod(DateTime date, string period);
void SetRelativeDatePeriod(DateTime date, double period);
void SetRelativeDatePeriod(string date, TimeSpan period);
void SetRelativeDatePeriod(string date, string period);
void SetRelativeDatePeriod(string date, double period);
void SetRelativeDatePeriod(DateTime date, TimeSpan period, bool isBackward, bool isForward);
void SetRelativeDatePeriod(DateTime date, string period, bool isBackward, bool isForward);
void SetRelativeDatePeriod(DateTime date, double period, bool isBackward, bool isForward);
void SetRelativeDatePeriod(string date, TimeSpan period, bool isBackward, bool isForward);
void SetRelativeDatePeriod(string date, string period, bool isBackward, bool isForward);
void SetRelativeDatePeriod(string date, double period, bool isBackward, bool isForward);
. DateTime date: A DateTime parameter that Represents the date that will be the start date.
. String date: A String parameter that Represents the date that will be the start date.
. 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 SetRelativeDatePeriod function: AlarmObjectName.SetRelativeDatePeriod(date, period);
2. During the execution of RunTime, run the configured event.
Example with SetRelativeDatePeriod(DateTime date, double 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.SetRelativeDatePeriod(@dateTag, @periodTag);
In this event, the Relative Start date will be set to the DateTime tag "@dateTag" and the 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); |