From d5c6067365e12674e95acaef4c4af45eaead8c3e Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 1 Aug 2018 10:29:09 +0300 Subject: Implemented notification for observables entities modification.. --- .../Visual_Studio/Tango.Core/ExtendedObject.cs | 47 +++------------------- 1 file changed, 5 insertions(+), 42 deletions(-) (limited to 'Software/Visual_Studio/Tango.Core/ExtendedObject.cs') 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 @@ -22,16 +22,6 @@ namespace Tango.Core [Serializable] public class ExtendedObject : INotifyPropertyChanged { - /// - /// Gets or sets a value indicating whether to globally disable property changed on extended objects. - /// - public static bool DisablePropertyChanged { get; set; } - - /// - /// Gets or sets a value indicating whether to globally disable UI invokations on extended objects. - /// - public static bool DisableUIInvokation { get; set; } - /// /// Occurs when after InvalidateRelayCommands is called. /// @@ -70,10 +60,7 @@ namespace Tango.Core /// Name of the property. protected virtual void RaisePropertyChanged(String propName) { - if (!DisablePropertyChanged) - { - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propName)); - } + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propName)); } /// @@ -82,10 +69,7 @@ namespace Tango.Core /// Name of the property. protected virtual void RaisePropertyChangedAuto([CallerMemberName] string caller = null) { - if (!DisablePropertyChanged) - { - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(caller)); - } + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(caller)); } /// @@ -125,14 +109,7 @@ namespace Tango.Core /// The action. protected virtual void InvokeUI(Action action) { - if (!DisableUIInvokation) - { - Application.Current.Dispatcher.BeginInvoke(action); - } - else - { - action(); - } + Application.Current.Dispatcher.BeginInvoke(action); } /// @@ -141,14 +118,7 @@ namespace Tango.Core /// The action. protected virtual void InvokeUIOnIdle(Action action) { - if (!DisableUIInvokation) - { - Application.Current.Dispatcher.BeginInvoke(action, DispatcherPriority.ContextIdle); - } - else - { - action(); - } + Application.Current.Dispatcher.BeginInvoke(action, DispatcherPriority.ContextIdle); } /// @@ -157,14 +127,7 @@ namespace Tango.Core /// The action. protected virtual void InvokeUINow(Action action) { - if (!DisableUIInvokation) - { - Application.Current.Dispatcher.Invoke(action); - } - else - { - action(); - } + Application.Current.Dispatcher.Invoke(action); } } } -- cgit v1.3.1