private void Test_Click_2(object sender, RoutedEventArgs e) { DeviceMonitor device = new DeviceMonitor(); device.Do(); bGo.IsEnabled = false; }