Class AutomationViewModelBase
The view model for a bot automation panel.
Inheritance
Inherited Members
Namespace: Phoenix.BotBrain
Assembly: Phoenix.Plugin.BotBrain.Shared.dll
Syntax
public abstract class AutomationViewModelBase : ViewModelBase, INotifyPropertyChanged, IDisposable
Constructors
View SourceAutomationViewModelBase(IServiceProvider, IEventAggregator?)
Initializes a new instance of the AutomationViewModelBase class.
Declaration
protected AutomationViewModelBase(IServiceProvider services, IEventAggregator? events = null)
Parameters
Type | Name | Description |
---|---|---|
IServiceProvider | services | The service provider used to log and send telemetry. |
IEventAggregator | events | The event aggregator. |
Fields
View SourceAllFileTypeFilter
The file type filter allowing all file extensions.
Declaration
public const string AllFileTypeFilter = "All Files (*.*)|*.*"
Field Value
Type | Description |
---|---|
string |
Properties
View SourceEventSubscriber
Gets the event subscriber.
Declaration
protected EventSubscriber EventSubscriber { get; }
Property Value
Type | Description |
---|---|
EventSubscriber |
Events
Gets the event aggregator.
Declaration
protected IEventAggregator Events { get; }
Property Value
Type | Description |
---|---|
IEventAggregator |
Methods
View SourceAddResourceDictionaryTo(FrameworkElement, string, Type?)
Adds a XAML ResourceDictionary file to the given control's Resources.
Declaration
protected static void AddResourceDictionaryTo(FrameworkElement control, string path, Type? type = null)
Parameters
Type | Name | Description |
---|---|---|
FrameworkElement | control | The control. |
string | path | The path to the resource dictionary. |
Type | type | A type in the same assembly as the resource dictionary. |
Dispose()
Removes all event handlers.
Declaration
public virtual void Dispose()
LoadResourceDictionary(string, Type?)
Loads a XAML ResourceDictionary file.
Declaration
protected static ResourceDictionary LoadResourceDictionary(string path, Type? type = null)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path to the resource dictionary. |
Type | type | A type in the same assembly as the resource dictionary. |
Returns
Type | Description |
---|---|
ResourceDictionary | A ResourceDictionary instance. |
PromptToOpenFile(string?, string?, bool, string?)
Prompts the user to open a file.
Declaration
protected static string? PromptToOpenFile(string? title = null, string? defaultExt = null, bool checkIfFileExists = true, string? filter = null)
Parameters
Type | Name | Description |
---|---|---|
string | title | The title displayed at the top of the prompt. |
string | defaultExt | The default extension. |
bool | checkIfFileExists | A check to display a warning if a file does not exist. |
string | filter | The filter for what files are displayed. |
Returns
Type | Description |
---|---|
string | The file, if it exists. |
PromptToSaveFile(string?, string?, string?)
Prompts the user to save a file.
Declaration
protected static string? PromptToSaveFile(string? title = null, string? defaultExt = null, string? filter = null)
Parameters
Type | Name | Description |
---|---|---|
string | title | The title displayed at the top of the prompt. |
string | defaultExt | The default extension. |
string | filter | The filter for what files are displayed. |
Returns
Type | Description |
---|---|
string | The path to the file the user selected, or null if canceled. |