DataLoadStartDate: DateTime;
The DataLoadStartDate property determines the start date of data loading for all workbooks that are in the context.
The ILanerContext.DataLoadEndDate property determines data loading end date.
Executing the example requires a form with the following components: the Button component named Button1, the LanerBox components named LanerBox1 and LanerBox2, and the UiErAnalyzer components named UiErAnalyzer1 and UiErAnalyzer2. UiErAnalyzer1 and UiErAnalyzer2 are data sources for LanerBox1 and LanerBox2. Workbooks of the same time series database should be loaded to UiErAnalyzer1 and UiErAnalyzer2.
The example is a handler of the OnClick event for the Button1 component.
Add links to the Express, ExtCtrls, Forms, Laner, and Tab system assemblies.
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: