Show / Hide Table of Contents

Class BotAutomationViewModel

The view model for a bot automation panel.

Inheritance
object
BindableBase
ViewModelBase
AutomationViewModelBase
AutomationViewModelBase<BotAutomationView>
BotAutomationViewModel
BotBrainAutomationViewModel
Implements
INotifyPropertyChanged
IDisposable
Inherited Members
AutomationViewModelBase<BotAutomationView>.Content
AutomationViewModelBase<BotAutomationView>.SelectedDevice
AutomationViewModelBase<BotAutomationView>.TelemetryClient
AutomationViewModelBase.AllFileTypeFilter
AutomationViewModelBase.Events
AutomationViewModelBase.EventSubscriber
AutomationViewModelBase.Dispose()
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.BotScripting.dll
Syntax
public class BotAutomationViewModel : AutomationViewModelBase<BotAutomationView>, INotifyPropertyChanged, IDisposable

Constructors

View Source

BotAutomationViewModel(IServiceProvider, BotAutomationView?)

Initializes a new instance of the BotAutomationViewModel class.

Declaration
public BotAutomationViewModel(IServiceProvider services, BotAutomationView? view = null)
Parameters
Type Name Description
IServiceProvider services

The service provider.

BotAutomationView view

The view for this view model.

Properties

View Source

AreBotDetailsExpanded

Gets or sets a value indicating whether or not the bot details are expanded.

Declaration
public bool AreBotDetailsExpanded { get; set; }
Property Value
Type Description
bool
View Source

BotFileExtension

Gets the file extension for bot files.

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

BotFileExtensionsForOpenDialog

Gets the file extensions to allow when opening bot files.

Declaration
protected virtual string BotFileExtensionsForOpenDialog { get; }
Property Value
Type Description
string
View Source

Bots

Gets the view model for managing bots.

Declaration
public TreeViewModel<IBotViewModel> Bots { get; }
Property Value
Type Description
TreeViewModel<IBotViewModel>
View Source

LoadBotFileCommand

Gets the command to load a bot from a file.

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

OpenFileDialogFileTypeFilter

Gets the file type filter to use for opening files.

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

PopoutSelectedBotCommand

Gets the command to pop out a bot in a new window.

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

SaveBotAsFileCommand

Gets the command to save a bot as a new file.

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

SelectedBot

Gets the currently selected bot.

Declaration
public IBotViewModel? SelectedBot { get; }
Property Value
Type Description
IBotViewModel

Methods

View Source

CanPopoutSelectedBot()

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

Declaration
protected virtual bool CanPopoutSelectedBot()
Returns
Type Description
bool

A bool.

View Source

CreateBotFromFile(string)

Creates a bot from a file.

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

The file path.

Returns
Type Description
IBotViewModel

The bot.

View Source

CreateBotFromString(string)

Creates a bot from a string.

Declaration
protected virtual IBotViewModel CreateBotFromString(string data)
Parameters
Type Name Description
string data

A string representation of a bot.

Returns
Type Description
IBotViewModel

The bot.

View Source

HandleDeviceSelected(DeviceCollectionChangeInfo)

Handles when the user's device selection changes.

Declaration
protected override void HandleDeviceSelected(DeviceCollectionChangeInfo changeInfo)
Parameters
Type Name Description
DeviceCollectionChangeInfo changeInfo

The change information.

Overrides
AutomationViewModelBase<BotAutomationView>.HandleDeviceSelected(DeviceCollectionChangeInfo)
View Source

LoadBotFile(string)

Loads a bot from a file.

Declaration
public virtual void LoadBotFile(string filepath)
Parameters
Type Name Description
string filepath

The file path.

View Source

PopoutSelectedBot()

Pops out the selected bot in a new window.

Declaration
protected virtual void PopoutSelectedBot()
View Source

PromptToLoadBotFile()

Prompts the user to load a bot from a file.

Declaration
protected virtual void PromptToLoadBotFile()
View Source

PromptToOpenBotFile()

Prompts the user to open a bot file.

Declaration
protected virtual string? PromptToOpenBotFile()
Returns
Type Description
string

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

View Source

PromptToSaveBotFile(IBotViewModel)

Prompts the user to save a bot file.

Declaration
protected virtual 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.

View Source

SaveBotAsFile()

Prompts the user to save a bot to a new file.

Declaration
protected virtual void SaveBotAsFile()

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