Show / Hide Table of Contents

Class CompassViewModel

Visualization using compass to help testers navigate to objects.

Inheritance
System.Object
CompassViewModel
Implements
System.IDisposable
Namespace: Phoenix.Controls.Compass
Assembly: Phoenix.Controls.Compass.dll
Syntax
public class CompassViewModel : BindableBase, IDisposable

Properties

View Source

AdditionalObjectTypes

Gets additional object types to appear in the available object type list. (Recommendations and not GST sources should add types here). Note: key should be the same as the key used in CompassObjectViewModelSets.

Declaration
public Dictionary<string, List<CompassObjectType>> AdditionalObjectTypes { get; }
Property Value
Type Description
System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.List<CompassObjectType>>
View Source

AvailableObjectTypes

Gets the collection of currently available object types that can be shown on the compass.

Declaration
public ObservableCollection<CompassObjectType> AvailableObjectTypes { get; }
Property Value
Type Description
System.Collections.ObjectModel.ObservableCollection<CompassObjectType>
View Source

BackLeftObjects

Gets the back left objects.

Declaration
public ObservableCollection<CompassQueueObject> BackLeftObjects { get; }
Property Value
Type Description
System.Collections.ObjectModel.ObservableCollection<CompassQueueObject>
View Source

BackRightObjects

Gets the back right objects.

Declaration
public ObservableCollection<CompassQueueObject> BackRightObjects { get; }
Property Value
Type Description
System.Collections.ObjectModel.ObservableCollection<CompassQueueObject>
View Source

ColorList

Gets or sets an array of system colors to be used by the UI as a drop down for color selection.

Declaration
public static Array ColorList { get; set; }
Property Value
Type Description
System.Array
View Source

CompassFilters

Gets the collection of filter objects for the filter table.

Declaration
public ObservableCollection<CompassFilter> CompassFilters { get; }
Property Value
Type Description
System.Collections.ObjectModel.ObservableCollection<CompassFilter>
View Source

CompassObjectViewModels

Gets the compass object view models.

Declaration
public ObservableCollection<CompassObjectViewModel> CompassObjectViewModels { get; }
Property Value
Type Description
System.Collections.ObjectModel.ObservableCollection<CompassObjectViewModel>
View Source

CompassObjectViewModelSets

Gets a dictionary of objects from various compass requests and recommendations.

Declaration
public Dictionary<string, List<CompassObjectViewModel>> CompassObjectViewModelSets { get; }
Property Value
Type Description
System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.List<CompassObjectViewModel>>
View Source

CompassSettings

Gets the compass settings for this compass.

Declaration
public CompassSettings CompassSettings { get; }
Property Value
Type Description
CompassSettings
View Source

Device

Gets the device associated with this compass.

Declaration
public IDevice Device { get; }
Property Value
Type Description
IDevice
View Source

DueEastValue

Gets or sets the East directional offset value in degrees.

Declaration
public int DueEastValue { get; set; }
Property Value
Type Description
System.Int32
View Source

Enabled

Gets or sets a value indicating whether the compass should currently be visible.

Declaration
public bool Enabled { get; set; }
Property Value
Type Description
System.Boolean
View Source

GameStateManager

Gets the game state manager for this compass.

Declaration
public CompassGameStateManager GameStateManager { get; }
Property Value
Type Description
CompassGameStateManager
View Source

HeightBuffer

Gets or sets the height buffer of the compass, updates the setting.

Declaration
public int HeightBuffer { get; set; }
Property Value
Type Description
System.Int32
View Source

IndicatorMaxDistance

Gets or sets the indicator maximum distance of the compass, updates the setting.

Declaration
public int IndicatorMaxDistance { get; set; }
Property Value
Type Description
System.Int32
View Source

IndicatorMinDistance

Gets or sets the indicator minimum distance of the compass, updates the setting.

Declaration
public int IndicatorMinDistance { get; set; }
Property Value
Type Description
System.Int32
View Source

InternalGameStateReconnectDelay

Gets the compass's GST reconnect delay based on the refresh string and the time span type. Used in xaml.

Declaration
public TimeSpan? InternalGameStateReconnectDelay { get; }
Property Value
Type Description
System.Nullable<System.TimeSpan>
View Source

InternalGameStateReconnectDelayTimeSpanString

Gets or sets the current the string representing the reconnect delay for the compass's GST. Used in xaml.

Declaration
public string InternalGameStateReconnectDelayTimeSpanString { get; set; }
Property Value
Type Description
System.String
View Source

InternalGameStateReconnectDelayTimeSpanType

Gets or sets the current the string representing the reconnect delay for the compass's GST. Used in xaml.

Declaration
public TimeSpanType InternalGameStateReconnectDelayTimeSpanType { get; set; }
Property Value
Type Description
TimeSpanType
View Source

InternalGameStateUpdateRate

Gets the compass's GST actual refresh rate based on the refresh string and the time span type. Used in xaml.

Declaration
public TimeSpan? InternalGameStateUpdateRate { get; }
Property Value
Type Description
System.Nullable<System.TimeSpan>
View Source

InternalGameStateUpdateRateTimeSpanString

Gets or sets the current the string representing the refresh rate for the compass's GST. Used in xaml.

Declaration
public string InternalGameStateUpdateRateTimeSpanString { get; set; }
Property Value
Type Description
System.String
View Source

InternalGameStateUpdateRateTimeSpanType

Gets or sets the current the string representing the refresh rate for the compass's GST. Used in xaml.

Declaration
public TimeSpanType InternalGameStateUpdateRateTimeSpanType { get; set; }
Property Value
Type Description
TimeSpanType
View Source

IsVisible

Gets a value indicating whether the compass is visible.

Declaration
public bool IsVisible { get; }
Property Value
Type Description
System.Boolean
View Source

LengthScaleFactor

Gets or sets the scale for the length of the compass.

Declaration
public float LengthScaleFactor { get; set; }
Property Value
Type Description
System.Single
View Source

PlayerGameObject

Gets or sets the player game object.

Declaration
public PlayerGameObject PlayerGameObject { get; set; }
Property Value
Type Description
PlayerGameObject
View Source

TitleName

Gets or sets the title name associated with this compass.

Declaration
public string TitleName { get; set; }
Property Value
Type Description
System.String
View Source

TypeColorChangeOccurred

Gets or sets a value indicating whether a type color change has occurred.

Declaration
public bool TypeColorChangeOccurred { get; set; }
Property Value
Type Description
System.Boolean
View Source

TypeEnabledStateChanged

Gets or sets a value indicating whether a type's enabled state changed.

Declaration
public bool TypeEnabledStateChanged { get; set; }
Property Value
Type Description
System.Boolean
View Source

VisibleWhenEmpty

Gets or sets a value indicating whether the compass should be visible if it is empty.

Declaration
public bool VisibleWhenEmpty { get; set; }
Property Value
Type Description
System.Boolean

Methods

View Source

AddNewFilter(String, String, IEnumerable<String>)

Adds a new filter to the filter table for the compass.

Declaration
public void AddNewFilter(string filterName, string filterCategoryName, IEnumerable<string> filterEntries)
Parameters
Type Name Description
System.String filterName

The name of the filter object.

System.String filterCategoryName

The name of the filter type for this filter object.

System.Collections.Generic.IEnumerable<System.String> filterEntries

The collection of filter items for the given filter type.

View Source

AddObjects(List<CompassGameObject>, String, String, Boolean, Boolean)

Creates compass object view models based on the given compass game object list and adds them to the sets of Compass Object VM's.

Declaration
public void AddObjects(List<CompassGameObject> cgoList, string dictionaryKey, string compassSourceName, bool extractAndAddObjectTypes = false, bool enableTypesInCompassByDefault = true)
Parameters
Type Name Description
System.Collections.Generic.List<CompassGameObject> cgoList

A list of compass game objects.

System.String dictionaryKey

The key to use for adding list of object to a dictionary.

System.String compassSourceName

Name of the source this data is coming from to keep type name within object unique. (Ex. Recommendation Name).

System.Boolean extractAndAddObjectTypes

Extract object types and add them to the object type list.

System.Boolean enableTypesInCompassByDefault

If adding object types specify if they should start enabled.

View Source

CancelGameStateUpdateLoop()

Cancels the update loop for checking for new game state data.

Declaration
public void CancelGameStateUpdateLoop()
View Source

CombineCompassObjectViewModelSets()

Combine the compass objects in the dictionary to display on the compass.

Declaration
public void CombineCompassObjectViewModelSets()
View Source

Create(String, IPhoenixLogger, String, String, IDevice, ICompassGameStateClient)

Creates a compass view model and sets up the game state data if any.

Declaration
public static async Task<CompassViewModel> Create(string settingsName, IPhoenixLogger logger, string loggerPrefix, string titleName = null, IDevice device = null, ICompassGameStateClient gameStateClient = null)
Parameters
Type Name Description
System.String settingsName

Title Name or specific name for the settings of this compass.

IPhoenixLogger logger

The logger.

System.String loggerPrefix

The prefix to use when logging so the output can be seen in the same location/color as it's parent's log messages.

System.String titleName

The title name if there is one.

IDevice device

The device information.

ICompassGameStateClient gameStateClient

The compass game state client if one exists.

Returns
Type Description
System.Threading.Tasks.Task<CompassViewModel>

The created Compass View Model.

View Source

Dispose()

Declaration
public void Dispose()
View Source

ExtractAndAddObjectTypes(List<CompassGameObject>, String, String, Boolean)

Creates a list of object types based on a list of compass game objects and adds it to the Additional Object Types list.

Declaration
public void ExtractAndAddObjectTypes(List<CompassGameObject> cgoList, string dictionaryKey, string compassSourceName, bool enableTypesInCompassByDefault = true)
Parameters
Type Name Description
System.Collections.Generic.List<CompassGameObject> cgoList

A list of compass game objects.

System.String dictionaryKey

The key to use for adding list of types to a dictionary.

System.String compassSourceName

Name of the source this data is coming from to keep types unique. (Ex. Recommendation Name).

System.Boolean enableTypesInCompassByDefault

When type is first added to the list set whether it is enabled (shown on compass) to start.

View Source

InitializeCompassObjectViewModelSet(String)

Initializes a new entry into the dictionary of compass view models.

Declaration
public void InitializeCompassObjectViewModelSet(string keyToAdd)
Parameters
Type Name Description
System.String keyToAdd

Key to use for adding a new entry in to the dictionary.

View Source

NotifyChangesAndSaveSettings()

If a setting has changed when settings were applied, update objects and save settings.

Declaration
public void NotifyChangesAndSaveSettings()
View Source

RefreshCompass()

Refreshes the compass's object types and objects.

Declaration
public async void RefreshCompass()
View Source

RemoveCompassObjectViewModelSet(String)

Removes a set based on the given key.

Declaration
public void RemoveCompassObjectViewModelSet(string keyToRemove)
Parameters
Type Name Description
System.String keyToRemove

The key of the set to remove.

View Source

RemoveCompassObjectViewModelSets(List<CompassObjectType>)

Removes sets that were added via game state data based on keys of the title name and the game state type.

Declaration
public void RemoveCompassObjectViewModelSets(List<CompassObjectType> typesToRemove)
Parameters
Type Name Description
System.Collections.Generic.List<CompassObjectType> typesToRemove

List of types of objects to be removed.

View Source

RemoveCompassObjectViewModelSets(List<String>)

Removes sets based on the given list of keys to remove.

Declaration
public void RemoveCompassObjectViewModelSets(List<string> keysToRemove)
Parameters
Type Name Description
System.Collections.Generic.List<System.String> keysToRemove

Keys to represent which sets should be removed.

View Source

Shutdown()

Ensures any compass threads/tasks are cancelled.

Declaration
public void Shutdown()
View Source

UpdateAvailableObjectTypes()

Updates the collection of available objects by combining game state types and additional object types (Ex. from recommendations).

Declaration
public async Task UpdateAvailableObjectTypes()
Returns
Type Description
System.Threading.Tasks.Task

A Task.

View Source

UpdatePlayerGameObject(PlayerGameObject)

Updates the player data if not using player data from GST.

Declaration
public void UpdatePlayerGameObject(PlayerGameObject playerGameObject)
Parameters
Type Name Description
PlayerGameObject playerGameObject

The updated player object.

Implements

System.IDisposable
  • View Source
In This Article
Back to top Generated by DocFX