Opens update from a file in the platform update manager.
Command parameters are passed in the Data property. Executing the command requires to specify the following values in this property:
Parameter | Description |
IMetabase | The repository, within which the update is opened. |
Executing the command opens a file selection dialog box. After the file is selected, and the OK button is clicked, the update opens in the update manager.
Executing the example requires a form and a button named Button1 on the form.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Target: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Begin
Target := WinApplication.Instance.GetPluginTarget("MetabaseUpdate");
Context := Target.CreateExecutionContext;
Context.Data := MetabaseClass.Active;
Target.Execute("OpenUpdate", Context);
End Sub Button1OnClick;
Clicking the button opens a dialog box that is used to open update files (*.pef). After the file is selected, and the OK button is clicked, the update opens in the update manager.
See also: