diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-11-17 16:35:03 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-11-17 16:35:03 +0200 |
| commit | 2ef57b73b1dc6da51a9c3353d93a815f58ea22e0 (patch) | |
| tree | 426e2d56025913b226288090603c3981756d237b /Software/Visual_Studio/Tango.SharedUI | |
| parent | ab437cc6b78067bfe799a32bd9c2a630eeb98a17 (diff) | |
| download | Tango-2ef57b73b1dc6da51a9c3353d93a815f58ea22e0.tar.gz Tango-2ef57b73b1dc6da51a9c3353d93a815f58ea22e0.zip | |
Fixed error wording on FSE firmware logs failure.
Added support for raise property changed on UI thread for view model base.
Diffstat (limited to 'Software/Visual_Studio/Tango.SharedUI')
| -rw-r--r-- | Software/Visual_Studio/Tango.SharedUI/ViewModel.cs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.SharedUI/ViewModel.cs b/Software/Visual_Studio/Tango.SharedUI/ViewModel.cs index 421e098ce..564d8fce0 100644 --- a/Software/Visual_Studio/Tango.SharedUI/ViewModel.cs +++ b/Software/Visual_Studio/Tango.SharedUI/ViewModel.cs @@ -41,7 +41,7 @@ namespace Tango.SharedUI public bool IsBusy { get { return _isBusy; } - set { _isBusy = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(IsFree)); InvalidateRelayCommands(); } + set { _isBusy = value; RaisePropertyChanged(nameof(IsBusy), true); RaisePropertyChanged(nameof(IsFree), true); InvalidateRelayCommands(); } } /// <summary> @@ -172,6 +172,18 @@ namespace Tango.SharedUI { TangoMessenger.Default.Register<T>(handler); } + + /// <summary> + /// Raises the property changed event. + /// </summary> + /// <param name="propName">Name of the property.</param> + protected virtual void RaisePropertyChanged(String propName, bool onUIThread) + { + InvokeUI(() => + { + RaisePropertyChanged(propName); + }); + } } /// <summary> |
