diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-12-10 12:59:22 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-12-10 12:59:22 +0200 |
| commit | 6240aad18f5dc54d4e29bf2d39f49ef1ba39742f (patch) | |
| tree | 8899a6345ec0f2ac105d10536a8b33ecacdaf2da /Software/Visual_Studio/PPC/Tango.PPC.UI | |
| parent | ee0f4151c329542c30041ff1da91d25e8d8e2575 (diff) | |
| download | Tango-6240aad18f5dc54d4e29bf2d39f49ef1ba39742f.tar.gz Tango-6240aad18f5dc54d4e29bf2d39f49ef1ba39742f.zip | |
Added array support for stubsexec.
Improved PPC update & setup.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI')
4 files changed, 34 insertions, 7 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs index 16b1c05bc..84987d705 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs @@ -102,6 +102,17 @@ namespace Tango.PPC.UI.ViewModels set { _state = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } } + private String _failedError; + /// <summary> + /// Gets or sets the setup failed error. + /// </summary> + public String FailedError + { + get { return _failedError; } + set { _failedError = value; RaisePropertyChangedAuto(); } + } + + #endregion #region Commands @@ -281,6 +292,7 @@ namespace Tango.PPC.UI.ViewModels catch (Exception ex) { LogManager.Log(ex, "Machine setup failed."); + FailedError = ex.FlattenMessage(); State = MachineSetupStates.Failed; await NavigateTo(MachineSetupView.SetupFailedView); } 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 c201bf555..79974bff4 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs @@ -61,6 +61,16 @@ namespace Tango.PPC.UI.ViewModels set { _isDbUpdate = value; RaisePropertyChangedAuto(); } } + private String _failedError; + /// <summary> + /// Gets or sets the setup failed error. + /// </summary> + public String FailedError + { + get { return _failedError; } + set { _failedError = value; RaisePropertyChangedAuto(); } + } + #endregion #region Commands @@ -150,6 +160,7 @@ namespace Tango.PPC.UI.ViewModels } catch (Exception ex) { + FailedError = ex.FlattenMessage(); LogManager.Log(ex, "Error while trying to check for updates."); await NavigateTo(MachineUpdateView.UpdateFailedView); } @@ -171,6 +182,7 @@ namespace Tango.PPC.UI.ViewModels } catch (Exception ex) { + FailedError = ex.FlattenMessage(); LogManager.Log(ex, "Machine update failed."); await NavigateTo(MachineUpdateView.UpdateFailedView); } @@ -188,6 +200,7 @@ namespace Tango.PPC.UI.ViewModels } catch (Exception ex) { + FailedError = ex.FlattenMessage(); LogManager.Log(ex, "Database update failed."); await NavigateTo(MachineUpdateView.UpdateFailedView); } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml index 829f284de..e0c25d207 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml @@ -112,10 +112,11 @@ <Grid controls:NavigationControl.NavigationName="SetupFailedView"> <StackPanel HorizontalAlignment="Center" Margin="0 50 0 0"> - <touch:TouchIcon Icon="AlertOctagon" Foreground="{StaticResource TangoErrorBrush}" Width="70" Height="70" /> - <TextBlock VerticalAlignment="Center" Margin="0 10 0 0" Foreground="{StaticResource TangoErrorBrush}" FontSize="{StaticResource TangoTitleFontSize}">Setup failed, tap 'restart' to restart the process.</TextBlock> - - <touch:TouchButton Margin="0 200 0 0" Padding="20" Width="300" CornerRadius="35" Command="{Binding RestartCommand}">RESTART</touch:TouchButton> + <touch:TouchIcon Icon="AlertOutline" Foreground="{StaticResource TangoErrorBrush}" Width="70" Height="70" /> + <TextBlock HorizontalAlignment="Center" Margin="0 10 0 0" FontSize="{StaticResource TangoTitleFontSize}">Setup Failed</TextBlock> + <TextBlock HorizontalAlignment="Center" Margin="0 5 0 0" Foreground="{StaticResource TangoErrorBrush}" Text="{Binding FailedError,FallbackValue='Unexpected error'}"></TextBlock> + <TextBlock HorizontalAlignment="Center" Margin="0 20 0 0">Tap 'RESTART' to restart the process</TextBlock> + <touch:TouchButton Margin="0 180 0 0" Padding="20" Width="300" CornerRadius="35" Command="{Binding RestartCommand}">RESTART</touch:TouchButton> </StackPanel> </Grid> 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 ac0b9e36c..0fb9d9e09 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml @@ -148,10 +148,11 @@ <Grid controls:NavigationControl.NavigationName="UpdateFailedView"> <StackPanel HorizontalAlignment="Center" Margin="0 50 0 0"> - <touch:TouchIcon Icon="AlertOctagon" Foreground="{StaticResource TangoErrorBrush}" Width="70" Height="70" /> - <TextBlock VerticalAlignment="Center" Margin="0 10 0 0" Foreground="{StaticResource TangoErrorBrush}" FontSize="{StaticResource TangoTitleFontSize}">An error occurred while trying to update the machine.</TextBlock> + <touch:TouchIcon Icon="AlertOutline" Foreground="{StaticResource TangoErrorBrush}" Width="70" Height="70" /> + <TextBlock HorizontalAlignment="Center" Margin="0 10 0 0" FontSize="{StaticResource TangoTitleFontSize}">Update Failed</TextBlock> + <TextBlock HorizontalAlignment="Center" Margin="0 5 0 0" Foreground="{StaticResource TangoErrorBrush}" Text="{Binding FailedError,FallbackValue='Unexpected error'}"></TextBlock> - <touch:TouchButton Margin="0 200 0 0" Padding="20" Width="300" CornerRadius="35" Command="{Binding RestartCommand}">TRY AGAIN</touch:TouchButton> + <touch:TouchButton Margin="0 180 0 0" Padding="20" Width="300" CornerRadius="35" Command="{Binding RestartCommand}">TRY AGAIN</touch:TouchButton> <touch:TouchButton Style="{StaticResource TangoFlatButton}" Margin="0 200 0 0" Padding="20" Width="300" HorizontalContentAlignment="Center" CornerRadius="35" Command="{Binding ToApplicationCommand}">Back To Application</touch:TouchButton> </StackPanel> |
