diff options
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs | 12 |
1 files changed, 10 insertions, 2 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 23ec956a0..613c70809 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs @@ -478,12 +478,14 @@ namespace Tango.PPC.UI.ViewModels packageInfo = await MachineProvider.MachineOperator.GetFirmwarePackageInfo(st); } - vm.Version = packageInfo.FileDescriptors.SingleOrDefault(x => x.Destination == VersionFileDestination.Mcu).Version; + packageInfo.Validate(); + + vm.Version = packageInfo.GetMcuVersion().ToString(); } catch (Exception ex) { LogManager.Log(ex, $"Error loading package info from {fileItem.Path}."); - await NotificationProvider.ShowError("An error occurred while trying to load the selected firmware upgrade package. Please make sure the package is valid."); + await NotificationProvider.ShowError($"An error occurred while trying to load the selected firmware upgrade package.\n{ex.FlattenMessage()}"); return; } @@ -537,6 +539,12 @@ namespace Tango.PPC.UI.ViewModels _updateNotificationItem.IsDatabaseUpdate = e.IsDatabaseUpdateAvailable && !e.IsUpdateAvailable; _updateNotificationItem.Pressed += (_, __) => { + if (MachineProvider.MachineOperator.IsPrinting) + { + NotificationProvider.ShowInfo("Cannot perform a machine update while the machine is dyeing."); + return; + } + _updateNotificationItem = null; if (!IsVisible) |
