private void OpenAllChannels() { IRelayDeviceInfo device = GetCurrentDevice(); if (device == null) { return; } using (var relayController = new RelayController()) { relayController.ConnectDevice(device); relayController.OpenAllChannels(device); } }