Class ClientManagerBaseUI<TClient, TClientOptions>
Responsible for updating UI and storing client options for each device in Phoenix and notifying the client manager when options are updated by a user.
Inheritance
Implements
Inherited Members
Namespace: Phoenix.ClientManager
Assembly: Phoenix.ClientManager.dll
Syntax
public abstract class ClientManagerBaseUI<TClient, TClientOptions> : BindableBase, INotifyPropertyChanged where TClient : class, IGameConnect where TClientOptions : class
Type Parameters
Name | Description |
---|---|
TClient | The type of client used to connect to a game instance. |
TClientOptions | The options required to create a client. |
Constructors
View SourceClientManagerBaseUI(IPhoenixClientManager<TClient>, ILogger<ClientManagerBaseUI<TClient, TClientOptions>>?)
Initializes a new instance of the ClientManagerBaseUI<TClient, TClientOptions> class.
Declaration
public ClientManagerBaseUI(IPhoenixClientManager<TClient> clientManager, ILogger<ClientManagerBaseUI<TClient, TClientOptions>>? logger = null)
Parameters
Type | Name | Description |
---|---|---|
IPhoenixClientManager<TClient> | clientManager | The client manager used to set and update options. |
ILogger<ClientManagerBaseUI<TClient, TClientOptions>> | logger | The logger. |
Properties
View SourceClientManager
Gets the client manager associated with this UI.
Declaration
protected IPhoenixClientManager<TClient> ClientManager { get; }
Property Value
Type | Description |
---|---|
IPhoenixClientManager<TClient> |
ConnectionStatus
Gets the Phoenix.Controls.GameConnection.GameConnectionStatus of the client on the current device.
Declaration
public GameConnectionStatus ConnectionStatus { get; }
Property Value
Type | Description |
---|---|
GameConnectionStatus |
CurrentOptions
Gets the current options for the selected device.
Declaration
public TClientOptions? CurrentOptions { get; }
Property Value
Type | Description |
---|---|
TClientOptions |
IsConnected
Gets a value indicating whether the current client is connected.
Declaration
public bool IsConnected { get; }
Property Value
Type | Description |
---|---|
bool |
Logger
Gets the logger.
Declaration
protected ILogger<ClientManagerBaseUI<TClient, TClientOptions>> Logger { get; }
Property Value
Type | Description |
---|---|
ILogger<ClientManagerBaseUI<TClient, TClientOptions>> |
Methods
View SourceOnConnectionChanged()
Notifies the UI that properties may have changed.
Declaration
protected virtual void OnConnectionChanged()
OptionsUpdated(IDevice?, TClientOptions)
Notifies the client manager that options have been updated.
Declaration
protected void OptionsUpdated(IDevice? device, TClientOptions options)
Parameters
Type | Name | Description |
---|---|---|
IDevice | device | The options of the device to update. |
TClientOptions | options | The new updated options. |
TrySetCurrentOptions<T>(T, Func<TClientOptions, T, TClientOptions>)
Try to set a property in current options if available.
Declaration
protected void TrySetCurrentOptions<T>(T value, Func<TClientOptions, T, TClientOptions> set)
Parameters
Type | Name | Description |
---|---|---|
T | value | The value of the property to set. |
Func<TClientOptions, T, TClientOptions> | set | The action that sets the property. |
Type Parameters
Name | Description |
---|---|
T | The type of property to set. |