示例#1
0
 public void ToggleRunning()
 {
     if (Running)
     {
         ToggleRunningButton.Content = "Start";
         Running = false;
         Sniffer.Stop();
         Sniffer = null;
     }
     else
     {
         ToggleRunningButton.Content = "Stop";
         Sniffer = new Sniffer((ICaptureDevice)DeviceListComboBox.SelectedValue);
         Sniffer.Start();
         Running = true;
     }
 }
示例#2
0
 public void ToggleRunning()
 {
     if (Running)
     {
         ToggleRunningButton.Content = "Start";
         Running = false;
         Sniffer.Stop();
         Sniffer = null;
     }
     else
     {
         ToggleRunningButton.Content = "Stop";
         Sniffer = new Sniffer((ICaptureDevice)DeviceListComboBox.SelectedValue);
         Sniffer.Start();
         Running = true;
     }            
 }