Results: ILanerResultsBoxResults;
The Results property returns a set of objects used to work with tabs of the Calculation Results panel.
This method implements the access to values displayed on the Calculation Results panel. All the values are read-only.
Executing the example requires a form, a button named Button1 on the form, the LanerBox component, the LanerResultsBox component named LanerResultsBox1 and the UiErAnalyzer component that is a data source for LanerBox and LanerResultsBox. The workbook of the time series database should be loaded to UiErAnalyzer1.
The example is a handler of the OnClick event for the button.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Results: ILanerResultsBoxResults;
Statistics: ILanerResultsBoxStatistics;
HasContainers: Boolean;
CurContainer: Integer;
i: Integer;
marg: String;
Begin
Results := LanerResultsBox1.Results;
Statistics := Results.Statistics;
HasContainers := (Statistics.Count <> 0) And (Statistics.GroupIndex(0) <> -1);
CurContainer := -1;
For i := 0 To Statistics.Count - 1 Do
Statistics.Enabled(i) := Statistics.Active(i);
If Statistics.Enabled(i) Then
If (HasContainers And (CurContainer <> Statistics.GroupIndex(i))) Then
marg := "----";
Debug.WriteLine(Statistics.GroupName(i));
End If;
CurContainer := Statistics.GroupIndex(i);
Debug.WriteLine(marg + Statistics.Name(i) + " " + Statistics.Value(i));
End If;
Select Case Statistics.Type(i)
Case LanerBoxStatisticType.Min: Statistics.Enabled(i) := False;
Case LanerBoxStatisticType.Max: Statistics.Enabled(i) := False;
End Select;
End For;
LanerResultsBox1.RefreshContainer(LanerBoxContainerType.Results);
End Sub Button1OnClick;
After executing the example the console displays values of all statistics available for the selected series. The following values are shown for each characteristics: name, value, name of containing group (if any). The Maximum and Minimum characteristics are hidden on the Static Characteristics tab.
See also: