LoadFromStream(Stream: IIOStream; StartIndex: Integer;[Parent: ILanerGroupSerie = Null]);
LoadFromStream(Stream: System.IO.Stream; StartIndex: Integer; Parent: Prognoz.Platform.Interop.Laner.ILanerGroupSerie);
Stream is a data stream.
StartIndex is the start data index in a stream.
Parent is a parent group of series. Optional parameter.
The LoadFromStream method loads the series set from the stream.
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. Workbook of the time series database must be loaded to UiErAnalyzer1. The pStream data stream containing the set of series is also required.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
ErAn: IEaxAnalyzer;
Laner: ILaner;
LanSers: ILanerSeries;
SerSet: ILanerSeriesSet;
pStream: IIOStream;
Begin
ErAn := UiErAnalyzer1.ErAnalyzer;
Laner := ErAn.Laner;
LanSers := Laner.Series;
SerSet := LanSers.CreateSet;
pStream.Position := 0;
SerSet.LoadFromStream(pStream, 0);
LanSers.Copy(SerSet);
LanSers.Paste(0);
Dispose pStream;
End Sub Button1OnClick;
After executing the example a copy is created for each series in the workbook. After that all the elements, except for the first one, are removed from the copied series set.
See also: