aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs
blob: 53fe73bd529f6140662adb37c674227cc7887a4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.BL.Entities;
using Tango.PPC.Common;
using Tango.PPC.Common.Notifications.NotificationItems;
using Tango.PPC.Jobs.Views;

namespace Tango.PPC.Jobs.ViewModels
{
    public class MainViewVM : PPCViewModel
    {
        public override void OnApplicationStarted()
        {
            MachineProvider.MachineOperator.PrintingCompleted += MachineOperator_PrintingCompleted;
        }

        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);

            }));
        }
    }
}