예제 #1
0
 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();
     }
 }
예제 #2
0
 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();
     }
 }