Publish Command

Purpose

Opens mobile application publishing wizard.

Parameters of Use

Command parameters are passed in the Data property. Executing the command requires to determine the following value in this property:

Value type Description
IMetabaseObjectDescriptor Description of repository object that is a Mobile application to be published.

Application Features

The command can be executed only for mobile applications.

Fore Example

Executing the example requires that the repository contains a mobile application with the MobileApplication identifier. Create a form and place a button with the Button1 identifier on the form. Connect the Metabase and Ui system assemblies.

The example is a handler of the OnClick event for Button1.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var Target : IUiCommandTarget;
    Context : IUiCommandExecutionContext;
    MA : IMetabaseObjectDescriptor;
Begin
    MA := MetabaseClass.Active.ItemById("MobileApplication");
    Target := WinApplication.Instance.GetPluginTarget("Mobile");
    Context := Target.CreateExecutionContext;
    Context.Data := MA ;
    Target.Execute("Publish", Context);
End Sub Button1OnClick;

Clicking the button opens a mobile application publishing wizard.

Fore.NET Example

Executing the example requires that the repository contains a mobile application with the MobileApplication identifier. Create a form and place a button with the Button1 identifier on the form. Connect the Metabase, Fore and Ui system assemblies.

The example is a handler of the Click event for Button1.

Private Sub button1_Click( sender : System.Object; e : System.EventArgs );
Var Target : IUiCommandTarget;
    Context : IUiCommandExecutionContext;
    MA : IMetabaseObjectDescriptor;
    Svc: IForeServices;
    RunContext: ForeRuntimeContext;
    WinApp: WinApplicationClassClass = New WinApplicationClassClass();
Begin
    MA := Self.Metabase.ItemById["MobileApplication1"];
    Svc := Self.Metabase As IForeServices;
    RunContext := Svc.GetRuntime().Context;
    Target := WinApp.Instance[RunContext].GetPluginTarget("Mobile");
    Context := Target.CreateExecutionContext();
    Context.Data := MA;
    Target.Execute("Publish", Context, RunContext);
End Sub;

Clicking the button opens a mobile application publishing wizard.

See also:

IUiCommandTarget.Execute