From 8f83b5cedf2a0af57836e2db227d88b50e612cb1 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 25 Jul 2018 13:15:26 +0300 Subject: Working on PPC. --- .../Tango.PPC.Jobs/ViewModels/MainViewVM.cs | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels') 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 28ff1793b..389349f54 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 @@ -21,26 +21,28 @@ namespace Tango.PPC.Jobs.ViewModels private void MachineOperator_PrintingFailed(object sender, Integration.Operation.PrintingFailedEventArgs e) { - NotificationProvider.PushNotification(new MessageNotificationItem(String.Format("Job failed. ({0})", e.Exception.Message), MessageNotificationItem.MessageNotificationItemTypes.Error, () => - { - NavigationManager.NavigateWithObject(e.Job); - NavigationManager.ClearHistoryExcept(); - })); + NotificationProvider.PushNotification(new MessageNotificationItem( + String.Format("'{0}' failed.", e.Job.Name), + 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, () => + { + NavigationManager.NavigateWithObject(e.Job); + NavigationManager.ClearHistoryExcept(); + })); } private void MachineOperator_PrintingCompleted(object sender, Integration.Operation.PrintingEventArgs e) { if (e.Job.Designation == BL.Enumerations.JobDesignations.SampleDye) { - NotificationProvider.PushNotification(new MessageNotificationItem("Sample completed successfully.", MessageNotificationItem.MessageNotificationItemTypes.Success, () => - { - NavigationManager.NavigateWithObject(new JobNavigationObject() { Job = e.Job, Intent = JobNavigationIntent.SampleDye }); - NavigationManager.ClearHistoryExcept(); - })); + NotificationProvider.PushNotification(new MessageNotificationItem(String.Format("'{0}' sample dye completed successfully", e.Job.Name), "Tap to approve or repeat.", MessageNotificationItem.MessageNotificationItemTypes.Success, () => + { + NavigationManager.NavigateWithObject(new JobNavigationObject() { Job = e.Job, Intent = JobNavigationIntent.SampleDye }); + NavigationManager.ClearHistoryExcept(); + })); } else if (e.Job.Designation == BL.Enumerations.JobDesignations.FineTuning) { - NotificationProvider.PushNotification(new MessageNotificationItem("Fine tuning completed successfully.", MessageNotificationItem.MessageNotificationItemTypes.Success, () => + NotificationProvider.PushNotification(new MessageNotificationItem(String.Format("'{0}' fine tuning completed successfully", e.Job.Name), "Tap to approve or repeat.", MessageNotificationItem.MessageNotificationItemTypes.Success, () => { NavigationManager.NavigateWithObject(new JobNavigationObject() { Job = e.Job, Intent = JobNavigationIntent.FineTuning }); NavigationManager.ClearHistoryExcept(); @@ -48,7 +50,7 @@ namespace Tango.PPC.Jobs.ViewModels } else { - NotificationProvider.PushNotification(new MessageNotificationItem("Job completed successfully.", MessageNotificationItem.MessageNotificationItemTypes.Success, () => + NotificationProvider.PushNotification(new MessageNotificationItem(String.Format("'{0}' completed successfully", e.Job.Name), "Tap to view this job details.", MessageNotificationItem.MessageNotificationItemTypes.Success, () => { NavigationManager.NavigateWithObject(new JobNavigationObject() { Job = e.Job }); NavigationManager.ClearHistoryExcept(); -- cgit v1.3.1