IUiLicenseManager.GetAllFeatures

Синтаксис Fore

GetAllFeatures: IStringList;

Синтаксис Fore.NET

GetAllFeatures: System.Collections.Generic.IList<System.String>;

Описание

Метод GetAllFeatures возвращает список всех доступных единиц лицензирования (features).

Комментарии

Метод возвращает информацию о единицах лицензирования независимо от типа используемой лицензии: автономной или сетевой.

Пример Fore

Для выполнения примера подключите системную сборку «Ui», разместите на форме компонент Button с идентификаторами «Button1». Пример является обработчиком события OnClick для компонента «Button1».

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    LicManager: IUiLicenseManager;
    Features: IStringList;
Begin
    LicManager := WinApplication.Instance.LicenseManager;
    Features := LicManager.GetAllFeatures;
    WinApplication.InformationBox(Features.AsString);
End Sub Button1OnClick;

При нажатии на кнопку будет выдано сообщение, содержащее список единиц лицензирования.

Пример Fore.NET

Для выполнения примера подключите системные сборки «Ui», «Fore», «ForeSystem». Разместите на форме компонент Button с идентификаторами «Button1». Пример является обработчиком события OnClick для компонента «Button1». Результат выполнения примера Fore.NET совпадает с примером Fore.

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var 
    WinApp: WinApplicationClassClass = New WinApplicationClassClass();
    Svc: IForeServices;
    RunContext: ForeRuntimeContext;
    LicManager: IUiLicenseManager;
    Features: System.Collections.Generic.IList<System.String>;
    s: String;
Begin
    Svc := Self.Metabase As IForeServices;
    RunContext := Svc.GetRuntime().Context;
    LicManager := WinApp.Instance[RunContext].LicenseManager;
    Features := LicManager.GetAllFeatures();
    s := String.Join(Environment.NewLine, Features);
    WinApp.InformationBox(s,New IWin32WindowForeAdapter(Self));
End Sub;

См. также:

IUiLicenseManager