Root : IMetabaseObjectDescriptor;
Root : Prognoz.Platform.Interop.Metabase.IMetabaseObjectDescriptor;
The Root property determines parameters of the navigator's root folder.
Executing the example requires a form and the Button1 button on the form. 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.Root := SecParams.Metabase.ItemById("OBJ53"); //Determine root folder
SecParams.Active := SecManagerMode.Navigator; // Activate the Navigator tab
Context.Data := SecParams;
Target.Execute("OpenNavigator", Context);
End Sub Button1OnClick
After executing the example the security manager is opened on the Navigator tab. A folder with the OBJ53 identifier is set as a root folder.
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.Root := SecParams.Metabase.ItemById["OBJ53"]; //Determine root folder
SecParams.Active := SecManagerMode.smbcNavigator; // Activate the Navigator tab
Context.Data := SecParams;
Target.Execute("OpenNavigator", Context, Null);
End Sub;
See also: