Show / Hide Table of Contents

Class BotBrainAutomationViewModel

The view model for a bot brain automation panel.

Inheritance
object
BindableBase
ViewModelBase
AutomationViewModelBase
AutomationViewModelBase<BotAutomationView>
BotAutomationViewModel
BotBrainAutomationViewModel
BotBrainAutomationSection
Implements
INotifyPropertyChanged
IDisposable
Inherited Members
BotAutomationViewModel.SelectedBot
BotAutomationViewModel.Bots
BotAutomationViewModel.AreBotDetailsExpanded
BotAutomationViewModel.LoadBotFileCommand
BotAutomationViewModel.SaveBotAsFileCommand
BotAutomationViewModel.PopoutSelectedBotCommand
BotAutomationViewModel.BotFileExtension
BotAutomationViewModel.OpenFileDialogFileTypeFilter
BotAutomationViewModel.LoadBotFile(string)
BotAutomationViewModel.PromptToOpenBotFile()
BotAutomationViewModel.CreateBotFromString(string)
BotAutomationViewModel.PromptToLoadBotFile()
BotAutomationViewModel.SaveBotAsFile()
BotAutomationViewModel.PopoutSelectedBot()
BotAutomationViewModel.HandleDeviceSelected(DeviceCollectionChangeInfo)
AutomationViewModelBase<BotAutomationView>.Content
AutomationViewModelBase<BotAutomationView>.SelectedDevice
AutomationViewModelBase<BotAutomationView>.TelemetryClient
AutomationViewModelBase.AllFileTypeFilter
AutomationViewModelBase.Events
AutomationViewModelBase.EventSubscriber
AutomationViewModelBase.PromptToOpenFile(string, string, bool, string)
AutomationViewModelBase.PromptToSaveFile(string, string, string)
AutomationViewModelBase.LoadResourceDictionary(string, Type)
AutomationViewModelBase.AddResourceDictionaryTo(FrameworkElement, string, Type)
ViewModelBase.Services
ViewModelBase.Logger
ViewModelBase.LogVerboseException(Exception, string, string)
BindableBase.SetProperty<T>(ref T, T, string)
BindableBase.SetProperty<T>(ref T, T, Action, string)
BindableBase.RaisePropertyChanged(string)
BindableBase.OnPropertyChanged(PropertyChangedEventArgs)
BindableBase.PropertyChanged
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Phoenix.BotBrain
Assembly: Phoenix.Plugin.BotBrain.BrainEditor.dll
Syntax
public class BotBrainAutomationViewModel : BotAutomationViewModel, INotifyPropertyChanged, IDisposable

Constructors

View Source

BotBrainAutomationViewModel(IServiceProvider, IBrainHelper?, BotBrainLogForwarder?, BotBrainUIHelpers?)

Initializes a new instance of the BotBrainAutomationViewModel class.

Declaration
public BotBrainAutomationViewModel(IServiceProvider services, IBrainHelper? brainHelper = null, BotBrainLogForwarder? logForwarder = null, BotBrainUIHelpers? uiHelpers = null)
Parameters
Type Name Description
IServiceProvider services

The service provider.

IBrainHelper brainHelper

The brain helper.

BotBrainLogForwarder logForwarder

The log forwarder.

BotBrainUIHelpers uiHelpers

The bot brain UI helpers.

Fields

View Source

DefaultBotBrainOutputFolder

The default output folder for bot brain resources.

Declaration
public const string DefaultBotBrainOutputFolder = "BotBrain"
Field Value
Type Description
string

Properties

View Source

AreBotAndBrainFileExtensionsIdentical

Gets a value indicating whether or not bots and brains use the same file extension.

Declaration
protected bool AreBotAndBrainFileExtensionsIdentical { get; }
Property Value
Type Description
bool
View Source

AvailableBrains

Gets the list of available brains.

Declaration
public ObservableCollection<string> AvailableBrains { get; }
Property Value
Type Description
ObservableCollection<string>
View Source

AvailableBrainsLastLoaded

Gets or sets the time when available brains were last loaded.

Declaration
protected DateTime AvailableBrainsLastLoaded { get; set; }
Property Value
Type Description
DateTime
View Source

BotBrainFolderPath

Gets the bot brain folder path.

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

BotFileExtensionsForOpenDialog

Gets the file extensions to allow when opening bot files.

Declaration
protected override string BotFileExtensionsForOpenDialog { get; }
Property Value
Type Description
string
Overrides
BotAutomationViewModel.BotFileExtensionsForOpenDialog
View Source

BrainFileExtension

Gets the brain file extension.

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

BrainListRefreshTime

Gets the amount of time before the list of available brains can be refreshed.

Declaration
protected virtual TimeSpan BrainListRefreshTime { get; }
Property Value
Type Description
TimeSpan
View Source

BrainLoop

Gets the brain loop.

Declaration
protected BotBrainLoop BrainLoop { get; }
Property Value
Type Description
BotBrainLoop
View Source

BrainTick

Gets the update frequency for bot brains.

Declaration
protected virtual TimeSpan BrainTick { get; }
Property Value
Type Description
TimeSpan
View Source

LoadAvailableBrainsCommand

Gets the command to load the list of available brains.

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

LoadBrainCommand

Gets the command to load a brain.

Declaration
public DelegateCommand<object> LoadBrainCommand { get; }
Property Value
Type Description
DelegateCommand<object>
View Source

Serializer

Gets the brain serializer.

Declaration
protected IBrainSerializer Serializer { get; }
Property Value
Type Description
IBrainSerializer

Methods

View Source

CanPopoutSelectedBot()

Determines whether or not the selected bot can be popped out in a new window.

Declaration
protected override bool CanPopoutSelectedBot()
Returns
Type Description
bool

A bool.

Overrides
BotAutomationViewModel.CanPopoutSelectedBot()
View Source

CreateBotBrainViewModel(string?)

Creates a brain view model.

Declaration
protected virtual IBotBrainViewModel CreateBotBrainViewModel(string? name = null)
Parameters
Type Name Description
string name

The brain name.

Returns
Type Description
IBotBrainViewModel

The brain view model.

View Source

CreateBotFromFile(string)

Creates a bot from a file.

Declaration
protected override IBotViewModel CreateBotFromFile(string filepath)
Parameters
Type Name Description
string filepath

The file path.

Returns
Type Description
IBotViewModel

The bot.

Overrides
BotAutomationViewModel.CreateBotFromFile(string)
View Source

Dispose()

Removes all event handlers.

Declaration
public override void Dispose()
Overrides
AutomationViewModelBase.Dispose()
View Source

LoadAvailableBrains()

Loads the list of available brains.

Declaration
protected virtual Task LoadAvailableBrains()
Returns
Type Description
Task

A Task representing the asynchronous operation.

View Source

PromptToSaveBotFile(IBotViewModel)

Prompts the user to save a bot file.

Declaration
protected override string? PromptToSaveBotFile(IBotViewModel bot)
Parameters
Type Name Description
IBotViewModel bot

The bot being saved.

Returns
Type Description
string

The path to the file the user selected, or null if canceled.

Overrides
BotAutomationViewModel.PromptToSaveBotFile(IBotViewModel)

Implements

INotifyPropertyChanged
IDisposable

Extension Methods

INotifyPropertyChangedExtensions.OnPropertyChanged(INotifyPropertyChanged, string, Action)
INotifyPropertyChangedExtensions.OnPropertyChanged(INotifyPropertyChanged, string, Action<object?, string>)
INotifyPropertyChangedExtensions.OnPropertyChangedUntil(INotifyPropertyChanged, string, Func<bool>)
INotifyPropertyChangedExtensions.OnPropertyChangedUntil(INotifyPropertyChanged, string, Func<object?, string, bool>)
  • View Source
In this article
Back to top Generated by DocFX