diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-12-31 14:15:49 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-12-31 14:15:49 +0200 |
| commit | 650af0554b902837f8e146d690aca24e4f60ec29 (patch) | |
| tree | 30f3795d9579129395fd987c3e790ce33181c0e5 /Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs | |
| parent | cfe28eaf0adcd54776c0a369210e6f7b4bca9558 (diff) | |
| download | Tango-650af0554b902837f8e146d690aca24e4f60ec29.tar.gz Tango-650af0554b902837f8e146d690aca24e4f60ec29.zip | |
Removed Default configuration from machine version.
Implemented custom ToJson for observables.
Implemented Apply & Create prototype machine for machine version.
Diffstat (limited to 'Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs | 51 |
1 files changed, 13 insertions, 38 deletions
diff --git a/Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs b/Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs index 87eaa61a4..3380f9b90 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs @@ -29,7 +29,7 @@ namespace Tango.BL.Entities public event EventHandler<String> NameChanged; - public event EventHandler<Configuration> DefaultConfigurationChanged; + public event EventHandler<String> PrototypeMachineDataChanged; public event EventHandler<SynchronizedObservableCollection<Machine>> MachinesChanged; @@ -89,53 +89,28 @@ namespace Tango.BL.Entities } } - protected String _defaultconfigurationguid; + protected String _prototypemachinedata; /// <summary> - /// Gets or sets the machineversion default configuration guid. + /// Gets or sets the machineversion prototype machine data. /// </summary> - [Column("DEFAULT_CONFIGURATION_GUID")] - [ForeignKey("DefaultConfiguration")] + [Column("PROTOTYPE_MACHINE_DATA")] - public String DefaultConfigurationGuid + public String PrototypeMachineData { get { - return _defaultconfigurationguid; + return _prototypemachinedata; } set { - if (_defaultconfigurationguid != value) + if (_prototypemachinedata != value) { - _defaultconfigurationguid = value; - } - } - } - - protected Configuration _defaultconfiguration; - - /// <summary> - /// Gets or sets the machineversion configuration. - /// </summary> - - [XmlIgnore] - [JsonIgnore] - public virtual Configuration DefaultConfiguration - { - get - { - return _defaultconfiguration; - } - - set - { - if (_defaultconfiguration != value) - { - _defaultconfiguration = value; + _prototypemachinedata = value; - OnDefaultConfigurationChanged(value); + OnPrototypeMachineDataChanged(value); } } @@ -210,12 +185,12 @@ namespace Tango.BL.Entities } /// <summary> - /// Called when the DefaultConfiguration has changed. + /// Called when the PrototypeMachineData has changed. /// </summary> - protected virtual void OnDefaultConfigurationChanged(Configuration defaultconfiguration) + protected virtual void OnPrototypeMachineDataChanged(String prototypemachinedata) { - DefaultConfigurationChanged?.Invoke(this, defaultconfiguration); - RaisePropertyChanged(nameof(DefaultConfiguration)); + PrototypeMachineDataChanged?.Invoke(this, prototypemachinedata); + RaisePropertyChanged(nameof(PrototypeMachineData)); } /// <summary> |
