FindByKey(Key: Integer): ILanerSerie;
Key: Series key.
The FindByKey method searches the series in the collection by the key and returns the object, containing the series in case of a successful search.
Executing the example requires a form with the Button1 button, the TabSheetBox component and the UiErAnalyzer component named UiErAnalyzer1 that is a data source for TabSheetBox. Working area of the time series database must be loaded to UiErAnalyzer1.
Click the button to start executing this example.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
ErAn: IEaxAnalyzer;
Laner: ILaner;
LSerieList: ILanerSerieList;
Serie: ILanerSerie;
i: integer;
Begin
ErAn := UiErAnalyzer1.ErAnalyzer;
Laner := ErAn.Laner;
LSerieList := Laner.SeriesList;
Serie := LSerieList.FindByKey(1);
If Serie <> Null Then
Debug.WriteLine(Serie.Name);
End If;
End Sub Button1OnClick;
After executing the example the search for series with the key 1 is performed. If the series is found, its name is displayed in console window.
See also: