Class FunctionViewModel
A base class for objects of which the properties must be observable.
Inherited Members
Namespace: MOSAIC.ViewModels.SignalProcessing
Assembly: MOSAIC.dll
Syntax
public class FunctionViewModel : ObservableObject, INotifyPropertyChanged, INotifyPropertyChanging, IDisposable
Constructors
FunctionViewModel(Function)
Declaration
public FunctionViewModel(Function function)
Parameters
| Type | Name | Description |
|---|---|---|
| Function | function |
Fields
_function
Declaration
private readonly Function _function
Field Value
| Type | Description |
|---|---|
| Function |
_showParam1
Gets whether Param1 is used by the current function type.
Declaration
[ObservableProperty]
[NotifyPropertyChangedFor("Param1Label")]
private bool _showParam1
Field Value
| Type | Description |
|---|---|
| bool |
_showParam2
Gets whether Param2 is used by the current function type.
Declaration
[ObservableProperty]
[NotifyPropertyChangedFor("Param2Label")]
private bool _showParam2
Field Value
| Type | Description |
|---|---|
| bool |
Properties
Function
Declaration
public Function Function { get; }
Property Value
| Type | Description |
|---|---|
| Function |
FunctionTypes
Available function types for the dropdown.
Declaration
public IReadOnlyList<string> FunctionTypes { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<string> |
Param1Label
Label for Param1 based on function type.
Declaration
public string Param1Label { get; }
Property Value
| Type | Description |
|---|---|
| string |
Param2Label
Label for Param2 based on function type.
Declaration
public string Param2Label { get; }
Property Value
| Type | Description |
|---|---|
| string |
ShowParam1
Gets whether Param1 is used by the current function type.
Declaration
[ExcludeFromCodeCoverage]
public bool ShowParam1 { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
ShowParam2
Gets whether Param2 is used by the current function type.
Declaration
[ExcludeFromCodeCoverage]
public bool ShowParam2 { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Viz
All visualization monitors (Scope + Spider + Heatmap) in one bundle. Bind in XAML with: <viz:VisualizationPanel Source="{Binding Viz}" /> Feed from the model with: _viewModel.Viz.Feed(outputVector);
Declaration
public BlockVisualization Viz { get; }
Property Value
| Type | Description |
|---|---|
| BlockVisualization |
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
OnFunctionPropertyChanged(object?, PropertyChangedEventArgs)
Declaration
private void OnFunctionPropertyChanged(object? sender, PropertyChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| object | sender | |
| PropertyChangedEventArgs | e |
OnShowParam1Changed(bool)
Executes the logic for when ShowParam1 just changed.
Declaration
private void OnShowParam1Changed(bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | value | The new property value that was set. |
Remarks
This method is invoked right after the value of ShowParam1 is changed.
OnShowParam1Changed(bool, bool)
Executes the logic for when ShowParam1 just changed.
Declaration
private void OnShowParam1Changed(bool oldValue, bool newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | oldValue | The previous property value that was replaced. |
| bool | newValue | The new property value that was set. |
Remarks
This method is invoked right after the value of ShowParam1 is changed.
OnShowParam1Changing(bool)
Executes the logic for when ShowParam1 is changing.
Declaration
private void OnShowParam1Changing(bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | value | The new property value being set. |
Remarks
This method is invoked right before the value of ShowParam1 is changed.
OnShowParam1Changing(bool, bool)
Executes the logic for when ShowParam1 is changing.
Declaration
private void OnShowParam1Changing(bool oldValue, bool newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | oldValue | The previous property value that is being replaced. |
| bool | newValue | The new property value being set. |
Remarks
This method is invoked right before the value of ShowParam1 is changed.
OnShowParam2Changed(bool)
Executes the logic for when ShowParam2 just changed.
Declaration
private void OnShowParam2Changed(bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | value | The new property value that was set. |
Remarks
This method is invoked right after the value of ShowParam2 is changed.
OnShowParam2Changed(bool, bool)
Executes the logic for when ShowParam2 just changed.
Declaration
private void OnShowParam2Changed(bool oldValue, bool newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | oldValue | The previous property value that was replaced. |
| bool | newValue | The new property value that was set. |
Remarks
This method is invoked right after the value of ShowParam2 is changed.
OnShowParam2Changing(bool)
Executes the logic for when ShowParam2 is changing.
Declaration
private void OnShowParam2Changing(bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | value | The new property value being set. |
Remarks
This method is invoked right before the value of ShowParam2 is changed.
OnShowParam2Changing(bool, bool)
Executes the logic for when ShowParam2 is changing.
Declaration
private void OnShowParam2Changing(bool oldValue, bool newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | oldValue | The previous property value that is being replaced. |
| bool | newValue | The new property value being set. |
Remarks
This method is invoked right before the value of ShowParam2 is changed.
UpdateVisibility()
Declaration
private void UpdateVisibility()