Show / Hide Table of Contents

Class CanvasViewModel

The view model for a canvas display of a quality pass.

Inheritance
object
BindableBase
ViewModelBase
AutomationViewModelBase
AutomationViewModelBase<CanvasView>
CanvasViewModel
Implements
INotifyPropertyChanged
IDisposable
Inherited Members
AutomationViewModelBase<CanvasView>.Content
AutomationViewModelBase<CanvasView>.SelectedDevice
AutomationViewModelBase<CanvasView>.TelemetryClient
AutomationViewModelBase<CanvasView>.HandleDeviceSelected(DeviceCollectionChangeInfo)
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.Overmind
Assembly: Phoenix.Plugin.BotBrain.Overmind.dll
Syntax
public class CanvasViewModel : AutomationViewModelBase<CanvasView>, INotifyPropertyChanged, IDisposable

Constructors

View Source

CanvasViewModel(CanvasView, QualityPassViewModel, IServiceProvider)

Initializes a new instance of the CanvasViewModel class.

Declaration
public CanvasViewModel(CanvasView view, QualityPassViewModel qualityPass, IServiceProvider services)
Parameters
Type Name Description
CanvasView view

The canvas view.

QualityPassViewModel qualityPass

The quality pass view model.

IServiceProvider services

The services provider.

Properties

View Source

CanvasHeight

Gets a value indicating the height of the canvas

Declaration
public double CanvasHeight { get; }
Property Value
Type Description
double
View Source

CanvasObjectScalerX

Gets a value indicating the X scale to apply to objects Using 1920x1080 as default design and scaling from there

Declaration
public double CanvasObjectScalerX { get; }
Property Value
Type Description
double
View Source

CanvasObjectScalerY

Gets a value indicating the Y scale to apply to objects Using 1920x1080 as default design and scaling from there

Declaration
public double CanvasObjectScalerY { get; }
Property Value
Type Description
double
View Source

CanvasWidth

Gets a value indicating the width of the canvas

Declaration
public double CanvasWidth { get; }
Property Value
Type Description
double
View Source

ClearActiveInfoCommand

Gets the command to clear the active info displayed

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

DisplayActiveInfoCommand

Gets the command to display information about the moused over object

Declaration
public DelegateCommand<CanvasObject> DisplayActiveInfoCommand { get; }
Property Value
Type Description
DelegateCommand<CanvasObject>
View Source

SelectedCanvasObject

Gets the selected canvas object.

Declaration
public object? SelectedCanvasObject { get; }
Property Value
Type Description
object
View Source

ShowActiveItemInfo

Gets a value indicating whether or not to display info on the moused over object

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

UpdateSelectedItemCommand

Gets the command to update the selected scenario/role/etc from the canvas

Declaration
public DelegateCommand<CanvasObject> UpdateSelectedItemCommand { get; }
Property Value
Type Description
DelegateCommand<CanvasObject>

Methods

View Source

ClearCanvas()

Clears the canvas of all children nodes

Declaration
public void ClearCanvas()
View Source

CreateOrGetOvermindNode()

Gets the main overmind node or creates it if necessary

Declaration
public CanvasObject CreateOrGetOvermindNode()
Returns
Type Description
CanvasObject

The overmind node

View Source

Dispose()

Removes all event handlers.

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

RebuildCanvasThreeTier(IScenarioTreeItem?)

Main method to build out the canvas with all associated nodes

Declaration
public void RebuildCanvasThreeTier(IScenarioTreeItem? selectedNode)
Parameters
Type Name Description
IScenarioTreeItem selectedNode

Item selected in the IScenarioTreeItem

View Source

ResetAndRebuildCanvas()

Resizes and rebuilds the canvas and all objects in it

Declaration
public void ResetAndRebuildCanvas()
View Source

SetSelectedItem(IScenarioTreeItem?)

Update the canvas to highlight whatever item is selected in the IScenarioTreeItem

Declaration
public void SetSelectedItem(IScenarioTreeItem? selected)
Parameters
Type Name Description
IScenarioTreeItem selected

The item in the IScenarioTreeItem that is selected

View Source

UpdateCanvasSize(double, double)

Updates the sizes of the canvas to ensure we have enough room for all elements

Declaration
public void UpdateCanvasSize(double canvasActualWidth, double canvasActualHeight)
Parameters
Type Name Description
double canvasActualWidth

The width to set the canvas width to

double canvasActualHeight

The height to set the canvas height to

View Source

UpdateCanvasState(bool)

Updates the size changed timer and checks to see if the canvas needs to be rebuilt or cleared

Declaration
public void UpdateCanvasState(bool canvasShown)
Parameters
Type Name Description
bool canvasShown

Boolean value indicating whether the canvas is in view

View Source

UpdateTimerStatus(bool)

Updates the timer to either disable or enable it

Declaration
public void UpdateTimerStatus(bool status)
Parameters
Type Name Description
bool status

Boolean to change the enabled status to

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