Acitve : SecManagerMode;
Active : Prognoz.Platform.Interop.Ui.SecManagerMode;
The Active property determines an active tab on opening the security manager.
Executing the example requires a form with a button named Button1. Add links to the Metabase, Ui system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
SecParams: IUiSecManagerParams;
Begin
Target := WinApplication.Instance.GetPluginTarget("Adm");
Context := Target.CreateExecutionContext;
SecParams := new UiSecManagerParams.Create;
SecParams.Metabase := MetabaseClass.Active; // Set metabase
SecParams.Active := SecManagerMode.Classes; // Activate the Classes tab
Context.Data := SecParams;
Target.Execute("OpenNavigator", Context);
End Sub Button1OnClick;
After executing the example the security manager is opened on the Object Classes tab.
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.
Imports Prognoz.Platform.Interop.Ui;
Imports Prognoz.Platform.Interop.Metabase;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
WinApp: WinApplication = New WinApplicationClass_2();
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
SecParams: IUiSecManagerParams;
Begin
Target := WinApp.GetPluginTarget("Adm");
Context := Target.CreateExecutionContext();
SecParams := new UiSecManagerParams.Create();
SecParams.Metabase := Self.Metabase; //Set metabase
SecParams.Active := SecManagerMode.smbcClasses; // Activate the Classes tab
Context.Data := SecParams;
Target.Execute("OpenNavigator", Context, Null);
End Sub;
See also: