Exemplo n.º 1
0
 public Controller(int clientsCount = 3, ListBox portListBox = null)
 {
     _mails        = new LinkedList <Mail>();
     _readers      = new LinkedList <Reader>();
     _clientsCount = clientsCount;
     _port         = new Port(1, 5, portListBox);
     _method       = Recreate;
 }
Exemplo n.º 2
0
 public Reader(int readCount, int number, ListBox listBox, RecrateDelegate method, Port port)
 {
     _listBox     = listBox;
     _readCount   = readCount;
     _port        = port;
     _method      = method;
     _thread      = new Thread(Read);
     _thread.Name = "Reader " + number;
     _thread.Start();
 }