C# Класс Axiom.Overlays.OverlayElementManager

This class acts as a repository and regitrar of overlay components.
OverlayElementManager's job is to manage the lifecycle of OverlayElement (subclass) instances, and also to register plugin suppliers of new components.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
GetElementTable OverlayElement>.Dictionary
OverlayElementManager System

Открытые методы

Метод Описание
AddElementFactory ( IOverlayElementFactory factory ) : void

Registers a new OverlayElementFactory with this manager.

Should be used by plugins or other apps wishing to provide a new OverlayElement subclass.

CloneOverlayElementFromTemplate ( string template, string name ) : OverlayElement

Clones an overlay element from a template

CreateElement ( string typeName, string instanceName ) : OverlayElement

Creates a new OverlayElement of the type requested.

CreateElement ( string typeName, string instanceName, bool isTemplate ) : OverlayElement

Creates a new OverlayElement of the type requested.

CreateElementFromFactory ( string typeName, string instanceName ) : OverlayElement

Creates an element of the specified type, with the specified name

A factory must be available to handle the requested type, or an exception will be thrown.

CreateElementFromTemplate ( string templateName, string typeName, string instanceName ) : OverlayElement

CreateElementFromTemplate ( string templateName, string typeName, string instanceName, bool isTemplate ) : OverlayElement

DestroyAllElements ( ) : void

destroys all OverlayElements

DestroyAllElements ( bool isTemplate ) : void

destroys all OverlayElements

DestroyElement ( OverlayElement element ) : void

Destroys the supplied OvelayElement

DestroyElement ( OverlayElement element, bool isTemplate ) : void

Destroys the supplied OvelayElement

DestroyElement ( string name ) : void

Destroys the specified OverlayElement

DestroyElement ( string name, bool isTemplate ) : void

Destroys the specified OverlayElement

GetElement ( string name ) : OverlayElement

Gets a reference to an existing element.

GetElement ( string name, bool isTemplate ) : OverlayElement

Gets a reference to an existing element.

Защищенные методы

Метод Описание
dispose ( bool disposeManagedResources ) : void

Called when the engine is shutting down.

Приватные методы

Метод Описание
GetElementTable ( bool isTemplate ) : OverlayElement>.Dictionary

Quick helper method to return the lookup table for the right element type.

OverlayElementManager ( ) : System

Internal constructor. This class cannot be instantiated externally.

Описание методов

AddElementFactory() публичный Метод

Registers a new OverlayElementFactory with this manager.
Should be used by plugins or other apps wishing to provide a new OverlayElement subclass.
public AddElementFactory ( IOverlayElementFactory factory ) : void
factory IOverlayElementFactory
Результат void

CloneOverlayElementFromTemplate() публичный Метод

Clones an overlay element from a template
public CloneOverlayElementFromTemplate ( string template, string name ) : OverlayElement
template string template to clone
name string name of the new element
Результат OverlayElement

CreateElement() публичный Метод

Creates a new OverlayElement of the type requested.
public CreateElement ( string typeName, string instanceName ) : OverlayElement
typeName string The type of element to create is passed in as a string because this /// allows plugins to register new types of component.
instanceName string The type of element to create.
Результат OverlayElement

CreateElement() публичный Метод

Creates a new OverlayElement of the type requested.
public CreateElement ( string typeName, string instanceName, bool isTemplate ) : OverlayElement
typeName string The type of element to create is passed in as a string because this /// allows plugins to register new types of component.
instanceName string The type of element to create.
isTemplate bool
Результат OverlayElement

CreateElementFromFactory() публичный Метод

Creates an element of the specified type, with the specified name
A factory must be available to handle the requested type, or an exception will be thrown.
public CreateElementFromFactory ( string typeName, string instanceName ) : OverlayElement
typeName string
instanceName string
Результат OverlayElement

CreateElementFromTemplate() публичный Метод

public CreateElementFromTemplate ( string templateName, string typeName, string instanceName ) : OverlayElement
templateName string
typeName string
instanceName string
Результат OverlayElement

CreateElementFromTemplate() публичный Метод

public CreateElementFromTemplate ( string templateName, string typeName, string instanceName, bool isTemplate ) : OverlayElement
templateName string
typeName string
instanceName string
isTemplate bool
Результат OverlayElement

DestroyAllElements() публичный Метод

destroys all OverlayElements
public DestroyAllElements ( ) : void
Результат void

DestroyAllElements() публичный Метод

destroys all OverlayElements
public DestroyAllElements ( bool isTemplate ) : void
isTemplate bool
Результат void

DestroyElement() публичный Метод

Destroys the supplied OvelayElement
public DestroyElement ( OverlayElement element ) : void
element OverlayElement
Результат void

DestroyElement() публичный Метод

Destroys the supplied OvelayElement
public DestroyElement ( OverlayElement element, bool isTemplate ) : void
element OverlayElement
isTemplate bool
Результат void

DestroyElement() публичный Метод

Destroys the specified OverlayElement
public DestroyElement ( string name ) : void
name string
Результат void

DestroyElement() публичный Метод

Destroys the specified OverlayElement
public DestroyElement ( string name, bool isTemplate ) : void
name string
isTemplate bool
Результат void

GetElement() публичный Метод

Gets a reference to an existing element.
public GetElement ( string name ) : OverlayElement
name string Name of the element to retrieve.
Результат OverlayElement

GetElement() публичный Метод

Gets a reference to an existing element.
public GetElement ( string name, bool isTemplate ) : OverlayElement
name string Name of the element to retrieve.
isTemplate bool
Результат OverlayElement

dispose() защищенный Метод

Called when the engine is shutting down.
protected dispose ( bool disposeManagedResources ) : void
disposeManagedResources bool
Результат void