It opens the dialog box that is used to set up alternative hierarchies of dictionary.
Command parameters are passed in the Data property. Executing the command requires to specify the following value in this property:
Value type | Description |
IMetabaseObjectDescriptor | Repository dictionary description. |
The command can be executed only for repository dictionaries. Executing the command shows logical True if the OK button is clicked, and logical False if the Cancel button is clicked. Clicking the OK button saves all pending changes.
Executing the example requires a form and a button named Button1 on the form. The repository contains a dictionary with the Std_Dim identifier.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
MB: IMetabase;
Dim: IMetabaseObjectDescriptor;
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Begin
MB := MetabaseClass.Active;
Dim := MB.ItemById("STD_DIM");
Target := WinApplication.Instance.GetPluginTarget("Dim");
Context := Target.CreateExecutionContext;
Context.Data := Dim;
Target.Execute("HierarchiesDialog", Context);
End Sub Button1OnClick;
Clicking the button displays the dialog box for setting up alternative hierarchies for the specified dictionary.
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;
Dim: IMetabaseObjectDescriptor;
WinApp: WinApplication = New WinApplicationClass_2();
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Begin
MB := Self.Metabase;
Dim := MB.ItemById["STD_DIM"];
Target := WinApp.GetPluginTarget("Dim");
Context := Target.CreateExecutionContext();
Context.Data := Dim;
Target.Execute("HierarchiesDialog", Context, Null);
End Sub;
See also: