OpenUpdateFromRepo Command

Purpose

Opens update from a repository in the platform update manager.

Parameters of Use

Command parameters are passed in the Data property. Executing the command requires to specify the following values in the property:

Parameter Description
IMetabaseObject The Update repository object.

Application Features

The Update repository object is to be passed as a parameter.

Example

Executing the example requires a form and a button named Button1 on the form. The repository contains an update object with the Update01_01_2010 identifier.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    MB: IMetabase;
    Target: IUiCommandTarget;
    Context: IUiCommandExecutionContext;
Begin
    MB := MetabaseClass.Active;
    Target := WinApplication.Instance.GetPluginTarget("MetabaseUpdate");
    Context := Target.CreateExecutionContext;
    Context.Data := MB.ItemById("Update01_01_2010").Bind;
    Target.Execute("OpenUpdateFromRepo", Context);
End Sub Button1OnClick;

Clicking the button opens the specified update in the platform update manager.

See also:

IUiCommandTarget.Execute