DataLoadStartDate: DateTime;
The DataLoadStartDate property determines the date of data loading start for all workbooks, that are in the context.
The ILanerContext.DataLoadEndDate property determines a date of data loading termination.
Executing the example requires a form containing:
A button with the Button1 identifier.
Two LanerBox components.
Two UiErAnalyzer components with the UiErAnalyzer1 and UiErAnalyzer2 identifiers that are data sources for LanerBox. Workbooks of the same time series database must be loaded to the UiErAnalyzer components.
Example is a handler of the OnClick event for the button.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
pContext: ILanerContext;
Laner: ILaner;
Begin
pContext := New LanerContext.Create;
pContext.DataLoadStartDate := DateTime.Parse("01.01.1990");
pContext.DataLoadEndDate := DateTime.Parse("01.01.2020");
pContext.BeginLoad;
Laner := UiErAnalyzer1.ErAnalyzer.Laner;
If Not Laner.IsInContext Then
pContext.Register(Laner);
End If;
Laner := UiErAnalyzer2.ErAnalyzer.Laner;
If Not Laner.IsInContext Then
pContext.Register(Laner);
End If;
pContext.EndLoad;
End Sub Button1OnClick;
After executing the example, the workbooks, loaded to the UiErAnalyzer components,are registered in the created context. If the workbook already exists in any context, it is not registered.
See also: