public void updateStatus() { if (owner == null) { return; } if (!owner.Connected) { return; } if (MatrixLedConfig == null) { Error = null; } else { if (!MatrixLed.IsEnabled(owner.PokeysDevice)) { Error = Translations.Main.MatrixLedErrorNotEnabled; } else { Error = null; } } setOutputStateDirty(); writeOutputState(); }
public void updateStatus() { if (owner == null) { return; } if (MatrixLedConfig == null) { Error = null; } else if (!owner.PokeysIndex.HasValue) { Error = null; } else { PoKeysDevice_DLL.PoKeysDevice poKeysDevice = PoKeysEnumerator.Singleton.PoKeysDevice; if (!poKeysDevice.ConnectToDevice(owner.PokeysIndex.Value)) { Error = Translations.Main.PokeysConnectError; } else { if (!MatrixLed.IsEnabled()) { Error = Translations.Main.MatrixLedErrorNotEnabled; } else { Error = null; } poKeysDevice.DisconnectDevice(); } } setOutputStateDirty(); writeOutputState(); }