Vidíte historickú verziu tejto stránky. Pozrite si aktuálnu verziu.

Porovnať s aktuálnou verziou Zobraziť históriu stránky

Verzia 1 Ďalej »

%HI_SelectTimeDialog function


Function
The function %HI_SelectTimeDialog shows a dialog box for defining a time interval.
Declaration
 BOOL %HI_SelectTimeDialog(
   TIME in out StartTime, 
   TIME in out EndTime := (invalid), 
   BOOL in bStrongInequality := true, 
   BOOL in bShowTime := true, 
   BOOL in bReadOnlyHours := false, 
   INT in x := -1, 
   INT in y := -1
 )

Parameters
StartTime Begin time of interval.
EndTime End time of interval.
bStrongInequality Possible values:
  • @TRUE - time interval returned by the function is to be StartTime≤interval<EndTime
  • @FALSE - time interval returned by the function is to be StartTime≤interval≤EndTime
bShowTime Allows to show time data in the dialog box:
  • @TRUE - show time data
  • @FALSE - hide time data
bReadOnlyHours Allows to change time data:
  • @TRUE - disable time data changes
  • @FALSE - enable time data changes
x, y Position of the dialog box on monitor.

Return value
TRUE - if user closed the dialog box by clicking the button OK.
FALSE - if user closed the dialog box by clicking the button Cancel.
Note
User selects e.g. the entire day of January 1st 2005:
  • if bStrongInequality=TRUE, then StartTime=1.1.2005 00:00:00.000 and EndTime=1.1.2005 23:59:59.999
  • if bStrongInequality=FALSE, then StartTime=1.1.2005 00:00:00.000 and EndTime=2.1.2005 00:00:00.000

Example
TIME  _t1
 TIME  _t2
 BOOL  _res
 INT  _i
 _i := 1
 _t1 := _i\TIM
 _t2 := %AddTime(_t1, 3600*10)
 _res :=  %HI_SelectTimeDialog(_t1, _t2, @FALSE, @TRUE, @FALSE)
 
 IF  _res THEN
 _tmA := _t1
 _tmA2 := _t2
 ENDIF

  • Žiadne štítky