static private void selectDeviceVideoMode(NuitrackDevice device, StreamType stream) { List <VideoMode> modes = device.GetAvailableVideoModes(stream); if (stream == StreamType.DEPTH) { Console.WriteLine("Available depth video modes:"); } else if (stream == StreamType.COLOR) { Console.WriteLine("Available color video modes:"); } for (int vm = 0; vm < modes.Count; vm++) { Console.WriteLine(" [{0}] {1} x {2} @ {3} fps", vm, modes[vm].width, modes[vm].height, modes[vm].fps); } Console.WriteLine("(WARNING: not all video modes are supported)"); int vmIdx = UserInteraction.AskIntDefault("\nSelect the video mode", 0, modes.Count, -1); if (vmIdx != -1) { device.SetVideoMode(stream, modes[vmIdx]); } }