Moves the focus to the object navigator and shows the specified repository object.
Command parameters are passed in the Data property. Executing the command requires to specify the following value in this property:
Value type | Description |
IMetabaseObjectDescriptor | Description of the object that must be shown in the object navigator. |
None.
Executing the example requires a form with the Button1 button and an object with the Document identifier.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
MB: IMetabase;
MDesc: IMetabaseObjectDescriptor;
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Begin
MB := MetabaseClass.Active;
MDesc := MB.ItemById("Document");
Target := WinApplication.Instance.GetPluginTarget("Std");
Context := Target.CreateExecutionContext;
Context.Data := MDesc;
Target.Execute("ShowMetabaseObject", Context);
End Sub Button1OnClick;
Clicking the button moves to the object navigator where the specified object is shown.
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.Metabase;
Imports Prognoz.Platform.Interop.Ui;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
MB: IMetabase;
MDesc: IMetabaseObjectDescriptor;
WinApp: WinApplication = New WinApplicationClass_2();
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Begin
MB := Self.Metabase;
MDesc := MB.ItemById["Document"];
Target := WinApp.GetPluginTarget("Std");
Context := Target.CreateExecutionContext();
Context.Data := MDesc;
Target.Execute("ShowMetabaseObject", Context, Null);
End Sub;
See also: