aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons/StartPrintingButton.cs
blob: 001888c920c4cb714f1b029db80f1d2e2c81d3bc (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(this, op.Status);
        }

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