Interface IBotViewModel
A view model for a bot.
Namespace: Phoenix.BotBrain
Assembly: Phoenix.Plugin.BotBrain.BotScripting.dll
Syntax
public interface IBotViewModel : INotifyPropertyChanged, IOnSelected
Properties
View SourceAllListViewChoices
Gets all possible titles for the list view, if the bot has many component types, such as actions, urges, and/or considerations.
Declaration
IEnumerable<string>? AllListViewChoices { get; }
Property Value
Type | Description |
---|---|
IEnumerable<string> |
CanResume
Gets a value indicating whether or not the bot can be resumed.
Declaration
bool CanResume { get; }
Property Value
Type | Description |
---|---|
bool |
CanSave
Gets a value indicating whether or not the bot can be saved to its current location.
Declaration
bool CanSave { get; }
Property Value
Type | Description |
---|---|
bool |
CanStart
Gets a value indicating whether or not the bot can be started.
Declaration
bool CanStart { get; }
Property Value
Type | Description |
---|---|
bool |
CanStop
Gets a value indicating whether or not the bot can be stopped.
Declaration
bool CanStop { get; }
Property Value
Type | Description |
---|---|
bool |
DetailsTitle
Gets the title of the primary view for controlling this bot.
Declaration
string DetailsTitle { get; }
Property Value
Type | Description |
---|---|
string |
FilePath
Gets or sets the bot's file path.
Declaration
string? FilePath { get; set; }
Property Value
Type | Description |
---|---|
string |
IsRunning
Gets a value indicating whether or not the bot is running.
Declaration
bool IsRunning { get; }
Property Value
Type | Description |
---|---|
bool |
ListDetailsTitle
Gets the title for presenting details about the selected list view item.
Declaration
string? ListDetailsTitle { get; }
Property Value
Type | Description |
---|---|
string |
ListViewContext
Gets the data context for the list view presenting actions, urges, or other components.
Declaration
IListViewModel? ListViewContext { get; }
Property Value
Type | Description |
---|---|
IListViewModel |
ListViewTitle
Gets the title for the list view.
Declaration
string? ListViewTitle { get; }
Property Value
Type | Description |
---|---|
string |
Name
Gets or sets the bot's name.
Declaration
string? Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Status
Gets the bot's status.
Declaration
string Status { get; }
Property Value
Type | Description |
---|---|
string |
Methods
View SourceIsRunningOn(IDevice)
Gets a value indicating whether or not the bot is running on the device.
Declaration
bool IsRunningOn(IDevice device)
Parameters
Type | Name | Description |
---|---|---|
IDevice | device | The device. |
Returns
Type | Description |
---|---|
bool | True if it is running on the device. |
Load(string)
Loads a serialized representation of a bot.
Declaration
void Load(string data)
Parameters
Type | Name | Description |
---|---|---|
string | data | The data to load. |
OnCanExecuteChanged()
Handles UI updates when the bot's status changes.
Declaration
void OnCanExecuteChanged()
OnDeviceSelected(DeviceCollectionChangeInfo)
Handles when the user's device selection changes.
Declaration
void OnDeviceSelected(DeviceCollectionChangeInfo changeInfo)
Parameters
Type | Name | Description |
---|---|---|
DeviceCollectionChangeInfo | changeInfo | The change information. |
ResumeAsync()
Resumes the bot.
Declaration
Task ResumeAsync()
Returns
Type | Description |
---|---|
Task | A task. |
Save()
Saves the bot.
Declaration
void Save()
StartAsync()
Starts the bot.
Declaration
Task StartAsync()
Returns
Type | Description |
---|---|
Task | A task. |
StopAsync()
Stops the bot.
Declaration
Task StopAsync()
Returns
Type | Description |
---|---|
Task | A task. |
Events
View SourceIsRunningChanged
Occurs when the IsRunning property changes.
Declaration
event EventHandler IsRunningChanged
Event Type
Type | Description |
---|---|
EventHandler |