diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-05-19 12:37:00 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-05-19 12:37:00 +0300 |
| commit | 2433051636406054c69b6de42806aab50e076e01 (patch) | |
| tree | 12dd78e2e5f82f4355035bc64c16a08e3be7434b /Software/Visual_Studio/Tango.Settings | |
| parent | 1d2d515c91a78a8a3e373e05ae925ba6af1f32fd (diff) | |
| download | Tango-2433051636406054c69b6de42806aab50e076e01.tar.gz Tango-2433051636406054c69b6de42806aab50e076e01.zip | |
2. Update PPC DB Schema and Liquid Types. ***
3. Test preferred index on PPC. ***
3.1. Add Has_Pigment to Liquid Type. ***
4. Add "Use Preferred Index to Machine Studio. ***
4. Enable KeepAlive by default. ***
4. Disable upload HW for TCP by default. ***
Diffstat (limited to 'Software/Visual_Studio/Tango.Settings')
| -rw-r--r-- | Software/Visual_Studio/Tango.Settings/SettingsBase.cs | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.Settings/SettingsBase.cs b/Software/Visual_Studio/Tango.Settings/SettingsBase.cs index 157a80feb..aea135393 100644 --- a/Software/Visual_Studio/Tango.Settings/SettingsBase.cs +++ b/Software/Visual_Studio/Tango.Settings/SettingsBase.cs @@ -1,6 +1,8 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; +using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; @@ -9,7 +11,7 @@ namespace Tango.Settings /// <summary> /// Represents a settings object base class. /// </summary> - public abstract class SettingsBase + public abstract class SettingsBase : INotifyPropertyChanged { internal Action SaveAction { get; set; } @@ -26,5 +28,28 @@ namespace Tango.Settings SaveAction(); } + + /// <summary> + /// Occurs when a property value changes. + /// </summary> + public event PropertyChangedEventHandler PropertyChanged; + + /// <summary> + /// Raises the property changed event. + /// </summary> + /// <param name="propName">Name of the property.</param> + protected virtual void RaisePropertyChanged(String propName) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propName)); + } + + /// <summary> + /// Raises the property changed event. + /// </summary> + /// <param name="propName">Name of the property.</param> + protected virtual void RaisePropertyChangedAuto([CallerMemberName] string caller = null) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(caller)); + } } } |
