GetActiveContext: ISystemPadContext;
GetActiveContext(): Prognoz.Platform.Interop.Express.ISystemPadContext;
The GetActiveContext method returns context of the WorkbookConfigurationPanel component.
To determine data source of the WorkbookConfigurationPanel component, use the IWorkbookConfigurationPanel.Analyzer property.
Executing the example requires a form containing the WorkbookConfigurationPanel1 component with the WorkbookConfigurationPanel1 identifier and the UiErAnalyzer component with the UiErAnalyzer1 identifier. Determine the UiErAnalyzer1 component as data source for the WorkbookConfigurationPanel1 component. Use workbook as data source for the UiErAnalyzer1 component.
The example is the OnClick event handler for the form.
Sub WORKBOOKCONFIGURATIONPANELFormOnClick(Sender: Object; Args: IMouseEventArgs);
Var
sps: ISystemPadContext;
Begin
sps := WorkbookConfigurationPanel1.GetActiveContext;
Debug.WriteLine(sps.SystemPadId);
End Sub WORKBOOKCONFIGURATIONPANELFormOnClick;
On clicking the form. the console displays side panel component identifier - WBDataView.
The requirements and result of the Fore.NET Example execution match with those in the Fore Example. Use Fore.NET analogs instead of Fore components.
Add link to the Express system assembly.
Imports Prognoz.Platform.Interop.Express;
…
Private Sub WORKBOOKCONFIGURATIONPANELForm_Click(sender: System.Object; e: System.EventArgs);
Var
sps: ISystemPadContext;
Begin
sps := workbookConfigurationPanelNet1.CtrlBox.GetActiveContext();
System.Diagnostics.Debug.WriteLine(sps.SystemPadId);
End Sub;
See also: