Class QualityPassViewModel
The view model for a quality pass.
Inherited Members
Namespace: Phoenix.BotBrain.Overmind
Assembly: Phoenix.Plugin.BotBrain.Overmind.dll
Syntax
public class QualityPassViewModel : AutomationViewModelBase, INotifyPropertyChanged, IDisposable
Constructors
View SourceQualityPassViewModel(IOvermindHelper, Transient<DevicePoolViewModel>, ScenarioTreeViewModel, OvermindUIHelpers, IServiceProvider)
Initializes a new instance of the QualityPassViewModel class.
Declaration
public QualityPassViewModel(IOvermindHelper overmindHelper, Transient<DevicePoolViewModel> devicePool, ScenarioTreeViewModel scenarioTree, OvermindUIHelpers uiHelpers, IServiceProvider services)
Parameters
Type | Name | Description |
---|---|---|
IOvermindHelper | overmindHelper | The overmind helper. |
Transient<DevicePoolViewModel> | devicePool | The device pool view model. |
ScenarioTreeViewModel | scenarioTree | The scenario tree view model. |
OvermindUIHelpers | uiHelpers | The overmind UI helpers. |
IServiceProvider | services | The service provider used to log and send telemetry. |
Properties
View SourceAvailableSaveOptions
Gets the collection of available save options for the quality pass.
Declaration
public ICollection<string> AvailableSaveOptions { get; }
Property Value
Type | Description |
---|---|
ICollection<string> |
BrainUpdater
Gets the overmind brain updater.
Declaration
protected IOvermindUpdater BrainUpdater { get; }
Property Value
Type | Description |
---|---|
IOvermindUpdater |
CanStartQualityPass
Gets a value indicating whether or not the quality pass can start.
Declaration
public bool CanStartQualityPass { get; }
Property Value
Type | Description |
---|---|
bool |
DevicePool
Gets the device pool.
Declaration
public DevicePoolViewModel DevicePool { get; }
Property Value
Type | Description |
---|---|
DevicePoolViewModel |
FilePath
Gets the quality pass file path.
Declaration
public string? FilePath { get; }
Property Value
Type | Description |
---|---|
string |
HasUnsavedChanges
Gets a value indicating whether this quality pass has unsaved changes.
Declaration
public bool HasUnsavedChanges { get; }
Property Value
Type | Description |
---|---|
bool |
IsDirty
Gets a value indicating whether there are unsaved changes in this quality pass or its contents.
Declaration
public bool IsDirty { get; }
Property Value
Type | Description |
---|---|
bool |
IsPaused
Gets a value indicating whether or not the quality pass is paused.
Declaration
public bool IsPaused { get; }
Property Value
Type | Description |
---|---|
bool |
IsRunning
Gets a value indicating whether or not the quality pass is running.
Declaration
public bool IsRunning { get; }
Property Value
Type | Description |
---|---|
bool |
IsSaveAsSelected
Gets a value indicating whether or not the save-as option is selected.
Declaration
public bool IsSaveAsSelected { get; }
Property Value
Type | Description |
---|---|
bool |
LoadQualityPassFileCommand
Gets the command to choose a quality pass from a file.
Declaration
public DelegateCommand LoadQualityPassFileCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
Name
Gets the quality pass name.
Declaration
public string? Name { get; }
Property Value
Type | Description |
---|---|
string |
NumDevicesInPool
Gets how many devices are currently in the pool for the quality pass.
Declaration
public int NumDevicesInPool { get; }
Property Value
Type | Description |
---|---|
int |
NumDevicesRequired
Gets how many devices are required for the quality pass.
Declaration
public int NumDevicesRequired { get; }
Property Value
Type | Description |
---|---|
int |
OvermindTelemetryClient
Gets the overmind telemetry client.
Declaration
protected IOvermindTelemetryClient? OvermindTelemetryClient { get; }
Property Value
Type | Description |
---|---|
IOvermindTelemetryClient |
PauseCommand
Gets the command to pause the quality pass.
Declaration
public DelegateCommand PauseCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
SaveOrSaveAsQualityPassFileCommand
Gets the command to save or save-as the quality pass.
Declaration
public DelegateCommand<string> SaveOrSaveAsQualityPassFileCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<string> |
SaveQualityPassFileCommand
Gets the command to save the quality pass to a file.
Declaration
public DelegateCommand SaveQualityPassFileCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
SaveTooltip
Gets the tooltip for the button to save the quality pass.
Declaration
public string SaveTooltip { get; }
Property Value
Type | Description |
---|---|
string |
ScenarioTreeViewContext
Gets the selected item in the scenario tree view.
Declaration
public IScenarioTreeItem? ScenarioTreeViewContext { get; }
Property Value
Type | Description |
---|---|
IScenarioTreeItem |
Scenarios
Gets the scenario tree view.
Declaration
public ScenarioTreeViewModel Scenarios { get; }
Property Value
Type | Description |
---|---|
ScenarioTreeViewModel |
SelectedSaveImage
Gets the image to display for the selected save option.
Declaration
public string SelectedSaveImage { get; }
Property Value
Type | Description |
---|---|
string |
SelectedSaveOption
Gets or sets the selected save option for the quality pass.
Declaration
public string? SelectedSaveOption { get; set; }
Property Value
Type | Description |
---|---|
string |
SelectedScenario
Gets the selected scenario in the scenario tree view, or if a role is selected, returns its scenario.
Declaration
protected IRoleBasedScenarioViewModel? SelectedScenario { get; }
Property Value
Type | Description |
---|---|
IRoleBasedScenarioViewModel |
Serializer
Gets the overmind brain serializer.
Declaration
protected IOvermindSerializer Serializer { get; }
Property Value
Type | Description |
---|---|
IOvermindSerializer |
StartCommand
Gets the command to start the quality pass.
Declaration
public DelegateCommand StartCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
StartTooltip
Gets the tooltip for the button to start the quality pass.
Declaration
public string StartTooltip { get; }
Property Value
Type | Description |
---|---|
string |
StopCommand
Gets the command to stop the quality pass.
Declaration
public DelegateCommand StopCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
TelemetryClient
Gets the telemetry client.
Declaration
protected override ITelemetryClient? TelemetryClient { get; }
Property Value
Type | Description |
---|---|
ITelemetryClient |
Overrides
Methods
View SourceDispose()
Removes all event handlers.
Declaration
public override void Dispose()
Overrides
View SourceInitializeSerializerAsync()
Initializes the overmind serializer and loads runtime data for the quality pass.
Declaration
public Task InitializeSerializerAsync()
Returns
Type | Description |
---|---|
Task | A task. |
LoadByName(string)
Loads a quality pass by name.
Declaration
public void LoadByName(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The quality pass name. |
LoadFile(string)
Loads a quality pass from a file.
Declaration
public void LoadFile(string filePath)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | The file to load. |
LoadScenarios()
Loads the scenarios from the current quality pass to be displayed in the UI.
Declaration
public void LoadScenarios()
PromptToOptionallySaveChanges(string)
Prompts the user to optionally save changes to a file.
Declaration
public bool? PromptToOptionallySaveChanges(string customNote)
Parameters
Type | Name | Description |
---|---|---|
string | customNote | The custom note to appear in the prompt message. |
Returns
Type | Description |
---|---|
bool? | A value indicating whether a prompt was not canceled. |
Reset()
Resets the quality pass to a blank state.
Declaration
public void Reset()
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current object. |