CustomParams: String;
The CustomParams property returns custom parameters passed on platform startup with the -Customparam key.
Executing the example requires a form and a button on the form. The form has the SRART_F identifier.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
WinApp: IWinApplication;
Begin
WinApp := WinApplication.Instance;
Self.Text := WinApp.CustomParams;
End Sub Button1OnClick;
If platform is started using the studio.exe PPRepository/PPRepository@PPRepository:START_F -customparam "test" command, after connecting to the repository the form is started. On clicking the button the form header displays the value passed with the -Customparam key.
Executing the example requires a .NET assembly, in which a .NET form is set as a startup object. The button is placed on the form. The .NET assembly has the SRART_ASSM identifier.
Imports Prognoz.Platform.Interop.Ui;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
WinApp: WinApplication = New WinApplicationClass_2();
Begin
Self.Text := WinApp.CustomParams;
End Sub;
If platform is started using the studio.exe PPRepository/PPRepository@PPRepository:SRART_ASSM -customparam "test" command, after connecting to the repository the form of .NET assembly is started. On clicking the button the form header displays the value passed with the -Customparam key.
See also:
IWinApplication | Launching Platform from the command line using keys