aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-07-16 13:47:20 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-07-16 13:47:20 +0300
commitfdfa740288568dba27877a5ef5c817be323cfbb0 (patch)
tree933ee1cb2769d43c982596f50ff8b7ec791f3be7 /Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs
parentd376387fa28a2091a21e2fc7193812d1f8a40ef2 (diff)
downloadTango-fdfa740288568dba27877a5ef5c817be323cfbb0.tar.gz
Tango-fdfa740288568dba27877a5ef5c817be323cfbb0.zip
Working on PPC.
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs15
1 files changed, 12 insertions, 3 deletions
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 53fe73bd5..5b49aedf1 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
@@ -15,15 +15,24 @@ namespace Tango.PPC.Jobs.ViewModels
public override void OnApplicationStarted()
{
MachineProvider.MachineOperator.PrintingCompleted += MachineOperator_PrintingCompleted;
+ MachineProvider.MachineOperator.PrintingFailed += MachineOperator_PrintingFailed;
}
- private void MachineOperator_PrintingCompleted(object sender, Integration.Operation.PrintingEventArgs e)
+ private void MachineOperator_PrintingFailed(object sender, Integration.Operation.PrintingFailedEventArgs e)
{
- NotificationProvider.PushNotification(new MessageNotificationItem("Job completed successfully.", MessageNotificationItem.MessageNotificationItemTypes.Success, () =>
+ NotificationProvider.PushNotification(new MessageNotificationItem(String.Format("Job failed. ({0})", e.Exception.Message), MessageNotificationItem.MessageNotificationItemTypes.Error, () =>
{
-
NavigationManager.NavigateWithObject<JobsModule, JobView, Job>(e.Job);
+ NavigationManager.ClearHistoryExcept<JobsView>();
+ }));
+ }
+ private void MachineOperator_PrintingCompleted(object sender, Integration.Operation.PrintingEventArgs e)
+ {
+ NotificationProvider.PushNotification(new MessageNotificationItem("Job completed successfully.", MessageNotificationItem.MessageNotificationItemTypes.Success, () =>
+ {
+ NavigationManager.NavigateWithObject<JobsModule, JobView, Job>(e.Job);
+ NavigationManager.ClearHistoryExcept<JobsView>();
}));
}
}