Class DeviceConfigViewModel
The view model for the DeviceConfiguration
Inherited Members
Namespace: Phoenix.DeviceConfiguration
Assembly: Phoenix.DeviceConfiguration.dll
Syntax
public class DeviceConfigViewModel : ViewModelBase<DeviceConfigView>, IViewProvider, IClosingNotification, IViewInitialize
Constructors
View SourceDeviceConfigViewModel(DeviceConfigView, IWindowingControl, IEventAggregator, IPhoenixLogger, DeviceConfigManager, IEnumerable<IDevice>, IDeviceConfiguration)
Initializes a new instance of the DeviceConfigViewModel class.
Declaration
public DeviceConfigViewModel(DeviceConfigView view, IWindowingControl windowing, IEventAggregator eventAggregator, IPhoenixLogger logger, DeviceConfigManager configManager, IEnumerable<IDevice> devices, IDeviceConfiguration configuration)
Parameters
Type | Name | Description |
---|---|---|
DeviceConfigView | view | The DeviceConfigView view. |
IWindowingControl | windowing | |
IEventAggregator | eventAggregator | The event aggregator. |
IPhoenixLogger | logger | The logger. |
DeviceConfigManager | configManager | The DeviceConfigManager manager. |
System.Collections.Generic.IEnumerable<IDevice> | devices | |
IDeviceConfiguration | configuration |
Properties
View SourceAddCommand
Gets the Add delegate command which adds a new setting to the configuration.
Declaration
public DelegateCommand AddCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
CheckAllCommand
Gets the CheckAll delegate command which calls CheckAll for all settings.
Declaration
public DelegateCommand CheckAllCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
Configuration
Gets or sets the IDeviceConfiguration.
Declaration
public IDeviceConfiguration Configuration { get; set; }
Property Value
Type | Description |
---|---|
IDeviceConfiguration |
ConfigurationName
Gets or sets the configuration name.
Declaration
public string ConfigurationName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Devices
Gets the list of devices.
Declaration
public ICollection<IDevice> Devices { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.ICollection<IDevice> |
EditCommand
Gets the Edit delegate command which toggles whether or not the configuration is being edited.
Declaration
public DelegateCommand EditCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
Editing
Gets or sets a value indicating whether or not the configuration is being edited.
Declaration
public bool Editing { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
EnlistCommand
Gets the SaveAs delegate command which enlists the selected devices in the configuration.
Declaration
public DelegateCommand EnlistCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
Enlisted
Gets a value indicating whether or not the selected devices are enlisted in the configuration.
Declaration
public bool Enlisted { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
FixAllCommand
Gets the FixAll delegate command which calls FixAll for all settings.
Declaration
public DelegateCommand FixAllCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
PossibleSettings
Gets a list of possible setting names for the selected device types.
Declaration
public IEnumerable<string> PossibleSettings { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
RemoveCommand
Gets the Remove delegate command which removes selected settings from the configuration.
Declaration
public DelegateCommand RemoveCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
SaveAsCommand
Gets the SaveAs delegate command which saves the configuration as a new file.
Declaration
public DelegateCommand SaveAsCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
Settings
Gets the list of DeviceConfigSettingWrapper.
Declaration
public ObservableCollection<DeviceConfigSettingWrapper> Settings { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<DeviceConfigSettingWrapper> |
Methods
View SourceAddSetting(DeviceConfigSetting)
Adds a new setting to the list.
Declaration
public void AddSetting(DeviceConfigSetting setting)
Parameters
Type | Name | Description |
---|---|---|
DeviceConfigSetting | setting | The setting object to add. |
AddSetting(DeviceConfigSetting, SettingValue)
Adds a new setting to the list.
Declaration
public void AddSetting(DeviceConfigSetting setting, SettingValue value)
Parameters
Type | Name | Description |
---|---|---|
DeviceConfigSetting | setting | The setting object to add. |
SettingValue | value | The object to use to store the setting value. |