aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs
index b5b5f56bc..07da99818 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs
@@ -33,6 +33,7 @@ namespace Tango.PPC.UI.ViewModels
private MachineUpdateResult _update_result;
private DbCompareResult _db_compare_result;
+ private bool _isChecking;
#region Properties
@@ -132,8 +133,11 @@ namespace Tango.PPC.UI.ViewModels
{
await NavigateTo(MachineUpdateView.UpdateCheckView);
+ if (_isChecking) return;
+
try
{
+ _isChecking = true;
IsDbUpdate = false;
var response = await MachineUpdateManager.CheckForUpdate(MachineProvider.Machine.SerialNumber);
@@ -164,6 +168,10 @@ namespace Tango.PPC.UI.ViewModels
LogManager.Log(ex, "Error while trying to check for updates.");
await NavigateTo(MachineUpdateView.UpdateFailedView);
}
+ finally
+ {
+ _isChecking = false;
+ }
}
private async void Update()