Class RoleBasedScenarioViewModel
Represents a role-based scenario.
Inheritance
Implements
Inherited Members
Namespace: Phoenix.BotBrain.Overmind
Assembly: Phoenix.Plugin.BotBrain.Overmind.dll
Syntax
public class RoleBasedScenarioViewModel : DetailsViewModel<IRoleBasedScenario>, INotifyPropertyChanged, IOnSelected, IDisposable, IRoleBasedScenarioViewModel, IScenarioTreeItem
Constructors
View SourceRoleBasedScenarioViewModel(IEventAggregator, IParameterFactory, IServiceProvider, OvermindUIHelpers, IOvermindEditor, QualityPassViewModel)
Initializes a new instance of the RoleBasedScenarioViewModel class.
Declaration
public RoleBasedScenarioViewModel(IEventAggregator eventAggregator, IParameterFactory parameterFactory, IServiceProvider services, OvermindUIHelpers uiHelpers, IOvermindEditor editor, QualityPassViewModel qualityPass)
Parameters
| Type | Name | Description |
|---|---|---|
| IEventAggregator | eventAggregator | The event aggregator. |
| IParameterFactory | parameterFactory | The parameter factory. |
| IServiceProvider | services | The service provider used for construction. |
| OvermindUIHelpers | uiHelpers | The overmind UI helpers. |
| IOvermindEditor | editor | The overmind editor. |
| QualityPassViewModel | qualityPass | The quality pass. |
Properties
View SourceAreRequirementsEditable
Gets a value indicating whether or not requirements can be edited.
Declaration
public bool AreRequirementsEditable { get; }
Property Value
| Type | Description |
|---|---|
| bool |
AvailableRequirements
Gets the available requirements.
Declaration
public ObservableCollection<RequirementInfo> AvailableRequirements { get; }
Property Value
| Type | Description |
|---|---|
| ObservableCollection<RequirementInfo> |
CanEdit
Gets a value indicating whether or not parameters are editable.
Declaration
protected override bool CanEdit { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
View SourceCreateRequirementCommand
Gets the command to create a requirement.
Declaration
public DelegateCommand<RequirementInfo> CreateRequirementCommand { get; }
Property Value
| Type | Description |
|---|---|
| DelegateCommand<RequirementInfo> |
FailedMessage
Gets the failed message.
Declaration
public string? FailedMessage { get; }
Property Value
| Type | Description |
|---|---|
| string |
FinishedTime
Gets the timestamp of the scenario when it finished.
Declaration
public DateTime FinishedTime { get; }
Property Value
| Type | Description |
|---|---|
| DateTime |
HasFinished
Gets a value indicating whether the scenario has finished.
Declaration
public bool HasFinished { get; }
Property Value
| Type | Description |
|---|---|
| bool |
HasStarted
Gets a value indicating whether the scenario has started.
Declaration
public bool HasStarted { get; }
Property Value
| Type | Description |
|---|---|
| bool |
HasUnsavedChanges
Gets a value indicating whether this scenario has unsaved changes.
Declaration
public bool HasUnsavedChanges { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsEditingRequirements
Gets or sets a value indicating whether or not requirements are being edited.
Declaration
public bool IsEditingRequirements { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Name
Gets the scenario name.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
QualityPass
Gets the quality pass.
Declaration
public QualityPassViewModel QualityPass { get; }
Property Value
| Type | Description |
|---|---|
| QualityPassViewModel |
RemoveRequirementCommand
Gets the command to remove a requirement.
Declaration
public DelegateCommand<IRequirementViewModel> RemoveRequirementCommand { get; }
Property Value
| Type | Description |
|---|---|
| DelegateCommand<IRequirementViewModel> |
Requirements
Gets the collection of requirements.
Declaration
public ObservableCollection<IRequirementViewModel> Requirements { get; }
Property Value
| Type | Description |
|---|---|
| ObservableCollection<IRequirementViewModel> |
Roles
Gets the collection of roles.
Declaration
public ObservableCollection<IRoleViewModel> Roles { get; }
Property Value
| Type | Description |
|---|---|
| ObservableCollection<IRoleViewModel> |
Scenario
Gets or sets the scenario.
Declaration
public IRoleBasedScenario Scenario { get; set; }
Property Value
| Type | Description |
|---|---|
| IRoleBasedScenario |
StartTime
Gets the timestamp of the scenario when it started.
Declaration
public DateTime StartTime { get; }
Property Value
| Type | Description |
|---|---|
| DateTime |
Status
Gets the scenario status.
Declaration
public ScenarioStatus Status { get; }
Property Value
| Type | Description |
|---|---|
| ScenarioStatus |
SummaryMessage
Gets the finished message.
Declaration
public string SummaryMessage { get; }
Property Value
| Type | Description |
|---|---|
| string |
Title
Gets a descriptive title for displaying details about the item.
Declaration
public string Title { get; }
Property Value
| Type | Description |
|---|---|
| string |
ToggleEditRequirementsCommand
Gets the command to toggle editing requirements.
Declaration
public DelegateCommand ToggleEditRequirementsCommand { get; }
Property Value
| Type | Description |
|---|---|
| DelegateCommand |
Methods
View SourceAddRole(IRole)
Adds a role to the scenario.
Declaration
public void AddRole(IRole role)
Parameters
| Type | Name | Description |
|---|---|---|
| IRole | role | The role to add. |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
OnParameterChanged(string)
Called when a parameter value changes.
Declaration
protected override void OnParameterChanged(string parameterName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parameterName | The parameter name. |
Overrides
View SourceOnSelected(object)
Occurs when the item is selected.
Declaration
public override void OnSelected(object sender)
Parameters
| Type | Name | Description |
|---|---|---|
| object | sender | The sender. |
Overrides
View SourceOnStatusChanged(ScenarioStatusChangedEventArgs)
Updates the scenario status in the UI.
Declaration
public void OnStatusChanged(ScenarioStatusChangedEventArgs statusChanged)
Parameters
| Type | Name | Description |
|---|---|---|
| ScenarioStatusChangedEventArgs | statusChanged | The status changed event args. |
RemoveRole(IRoleViewModel)
Removes a role from the scenario.
Declaration
public void RemoveRole(IRoleViewModel role)
Parameters
| Type | Name | Description |
|---|---|---|
| IRoleViewModel | role | The role view model to remove. |