static void Main(string[] args) { Console.WriteLine("Press Any Key to Create DUODevice"); Console.ReadKey(); DUODevice device = new DUODevice(); Console.WriteLine(device); Console.WriteLine("\nPress Any Key to Start Capture"); Console.ReadKey(); device.DUODeviceStatusChanged += DUODeviceStatusChanged; device.DUOFrameReceived += DUOFrameReceived; device.Start(); Console.WriteLine("\nPress Any Key to Stop Capture"); Console.ReadKey(); device.Stop(); device.Dispose(); }
void MainWindow_Closing(object sender, CancelEventArgs e) { duoDevice.Stop(); }