public void StartNetDataCollector(List <string> devicesNames, string filter, bool mode) { if (devicesNames != null) { foreach (string device in devicesNames) { NetCollector newNetDataCollector = new NetCollector(device, filter, mode); netDataCollector.Add(device, newNetDataCollector); newNetDataCollector.sendToManager += GetNewPacketFromNet; newNetDataCollector.Start(); } } else { NetCollector newNetDataCollector = new NetCollector(filter, mode); netDataCollector.Add(newNetDataCollector.CurrentDevice.Name, newNetDataCollector); newNetDataCollector.sendToManager += GetNewPacketFromNet; newNetDataCollector.Start(); } }
public void StartNetDataCollector(string[] devicesNames, string filter, bool mode) { if (devicesNames != null) { foreach (string device in devicesNames) { NetCollector newNetDataCollector = new NetCollector(device, filter, mode); netDataCollector.Add(device, newNetDataCollector); newNetDataCollector.sendToManager += SendNetPacketToAnalyzer; newNetDataCollector.Start(); } } else { NetCollector newNetDataCollector = new NetCollector(filter, mode); netDataCollector.Add(newNetDataCollector.CurrentDevice.Name, newNetDataCollector); newNetDataCollector.sendToManager += SendNetPacketToAnalyzer; newNetDataCollector.Start(); } }