aboutsummaryrefslogtreecommitdiffstats
path: root/Software
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2021-01-14 02:33:10 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2021-01-14 02:33:10 +0200
commit7adaeb064619f4cb98cb381ffe2e7aea2885f22e (patch)
treead0ea1e2aed16a523ba64e9f38c833b553d0511b /Software
parentb7c6bb781094a05dff4814aeb38d5a10c56eabf4 (diff)
downloadTango-7adaeb064619f4cb98cb381ffe2e7aea2885f22e.tar.gz
Tango-7adaeb064619f4cb98cb381ffe2e7aea2885f22e.zip
Workaround for STA thread error on Firmware/Application logs loading..
Diffstat (limited to 'Software')
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.Firmware/ViewModels/LogsViewVM.cs7
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/LogsViewVM.cs9
2 files changed, 11 insertions, 5 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 70c73a7be..cb09955dc 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
@@ -150,13 +150,16 @@ namespace Tango.FSE.Firmware.ViewModels
MachineProvider.MachineConnected += MachineProvider_MachineConnected;
}
- private async void MachineProvider_MachineConnected(object sender, MachineConnectedEventArgs e)
+ private void MachineProvider_MachineConnected(object sender, MachineConnectedEventArgs e)
{
_loaded = false;
if (MachineProvider.IsPPCAvailable && IsVisible)
{
- await LoadLogFiles();
+ InvokeUI(async () =>
+ {
+ await LoadLogFiles();
+ });
}
}
diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/LogsViewVM.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/LogsViewVM.cs
index d2b4597c6..f76b03ec9 100644
--- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/LogsViewVM.cs
+++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/LogsViewVM.cs
@@ -153,13 +153,16 @@ namespace Tango.FSE.PPCConsole.ViewModels
MachineProvider.MachineConnected += MachineProvider_MachineConnected;
}
- private async void MachineProvider_MachineConnected(object sender, MachineConnectedEventArgs e)
+ private void MachineProvider_MachineConnected(object sender, MachineConnectedEventArgs e)
{
_loaded = false;
if (MachineProvider.IsPPCAvailable && IsVisible)
{
- await LoadLogFiles();
+ InvokeUI(async () =>
+ {
+ await LoadLogFiles();
+ });
}
}
@@ -405,7 +408,7 @@ namespace Tango.FSE.PPCConsole.ViewModels
View.ScrollToLogFile(SelectedLogFile);
View.ScrollToLog(log);
}
- }
+ }
}
}
else