예제 #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;
     }            
 }