Example #1
0
 public MainForm()
 {
     InitializeComponent();
     _cts = new CancellationTokenSource();
     _communicationManager = new CommunicationManager(_cts,false);
     _agentWorker = new AgentWorker(_communicationManager);
     _communicationManager.ProcessIncomingMessage = _agentWorker.HandleMessage;
     _communicationManager.OnListenerStarted = () => { listenerStatusLabel.Text = "Listener started"; };
 }
Example #2
0
        public MainForm()
        {
            InitializeComponent();
            _cts = new CancellationTokenSource();
            _communicationManager = new CommunicationManager(_cts, true);
            _masterWorker = new MasterWorker();
            _masterWorker.OnAgentConnected = OnAgentConnected;
            _communicationManager.ProcessIncomingMessage = _masterWorker.HandleMessage;
            _communicationManager.OnListenerStarted = () => { statusLabel.Text = "Listener started"; };

        }
Example #3
0
 public AgentWorker(CommunicationManager commMan)
 {
     _commMan = commMan;
 }