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 | |
| 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')
| -rw-r--r-- | Software/Visual_Studio/FSE/Modules/Tango.FSE.Firmware/ViewModels/LogsViewVM.cs | 4 | ||||
| -rw-r--r-- | Software/Visual_Studio/Tango.SharedUI/ViewModel.cs | 14 |
2 files changed, 15 insertions, 3 deletions
diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Firmware/ViewModels/LogsViewVM.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Firmware/ViewModels/LogsViewVM.cs index ead8366ad..70c73a7be 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Firmware/ViewModels/LogsViewVM.cs +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Firmware/ViewModels/LogsViewVM.cs @@ -200,8 +200,8 @@ namespace Tango.FSE.Firmware.ViewModels } catch (Exception ex) { - LogManager.Log(ex, "Error loading log files."); - NotificationProvider.PushErrorReportingSnackbar(ex, "PPC Module Error", "Could not initialize the remote PPC logs history."); + LogManager.Log(ex, "Error loading remote firmware log files."); + NotificationProvider.PushErrorReportingSnackbar(ex, "Firmware Module Error", "Could not initialize the remote Firmware logs history."); } finally { 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> |
