diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-11-15 12:50:03 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-11-15 12:50:03 +0200 |
| commit | 0f6d30eb6a003eee2ebc3008a45170e0c2bb8cdd (patch) | |
| tree | 85e05583eb7a2a6323a8156b8db30a946c74c60b /Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs | |
| parent | 6ffe8dafa65ee428aa9866d8b13d1d96e440023a (diff) | |
| download | Tango-0f6d30eb6a003eee2ebc3008a45170e0c2bb8cdd.tar.gz Tango-0f6d30eb6a003eee2ebc3008a45170e0c2bb8cdd.zip | |
Optimized accuracy of CSV recordings!
Diffstat (limited to 'Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs | 67 |
1 files changed, 55 insertions, 12 deletions
diff --git a/Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs b/Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs index 605e168cb..b58e56656 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/MachineVersion.cs @@ -25,6 +25,16 @@ namespace Tango.BL.Entities public partial class MachineVersion : ObservableEntity<MachineVersion> { + public event EventHandler<Double> VersionChanged; + + public event EventHandler<String> NameChanged; + + public event EventHandler<Configuration> DefaultConfigurationChanged; + + public event EventHandler<SynchronizedObservableCollection<Machine>> MachinesChanged; + + public event EventHandler<SynchronizedObservableCollection<TangoVersion>> TangoVersionsChanged; + protected Double _version; /// <summary> @@ -42,9 +52,15 @@ namespace Tango.BL.Entities set { - _version = value; RaisePropertyChanged(nameof(Version)); - } + if (_version != value) + { + _version = value; + VersionChanged?.Invoke(this, value); + + RaisePropertyChanged(nameof(Version)); + } + } } protected String _name; @@ -64,9 +80,15 @@ namespace Tango.BL.Entities set { - _name = value; RaisePropertyChanged(nameof(Name)); - } + if (_name != value) + { + _name = value; + NameChanged?.Invoke(this, value); + + RaisePropertyChanged(nameof(Name)); + } + } } protected String _defaultconfigurationguid; @@ -87,9 +109,12 @@ namespace Tango.BL.Entities set { - _defaultconfigurationguid = value; RaisePropertyChanged(nameof(DefaultConfigurationGuid)); + if (_defaultconfigurationguid != value) + { + _defaultconfigurationguid = value; + RaisePropertyChanged(nameof(DefaultConfigurationGuid)); + } } - } protected Configuration _defaultconfiguration; @@ -109,9 +134,15 @@ namespace Tango.BL.Entities set { - _defaultconfiguration = value; RaisePropertyChanged(nameof(DefaultConfiguration)); - } + if (_defaultconfiguration != value) + { + _defaultconfiguration = value; + + DefaultConfigurationChanged?.Invoke(this, value); + RaisePropertyChanged(nameof(DefaultConfiguration)); + } + } } protected SynchronizedObservableCollection<Machine> _machines; @@ -129,9 +160,15 @@ namespace Tango.BL.Entities set { - _machines = value; RaisePropertyChanged(nameof(Machines)); - } + if (_machines != value) + { + _machines = value; + MachinesChanged?.Invoke(this, value); + + RaisePropertyChanged(nameof(Machines)); + } + } } protected SynchronizedObservableCollection<TangoVersion> _tangoversions; @@ -149,9 +186,15 @@ namespace Tango.BL.Entities set { - _tangoversions = value; RaisePropertyChanged(nameof(TangoVersions)); - } + if (_tangoversions != value) + { + _tangoversions = value; + TangoVersionsChanged?.Invoke(this, value); + + RaisePropertyChanged(nameof(TangoVersions)); + } + } } /// <summary> |
