Class ScenarioTreeViewModel
The tree view model containing scenarios and roles.
Implements
Inherited Members
Namespace: Phoenix.BotBrain.Overmind
Assembly: Phoenix.Plugin.BotBrain.Overmind.dll
Syntax
public class ScenarioTreeViewModel : TreeViewModel<IScenarioTreeItem>, INotifyPropertyChanged, IReadOnlyCollection<IScenarioTreeItem>, IEnumerable<IScenarioTreeItem>, IEnumerable, INotifyCollectionChanged, ICanConsumeFiles
Constructors
View SourceScenarioTreeViewModel(IEventAggregator, IServiceProvider)
Initializes a new instance of the ScenarioTreeViewModel class.
Declaration
public ScenarioTreeViewModel(IEventAggregator eventAggregator, IServiceProvider services)
Parameters
Type | Name | Description |
---|---|---|
IEventAggregator | eventAggregator | The event aggregator. |
IServiceProvider | services | The service provider for creating items. |
Properties
View SourceAllItems
Gets an enumeration of all items in the tree.
Declaration
public IEnumerable<IScenarioTreeItem> AllItems { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IScenarioTreeItem> |
SwapScenarioAboveCommand
Gets the command to swap the selected scenario with the one above (or before) it.
Declaration
public DelegateCommand SwapScenarioAboveCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
SwapScenarioBelowCommand
Gets the command to swap the selected scenario with the one below (or after) it.
Declaration
public DelegateCommand SwapScenarioBelowCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
Methods
View SourceClearAllItems()
Removes all items.
Declaration
public override void ClearAllItems()
Overrides
View SourceClearAllItemsWithoutPrompting()
Clears all of the items without prompting the user.
Declaration
public void ClearAllItemsWithoutPrompting()
ConsumeFiles(string[])
Consumes the given files.
Declaration
public void ConsumeFiles(string[] files)
Parameters
Type | Name | Description |
---|---|---|
string[] | files | An array of files. |
RemoveItem(IScenarioTreeItem?)
Removes the given item.
Declaration
public override void RemoveItem(IScenarioTreeItem? item)
Parameters
Type | Name | Description |
---|---|---|
IScenarioTreeItem | item | The item. |