From ffc9932efa42c9485b9d0d53ee0b0602690f1c46 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Sun, 11 Oct 2020 18:43:01 +0300 Subject: Some improvements to notification bar. --- .../Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs index 7869e6990..daf27e62e 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs @@ -82,9 +82,11 @@ namespace Tango.PPC.Jobs.ViewModels /// The instance containing the event data. private void MachineOperator_PrintingFailed(object sender, PrintingFailedEventArgs e) { + String message = $"{e.Exception.FlattenMessage()}\nTap to view this job details."; + _last_failed_job_notification = NotificationProvider.PushNotification(new MessageNotificationItem( $"'{e.Job.Name}' failed at position {e.JobHandler.Status.ProgressMinusSettingUp.ToString("0.0")} out of {e.JobHandler.Status.TotalProgressMinusSettingUp.ToString("0.0")} meters.", - String.Format("The job '{1}' has failed due to unexpected error.{0}{2}{0}{0}Tap to view this job details.", Environment.NewLine, e.Job.Name, e.Exception), MessageNotificationItem.MessageNotificationItemTypes.Error, () => + message, MessageNotificationItem.MessageNotificationItemTypes.Error, () => { NavigationManager.NavigateWithObject(e.Job); NavigationManager.ClearHistoryExcept(); -- cgit v1.3.1