aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/AppButtons/StartPrintingButton.cs
blob: 4d6050639329e44aa24f2eebbe2c220de186aa3b (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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.Core.Commands;
using Tango.Integration.Operation;
using Tango.PPC.Common.Notifications;

namespace Tango.PPC.Jobs.AppButtons
{
    public class StartPrintingButton : AppButton
    {
        public StartPrintingButton(RelayCommand command, IMachineOperator op) : base("DYE", command)
        {
            op.StatusChanged += Op_StatusChanged;

            Op_StatusChanged(op, op.Status);
        }

        private void Op_StatusChanged(object sender, MachineStatuses status)
        {
            IsEnabled = (sender as IMachineOperator).CanPrint;
        }
    }
}