aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteJobUpload/RemoteJobReceivedEventArgs.cs
blob: 190688a7ec67fe223cdee50ddebef83f00bfa4f0 (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
31
32
33
34
35
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.PPC.Shared.RemoteJobUpload;

namespace Tango.PPC.Common.RemoteJobUpload
{
    public class RemoteJobReceivedEventArgs : EventArgs
    {
        private Action _confirmAction;
        private Action<String> _abortAction;

        public String Name { get; set; }
        public RemoteJobUploadType Type { get; set; }
        public String FilePath { get; set; }

        public RemoteJobReceivedEventArgs(Action confirmAction, Action<String> abortAction)
        {
            _confirmAction = confirmAction;
            _abortAction = abortAction;
        }

        public void Confirm()
        {
            _confirmAction?.Invoke();
        }

        public void Abort(String message)
        {
            _abortAction?.Invoke(message);
        }
    }
}