From bfc481bb93045f759a147f074a2ab1be57076c92 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 12 Mar 2019 17:28:51 +0200 Subject: Working on PPC update.. --- .../PPC/Tango.PPC.UI/Images/machine-update.png | Bin 54914 -> 88509 bytes .../Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs | 8 + .../PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml | 234 ++++++++++++--------- 3 files changed, 137 insertions(+), 105 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/machine-update.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/machine-update.png index 3e49520dd..d8db51337 100644 Binary files a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/machine-update.png and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/machine-update.png differ 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() diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml index 0fb9d9e09..ba7e9e019 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml @@ -11,115 +11,127 @@ xmlns:vm="clr-namespace:Tango.PPC.UI.ViewModels" xmlns:local="clr-namespace:Tango.PPC.UI.Views" mc:Ignorable="d" - d:DesignHeight="1280" d:DesignWidth="800" Background="{StaticResource TangoPrimaryBackgroundBrush}" d:DataContext="{d:DesignInstance Type=vm:MachineUpdateViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MachineUpdateViewVM}"> + d:DesignHeight="1280" d:DesignWidth="800" Background="{StaticResource TangoPrimaryBackgroundBrush}" d:DataContext="{d:DesignInstance Type=vm:MachineUpdateViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MachineUpdateViewVM}"> - - + + - - - + + + Back To Application + + + + Checking for updates, please wait... - - + + + - - - - - - - - + + + + + + + + + + Updating your machine can improve the following: - - - - - - Support for new media - - - - - Refined color conversion and calibration algorithms + + + + + + Support for new media + + + + + Refined color conversion and calibration algorithms + + + + + Software fixes and improvements + + + + + Firmware upgrade + - - - Software fixes and improvements - - - - - Firmware upgrade - - - - + Tap 'UPDATE' to start updating now. - - - UPDATE - - Back To Application - + + + - - - Your machine is up to date! - - CLOSE - + + + CLOSE + + + + Your machine is up to date! + + - - - An error occurred while trying to check for updates. Please check your internet connection and try again. - - TRY AGAIN - - Back To Application - + + + TRY AGAIN + Back To Application + + + + An error occurred while trying to check for updates. Please check your internet connection and try again. + + - Updating your machine + Updating your machine Do not turn off the machine - + @@ -129,37 +141,46 @@ - - - - Updating database... - + + Updating your machine + Do not turn off the machine + + + + + + - - - Update completed successfully ! - - RESTART - + + + RESTART + + + + Your machine is up to date! + + - - - Update Failed - - - TRY AGAIN - - Back To Application - + + + TRY AGAIN + Back To Application + + + + Update Failed + + + - + Updating your software @@ -168,12 +189,15 @@ - - - An error occurred while trying to update the machine. - - Back To Application - + + + CLOSE + + + + An error occurred while trying to update the machine. + + -- cgit v1.3.1