diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-08-01 10:29:09 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-08-01 10:29:09 +0300 |
| commit | d5c6067365e12674e95acaef4c4af45eaead8c3e (patch) | |
| tree | 0345d7e407a3e714061dc9bc26152c9efe977bd9 /Software/Visual_Studio/Tango.Core/ExtendedObject.cs | |
| parent | 91c672c0b0b01bc68a6adfa2aada337c6488a614 (diff) | |
| download | Tango-d5c6067365e12674e95acaef4c4af45eaead8c3e.tar.gz Tango-d5c6067365e12674e95acaef4c4af45eaead8c3e.zip | |
Implemented notification for observables entities modification..
Diffstat (limited to 'Software/Visual_Studio/Tango.Core/ExtendedObject.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Core/ExtendedObject.cs | 47 |
1 files changed, 5 insertions, 42 deletions
diff --git a/Software/Visual_Studio/Tango.Core/ExtendedObject.cs b/Software/Visual_Studio/Tango.Core/ExtendedObject.cs index 03ac703ae..44663b503 100644 --- a/Software/Visual_Studio/Tango.Core/ExtendedObject.cs +++ b/Software/Visual_Studio/Tango.Core/ExtendedObject.cs @@ -23,16 +23,6 @@ namespace Tango.Core public class ExtendedObject : INotifyPropertyChanged { /// <summary> - /// Gets or sets a value indicating whether to globally disable property changed on extended objects. - /// </summary> - public static bool DisablePropertyChanged { get; set; } - - /// <summary> - /// Gets or sets a value indicating whether to globally disable UI invokations on extended objects. - /// </summary> - public static bool DisableUIInvokation { get; set; } - - /// <summary> /// Occurs when after InvalidateRelayCommands is called. /// </summary> [field: NonSerialized] @@ -70,10 +60,7 @@ namespace Tango.Core /// <param name="propName">Name of the property.</param> protected virtual void RaisePropertyChanged(String propName) { - if (!DisablePropertyChanged) - { - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propName)); - } + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propName)); } /// <summary> @@ -82,10 +69,7 @@ namespace Tango.Core /// <param name="propName">Name of the property.</param> protected virtual void RaisePropertyChangedAuto([CallerMemberName] string caller = null) { - if (!DisablePropertyChanged) - { - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(caller)); - } + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(caller)); } /// <summary> @@ -125,14 +109,7 @@ namespace Tango.Core /// <param name="action">The action.</param> protected virtual void InvokeUI(Action action) { - if (!DisableUIInvokation) - { - Application.Current.Dispatcher.BeginInvoke(action); - } - else - { - action(); - } + Application.Current.Dispatcher.BeginInvoke(action); } /// <summary> @@ -141,14 +118,7 @@ namespace Tango.Core /// <param name="action">The action.</param> protected virtual void InvokeUIOnIdle(Action action) { - if (!DisableUIInvokation) - { - Application.Current.Dispatcher.BeginInvoke(action, DispatcherPriority.ContextIdle); - } - else - { - action(); - } + Application.Current.Dispatcher.BeginInvoke(action, DispatcherPriority.ContextIdle); } /// <summary> @@ -157,14 +127,7 @@ namespace Tango.Core /// <param name="action">The action.</param> protected virtual void InvokeUINow(Action action) { - if (!DisableUIInvokation) - { - Application.Current.Dispatcher.Invoke(action); - } - else - { - action(); - } + Application.Current.Dispatcher.Invoke(action); } } } |
