Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.
Komentár: Example improved

%HI_SelectTimeDialog function


Function
The function %HI_SelectTimeDialog shows a dialog box for defining a time interval.
Declaration


Blok kódu
languageesl
themeConfluence
 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


StartTimeBegin time of interval.
EndTimeEnd time of interval.
bStrongInequalityPossible 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
bShowTimeAllows to show time data in the dialog box:
  • @TRUE - show time data
  • @FALSE - hide time data
bReadOnlyHoursAllows to change time data:
  • @TRUE - disable time data changes
  • @FALSE - enable time data changes
x, yPosition 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

Image Added

Blok kódu
languageesl
themeRDark
 TIME  _t1bt
 TIME  _t2et
 BOOL  _res
 INT  _i

 _i := 1
 _t1bt := _i\TIM
 _t2et := %AddTime(_t1bt, 3600*10)
 _res :=  %HI_SelectTimeDialog(_t1bt, _t2et, @FALSE, @TRUE, @FALSE)
 
 IF  _res THEN
   _tmA := _t1bt
   _tmA2 := _t2et
 ENDIF