Esempio n. 1
0
        public void updateStatus()
        {
            if (owner == null)
            {
                return;
            }

            if (!owner.Connected)
            {
                return;
            }

            if (MatrixLed == null || !Row.HasValue || !Column.HasValue)
            {
                Error = null;
            }
            else
            {
                if (!MatrixLed.IsPixelEnabled(owner.PokeysDevice, (byte)(Row.Value - 1), (byte)(Column.Value - 1)))
                {
                    Error = string.Format(Translations.Main.MatrixLedPixelErrorNotEnabled, Row, Column);
                }
                else
                {
                    Error = null;
                }
            }

            writeOutputState();
        }
Esempio n. 2
0
        public void updateStatus()
        {
            if (owner == null)
            {
                return;
            }

            if (MatrixLed == null || !Row.HasValue || !Column.HasValue)
            {
                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.IsPixelEnabled((byte)(Row.Value - 1), (byte)(Column.Value - 1)))
                    {
                        Error = string.Format(Translations.Main.MatrixLedPixelErrorNotEnabled, Row, Column);
                    }
                    else
                    {
                        Error = null;
                    }

                    poKeysDevice.DisconnectDevice();
                }
            }

            writeOutputState();
        }