private void RefreshMenu()
        {
            _rootMenuItem.Clear();
            _rootMenuItem.AddSubItem("Refresh devices list", RefreshMenu, false);

            RefreshReadsList();
        }
        private void RefreshMenu()
        {
            _rootMenuItem.Clear();
            _rootMenuItem.AddSubItem("Enable  CCID for all devices", EnableKBWCCID, false);
            _rootMenuItem.AddSubItem("Disable CCID for all devices", DisableKBWCCID, false);
            _rootMenuItem.AddSubItem("Refresh devices list", RefreshMenu, false);

            RefreshReadersList();
        }
        private static int Main(string[] args)
        {
            _rootMenu.AddSubItem(_smartCardReadersSection.RootMenuItem);
            _rootMenu.AddSubItem(_keyboardWedgesSection.RootMenuItem);

            _rootMenu.Execute();

            return(0);
        }
Example #4
0
        public OK5022MenuSection(string readerName, string serialNumber)
        {
            var description = string.IsNullOrWhiteSpace(serialNumber)
                ? $"PCSC Reader Name: {readerName}"
                : $"PCSC Reader Name: {readerName}\nSerial Number: {serialNumber}";

            _rootMenuItem = new MenuItem(description);

            var readerCapabilities = _rootMenuItem.AddSubItem("Reader Capabilities");
            {
                readerCapabilities.AddSubItem("Tlv Version", () => new ReaderCapabilitiesSample.TlvVersion().Run(readerName));
                readerCapabilities.AddSubItem("Device ID", () => new ReaderCapabilitiesSample.DeviceId().Run(readerName));
                readerCapabilities.AddSubItem("Product Name", () => new ReaderCapabilitiesSample.ProductName().Run(readerName));
                readerCapabilities.AddSubItem("Product Platform", () => new ReaderCapabilitiesSample.ProductPlatform().Run(readerName));
                readerCapabilities.AddSubItem("Enabled CL Feaures", () => new ReaderCapabilitiesSample.EnabledClFeatures().Run(readerName));
                readerCapabilities.AddSubItem("Firmware Version", () => new ReaderCapabilitiesSample.FirmwareVersion().Run(readerName));
                readerCapabilities.AddSubItem("HF Controller Version", () => new ReaderCapabilitiesSample.HfControllerVersion().Run(readerName));
                readerCapabilities.AddSubItem("Hardware Version", () => new ReaderCapabilitiesSample.HardwareVersion().Run(readerName));
                readerCapabilities.AddSubItem("Host Interfaces", () => new ReaderCapabilitiesSample.HostInterfaces().Run(readerName));
                readerCapabilities.AddSubItem("Number of Contact Slots", () => new ReaderCapabilitiesSample.NumberOfContactSlots().Run(readerName));
                readerCapabilities.AddSubItem("Number of Contactless Slots", () => new ReaderCapabilitiesSample.NumberOfContactlessSlots().Run(readerName));
                readerCapabilities.AddSubItem("Number of Antennas", () => new ReaderCapabilitiesSample.NumberOfAntennas().Run(readerName));
                readerCapabilities.AddSubItem("Human Interfaces", () => new ReaderCapabilitiesSample.HumanInterfaces().Run(readerName));
                readerCapabilities.AddSubItem("Vendor Name", () => new ReaderCapabilitiesSample.VendorName().Run(readerName));
                readerCapabilities.AddSubItem("Exchange Level", () => new ReaderCapabilitiesSample.ExchangeLevel().Run(readerName));
                readerCapabilities.AddSubItem("Serial Number", () => new ReaderCapabilitiesSample.SerialNumber().Run(readerName));
                readerCapabilities.AddSubItem("HF Controller Type", () => new ReaderCapabilitiesSample.HfControllerType().Run(readerName));
                readerCapabilities.AddSubItem("Size of User EEPROM", () => new ReaderCapabilitiesSample.SizeOfUserEeprom().Run(readerName));
                readerCapabilities.AddSubItem("Firmware Label", () => new ReaderCapabilitiesSample.FirmwareLabel().Run(readerName));
            }

            var userEeprom = _rootMenuItem.AddSubItem("User EEPROM");
            {
                userEeprom.AddSubItem("Read Example", () => new ReaderEepromSample.ReadEeprom().Run(readerName));
                userEeprom.AddSubItem("Write Example", () => new ReaderEepromSample.WriteEeprom().Run(readerName));
            }

            var configurationControl = _rootMenuItem.AddSubItem("Configuration Control");
            {
                configurationControl.AddSubItem("Reboot Reader", () => new ReaderConfigurationControlSample.RebootDevice().Run(readerName));
                configurationControl.AddSubItem("Restore Factory Defaults", () => new ReaderConfigurationControlSample.RestoreFactoryDefaults().Run(readerName));
                configurationControl.AddSubItem("Apply Settings", () => new ReaderConfigurationControlSample.ApplySettings().Run(readerName));
            }

            var contactlessSlotConfiguration = _rootMenuItem.AddSubItem("Contactless Slot Configuration");
            {
                var iso14443a = contactlessSlotConfiguration.AddSubItem("ISO 14443 Type A");
                {
                    iso14443a.AddSubItem("Read Configuration", () => ReaderContactlessSlotConfigurationSample.ReadIso14443TypeAConfiguration(readerName));
                    iso14443a.AddSubItem("Set ISO 14443 Type A", () => ReaderContactlessSlotConfigurationSample.SetIso14443TypeAEnable(readerName));
                    iso14443a.AddSubItem("Set ISO 14443 Type A RxTx Baud Rates", () => ReaderContactlessSlotConfigurationSample.SetIso14443TypeARxTxBaudRate(readerName));
                    iso14443a.AddSubItem("Set Mifare Key Cache", () => ReaderContactlessSlotConfigurationSample.SetMifareKeyCache(readerName));
                    iso14443a.AddSubItem("Set Mifare Preferred", () => ReaderContactlessSlotConfigurationSample.SetMifarePreferred(readerName));
                }

                var iso14443b = contactlessSlotConfiguration.AddSubItem("ISO 14443 Type B");
                {
                    iso14443b.AddSubItem("Read Configuration", () => ReaderContactlessSlotConfigurationSample.ReadIso14443TypeBConfiguration(readerName));
                    iso14443b.AddSubItem("Set ISO 14443 Type B", () => ReaderContactlessSlotConfigurationSample.SetIso14443TypeBEnable(readerName));
                    iso14443b.AddSubItem("Set ISO 14443 Type B RxTx Baud Rates", () => ReaderContactlessSlotConfigurationSample.SetIso14443TypeBRxTxBaudRate(readerName));
                }

                var iso15693 = contactlessSlotConfiguration.AddSubItem("ISO 15693");
                {
                    iso15693.AddSubItem("Read Configuration", () => ReaderContactlessSlotConfigurationSample.ReadIso15693Configuration(readerName));
                    iso15693.AddSubItem("Set ISO 15693", () => ReaderContactlessSlotConfigurationSample.SetIso15693Enable(readerName));
                }

                var felica = contactlessSlotConfiguration.AddSubItem("Felica");
                {
                    felica.AddSubItem("Read Configuration", () => ReaderContactlessSlotConfigurationSample.ReadFelicaConfiguration(readerName));
                    felica.AddSubItem("Set Felica", () => ReaderContactlessSlotConfigurationSample.SetFelicaEnable(readerName));
                    felica.AddSubItem("Set Felica RxTx Baud Rates", () => ReaderContactlessSlotConfigurationSample.SetFelicaRxTxBaudRate(readerName));
                }

                var iclass15693 = contactlessSlotConfiguration.AddSubItem("iClass 15693");
                {
                    iclass15693.AddSubItem("Read Configuration", () => ReaderContactlessSlotConfigurationSample.ReadIclass15693Configuration(readerName));
                    iclass15693.AddSubItem("Set iClass 15693", () => ReaderContactlessSlotConfigurationSample.SetIclass15693Enable(readerName));
                }

                var contactlessCommon = contactlessSlotConfiguration.AddSubItem("Contactless Common");
                {
                    contactlessCommon.AddSubItem("Read Configuration", () => ReaderContactlessSlotConfigurationSample.ReadOK5022CommonConfiguration(readerName));
                    contactlessCommon.AddSubItem("Set EMD Supression", () => ReaderContactlessSlotConfigurationSample.SetEmdSupressionEnable(readerName));
                    contactlessCommon.AddSubItem("Set Polling Search Order", () => ReaderContactlessSlotConfigurationSample.SetPollingSearchOrder(readerName));
                    contactlessCommon.AddSubItem("Set Sleep Mode Card Detection", () => ReaderContactlessSlotConfigurationSample.SetSleepModeCardDetectionEnable(readerName));
                    contactlessCommon.AddSubItem("Set Sleep Mode Polling Frequency", () => ReaderContactlessSlotConfigurationSample.SetSleepModePollingFrequency(readerName));
                }
            }

            var contactlessCardExamples = _rootMenuItem.AddSubItem("Contactless Card Examples");
            {
                var mifareExamples = contactlessCardExamples.AddSubItem("Mifare Classic 4K Examples");
                {
                    mifareExamples.AddSubItem("Load key without Secure Session Example", () => new ExampleWithMifareClassic.LoadKeyExample().Run(readerName));
                    mifareExamples.AddSubItem("Get Card UID Example", () => new GetDataExample().Run(readerName));
                    mifareExamples.AddSubItem("Get Card Historical Bytes Example", () => new GetHistoricalBytesExample().Run(readerName));
                    mifareExamples.AddSubItem("Read Example", () => new ExampleWithMifareClassic.ReadBinaryMifareClassic1kExample().Run(readerName));
                    mifareExamples.AddSubItem("Write Example", () => new ExampleWithMifareClassic.UpdateBinaryMifareClassic1kExample().Run(readerName));
                    mifareExamples.AddSubItem("Increment Example", () => new ExampleWithMifareClassic.IncrementMifareClassic1kExample().Run(readerName));
                    mifareExamples.AddSubItem("Decrement Example", () => new ExampleWithMifareClassic.DecrementMifareClassic1kExample().Run(readerName));
                }

                var iclassExamples = contactlessCardExamples.AddSubItem("iClass Examples");
                {
                    iclassExamples.AddSubItem("Load iClass and Secure Session keys Example", () => new ExampleWithiClass.LoadKeyToPcScContainerExample().Run(readerName));
                    iclassExamples.AddSubItem("Get Card CSN Example", () => new GetDataExample().Run(readerName));
                    iclassExamples.AddSubItem("Read Binary iClass 16k Example", () => new ExampleWithiClass.ReadBinaryiClass16kExample().Run(readerName));
                    iclassExamples.AddSubItem("Update Binary iClass 16k Example", () => new ExampleWithiClass.UpdateBinaryiClass16kExample().Run(readerName));
                    iclassExamples.AddSubItem("Read Binary iClass 2ks Example", () => new ExampleWithiClass.ReadBinaryiClass2ksExample().Run(readerName));
                    iclassExamples.AddSubItem("Update Binary iClass 2ks Example", () => new ExampleWithiClass.UpdateBinaryiClass2ksExample().Run(readerName));
                }

                var iso15693Examples = contactlessCardExamples.AddSubItem("ISO 15693 Examples");
                {
                    iso15693Examples.AddSubItem("ISO 15693 Get Card CSN Example", () => new GetDataExample().Run(readerName));
                    iso15693Examples.AddSubItem("Read Binary NXP iCode Example", () => new ExampleWithIso15693.ReadBinaryNXPiCode().Run(readerName));
                    iso15693Examples.AddSubItem("Update Binary NXP iCode Example", () => new ExampleWithIso15693.UpdateBinaryNXPiCode().Run(readerName));
                }

                contactlessCardExamples.AddSubItem("Seos Example", () => new GetDataExample().Run(readerName));
            }
        }
        public Ok5422MenuSection(string readerName, string serialNumber)
        {
            var description = string.IsNullOrWhiteSpace(serialNumber)
                ? $"PCSC Reader Name: {readerName}"
                : $"PCSC Reader Name: {readerName}\nSerial Number: {serialNumber}";

            _rootMenuItem = new MenuItem(description);

            var readerCapabilities = _rootMenuItem.AddSubItem("Reader Capabilities");
            {
                readerCapabilities.AddSubItem("Tlv Version", () => new ReaderCapabilitiesSample.TlvVersion().Run(readerName));
                readerCapabilities.AddSubItem("Device ID", () => new ReaderCapabilitiesSample.DeviceId().Run(readerName));
                readerCapabilities.AddSubItem("Product Name", () => new ReaderCapabilitiesSample.ProductName().Run(readerName));
                readerCapabilities.AddSubItem("Product Platform", () => new ReaderCapabilitiesSample.ProductPlatform().Run(readerName));
                readerCapabilities.AddSubItem("Enabled CL Feaures", () => new ReaderCapabilitiesSample.EnabledClFeatures().Run(readerName));
                readerCapabilities.AddSubItem("Firmware Version", () => new ReaderCapabilitiesSample.FirmwareVersion().Run(readerName));
                readerCapabilities.AddSubItem("HF Controller Version", () => new ReaderCapabilitiesSample.HfControllerVersion().Run(readerName));
                readerCapabilities.AddSubItem("Hardware Version", () => new ReaderCapabilitiesSample.HardwareVersion().Run(readerName));
                readerCapabilities.AddSubItem("Host Interfaces", () => new ReaderCapabilitiesSample.HostInterfaces().Run(readerName));
                readerCapabilities.AddSubItem("Number of Contact Slots", () => new ReaderCapabilitiesSample.NumberOfContactSlots().Run(readerName));
                readerCapabilities.AddSubItem("Number of Contactless Slots", () => new ReaderCapabilitiesSample.NumberOfContactlessSlots().Run(readerName));
                readerCapabilities.AddSubItem("Number of Antennas", () => new ReaderCapabilitiesSample.NumberOfAntennas().Run(readerName));
                readerCapabilities.AddSubItem("Human Interfaces", () => new ReaderCapabilitiesSample.HumanInterfaces().Run(readerName));
                readerCapabilities.AddSubItem("Vendor Name", () => new ReaderCapabilitiesSample.VendorName().Run(readerName));
                readerCapabilities.AddSubItem("Exchange Level", () => new ReaderCapabilitiesSample.ExchangeLevel().Run(readerName));
                readerCapabilities.AddSubItem("Serial Number", () => new ReaderCapabilitiesSample.SerialNumber().Run(readerName));
                readerCapabilities.AddSubItem("HF Controller Type", () => new ReaderCapabilitiesSample.HfControllerType().Run(readerName));
                readerCapabilities.AddSubItem("Size of User EEPROM", () => new ReaderCapabilitiesSample.SizeOfUserEeprom().Run(readerName));
                readerCapabilities.AddSubItem("Firmware Label", () => new ReaderCapabilitiesSample.FirmwareLabel().Run(readerName));
            }

            var userEeprom = _rootMenuItem.AddSubItem("User EEPROM");
            {
                userEeprom.AddSubItem("Read Example", () => new ReaderEepromSample.ReadEeprom().Run(readerName));
                userEeprom.AddSubItem("Write Example", () => new ReaderEepromSample.WriteEeprom().Run(readerName));
            }

            var configurationControl = _rootMenuItem.AddSubItem("Configuration Control");
            {
                configurationControl.AddSubItem("Reboot Reader", () => new ReaderConfigurationControlSample.RebootDevice().Run(readerName));
                configurationControl.AddSubItem("Restore Factory Defaults", () => new ReaderConfigurationControlSample.RestoreFactoryDefaults().Run(readerName));
                configurationControl.AddSubItem("Apply Settings", () => new ReaderConfigurationControlSample.ApplySettings().Run(readerName));
            }

            var contactSlotConfiguration = _rootMenuItem.AddSubItem("Contact Slot Configuration");
            {
                contactSlotConfiguration.AddSubItem("Read Configuration", () => ReaderContactSlotConfigurationSample.ReadContactSlotConfiguration(readerName));
                contactSlotConfiguration.AddSubItem("Set Contact Slot Enable Example", () => ReaderContactSlotConfigurationSample.SetContactSlotEnable(readerName));
                contactSlotConfiguration.AddSubItem("Set Operation Mode Example", () => ReaderContactSlotConfigurationSample.SetOperatingMode(readerName));
                contactSlotConfiguration.AddSubItem("Set Voltage Sequence Example", () => ReaderContactSlotConfigurationSample.SetVoltageSequence(readerName));
            }

            var contactlessSlotConfiguration = _rootMenuItem.AddSubItem("Contactless Slot Configuration");

            {
                var iso14443a = contactlessSlotConfiguration.AddSubItem("ISO 14443 Type A");
                {
                    iso14443a.AddSubItem("Read Configuration", () => ReaderContactlessSlotConfigurationSample.ReadIso14443TypeAConfiguration(readerName));
                    iso14443a.AddSubItem("Set ISO 14443 Type A", () => ReaderContactlessSlotConfigurationSample.SetIso14443TypeAEnable(readerName));
                    iso14443a.AddSubItem("Set ISO 14443 Type A RxTx Baud Rates", () => ReaderContactlessSlotConfigurationSample.SetIso14443TypeARxTxBaudRate(readerName));
                    iso14443a.AddSubItem("Set Mifare Key Cache", () => ReaderContactlessSlotConfigurationSample.SetMifareKeyCache(readerName));
                    iso14443a.AddSubItem("Set Mifare Preferred", () => ReaderContactlessSlotConfigurationSample.SetMifarePreferred(readerName));
                }

                var iso14443b = contactlessSlotConfiguration.AddSubItem("ISO 14443 Type B");
                {
                    iso14443b.AddSubItem("Read Configuration", () => ReaderContactlessSlotConfigurationSample.ReadIso14443TypeBConfiguration(readerName));
                    iso14443b.AddSubItem("Set ISO 14443 Type B", () => ReaderContactlessSlotConfigurationSample.SetIso14443TypeBEnable(readerName));
                    iso14443b.AddSubItem("Set ISO 14443 Type B RxTx Baud Rates", () => ReaderContactlessSlotConfigurationSample.SetIso14443TypeBRxTxBaudRate(readerName));
                }

                var iclass15693 = contactlessSlotConfiguration.AddSubItem("ISO 15693");
                {
                    iclass15693.AddSubItem("Read Configuration", () => ReaderContactlessSlotConfigurationSample.ReadIclass15693Configuration(readerName));
                    iclass15693.AddSubItem("Set iClass 15693", () => ReaderContactlessSlotConfigurationSample.SetIclass15693Enable(readerName));
                }

                var contactlessCommon = contactlessSlotConfiguration.AddSubItem("Contactless Common");
                {
                    contactlessCommon.AddSubItem("Read Configuration", () => ReaderContactlessSlotConfigurationSample.ReadOK5422CommonConfiguration(readerName));
                    contactlessCommon.AddSubItem("Set Polling RF Module", () => ReaderContactlessSlotConfigurationSample.SetPollingRfModuleEnable(readerName));
                    contactlessCommon.AddSubItem("Set EMD Supression", () => ReaderContactlessSlotConfigurationSample.SetEmdSupressionEnable(readerName));
                    contactlessCommon.AddSubItem("Set Sleep Mode Card Detection", () => ReaderContactlessSlotConfigurationSample.SetSleepModeCardDetectionEnable(readerName));
                    contactlessCommon.AddSubItem("Set Sleep Mode Polling Frequency", () => ReaderContactlessSlotConfigurationSample.SetSleepModePollingFrequency(readerName));
                }
            }

            if (!readerName.Contains("CL"))
            {
                var synchronusContactCardExamples = _rootMenuItem.AddSubItem("Synchronus Contact Card Examples");
                {
                    var synchronus2wbp = synchronusContactCardExamples.AddSubItem("2WBP Example with SLE5542");
                    {
                        synchronus2wbp.AddSubItem("Read Main Memory", () => ContactCardCommunicationSample.ReadMainMemory2WbpExample(readerName));
                        synchronus2wbp.AddSubItem("Read Protection Memory", () => ContactCardCommunicationSample.ReadProtectionMemory2WbpExample(readerName));
                        synchronus2wbp.AddSubItem("Update Main Memory", () => ContactCardCommunicationSample.UpdateMainMemory2WbpExample(readerName));
                    }

                    var synchronus3wbp = synchronusContactCardExamples.AddSubItem("3WBP Example with SLE5528");
                    {
                        synchronus3wbp.AddSubItem("Read Main Memory", () => ContactCardCommunicationSample.ReadMainMemory3WbpExample(readerName));
                        synchronus3wbp.AddSubItem("Update Main Memory", () => ContactCardCommunicationSample.UpdateMainMemory3WbpExample(readerName));
                    }

                    var synchronusI2c = synchronusContactCardExamples.AddSubItem("I2C Example");
                    {
                        synchronusI2c.AddSubItem("Read Example with AT24C16", () => ContactCardCommunicationSample.ReadI2CExampleAt24C16(readerName));
                        synchronusI2c.AddSubItem("Write Example with AT24C16", () => ContactCardCommunicationSample.WriteI2CExampleAt24C16(readerName));
                        synchronusI2c.AddSubItem("Read Example with AT24C128", () => ContactCardCommunicationSample.ReadI2CExampleAt24C128(readerName));
                        synchronusI2c.AddSubItem("Write Example with AT24C128", () => ContactCardCommunicationSample.WriteI2CExampleAt24C128(readerName));
                    }
                }
            }
            else
            {
                var contactlessCardExamples = _rootMenuItem.AddSubItem("Contactless Card Examples");
                {
                    var mifareExamples = contactlessCardExamples.AddSubItem("Mifare Classic 1k/4K Examples");
                    {
                        mifareExamples.AddSubItem("Load key without Secure Session Example", () => new ExampleWithMifareClassic.LoadKeyExample().Run(readerName));
                        mifareExamples.AddSubItem("Get Card UID Example", () => new GetDataExample().Run(readerName));
                        mifareExamples.AddSubItem("Get Card Historical Bytes Example", () => new GetHistoricalBytesExample().Run(readerName));
                        mifareExamples.AddSubItem("Read Example", () => new ExampleWithMifareClassic.ReadBinaryMifareClassic1kExample().Run(readerName));
                        mifareExamples.AddSubItem("Write Example", () => new ExampleWithMifareClassic.UpdateBinaryMifareClassic1kExample().Run(readerName));
                        mifareExamples.AddSubItem("Increment Example", () => new ExampleWithMifareClassic.IncrementMifareClassic1kExample().Run(readerName));
                        mifareExamples.AddSubItem("Decrement Example", () => new ExampleWithMifareClassic.DecrementMifareClassic1kExample().Run(readerName));
                    }

                    contactlessCardExamples.AddSubItem("Seos Example", () => new GetDataExample().Run(readerName));

                    var iclassExamples = contactlessCardExamples.AddSubItem("iClass Examples");
                    {
                        iclassExamples.AddSubItem("Load iClass and Secure Session keys Example", () => new ExampleWithiClass.LoadKeyToPcScContainerExample().Run(readerName));
                        iclassExamples.AddSubItem("Get Card CSN Example", () => new GetDataExample().Run(readerName));
                        iclassExamples.AddSubItem("Read Binary iClass 16k Example", () => new ExampleWithiClass.ReadBinaryiClass16kExample().Run(readerName));
                        iclassExamples.AddSubItem("Update Binary iClass 16k Example", () => new ExampleWithiClass.UpdateBinaryiClass16kExample().Run(readerName));
                        iclassExamples.AddSubItem("Read Binary iClass 2ks Example", () => new ExampleWithiClass.ReadBinaryiClass2ksExample().Run(readerName));
                        iclassExamples.AddSubItem("Update Binary iClass 2ks Example", () => new ExampleWithiClass.UpdateBinaryiClass2ksExample().Run(readerName));
                    }
                }
            }
        }
Example #6
0
        public OK5027MenuSection(string readerName, string serialNumber)
        {
            var description = string.IsNullOrWhiteSpace(serialNumber)
                ? $"PCSC Reader Name: {readerName}"
                : $"PCSC Reader Name: {readerName}\nSerial Number: {serialNumber}";

            _rootMenuItem = new MenuItem(description);

            var readerCapabilities = _rootMenuItem.AddSubItem("Reader Capabilities");
            {
                readerCapabilities.AddSubItem("Tlv Version", () => new ReaderCapabilitiesSample.TlvVersion().Run(readerName));
                readerCapabilities.AddSubItem("Device ID", () => new ReaderCapabilitiesSample.DeviceId().Run(readerName));
                readerCapabilities.AddSubItem("Product Name", () => new ReaderCapabilitiesSample.ProductName().Run(readerName));
                readerCapabilities.AddSubItem("Product Platform", () => new ReaderCapabilitiesSample.ProductPlatform().Run(readerName));
                readerCapabilities.AddSubItem("Enabled CL Feaures", () => new ReaderCapabilitiesSample.EnabledClFeatures().Run(readerName));
                readerCapabilities.AddSubItem("Firmware Version", () => new ReaderCapabilitiesSample.FirmwareVersion().Run(readerName));
                readerCapabilities.AddSubItem("HF Controller Version", () => new ReaderCapabilitiesSample.HfControllerVersion().Run(readerName));
                readerCapabilities.AddSubItem("Hardware Version", () => new ReaderCapabilitiesSample.HardwareVersion().Run(readerName));
                readerCapabilities.AddSubItem("Host Interfaces", () => new ReaderCapabilitiesSample.HostInterfaces().Run(readerName));
                readerCapabilities.AddSubItem("Number of Contact Slots", () => new ReaderCapabilitiesSample.NumberOfContactSlots().Run(readerName));
                readerCapabilities.AddSubItem("Number of Contactless Slots", () => new ReaderCapabilitiesSample.NumberOfContactlessSlots().Run(readerName));
                readerCapabilities.AddSubItem("Number of Antennas", () => new ReaderCapabilitiesSample.NumberOfAntennas().Run(readerName));
                readerCapabilities.AddSubItem("Vendor Name", () => new ReaderCapabilitiesSample.VendorName().Run(readerName));
                readerCapabilities.AddSubItem("Exchange Level", () => new ReaderCapabilitiesSample.ExchangeLevel().Run(readerName));
                readerCapabilities.AddSubItem("Serial Number", () => new ReaderCapabilitiesSample.SerialNumber().Run(readerName));
                readerCapabilities.AddSubItem("HF Controller Type", () => new ReaderCapabilitiesSample.HfControllerType().Run(readerName));
                readerCapabilities.AddSubItem("Size of User EEPROM", () => new ReaderCapabilitiesSample.SizeOfUserEeprom().Run(readerName));
                readerCapabilities.AddSubItem("Firmware Label", () => new ReaderCapabilitiesSample.FirmwareLabel().Run(readerName));
            }

            var userEeprom = _rootMenuItem.AddSubItem("User EEPROM");
            {
                userEeprom.AddSubItem("Read Example", () => new ReaderEepromSample.ReadEeprom().Run(readerName));
                userEeprom.AddSubItem("Write Example", () => new ReaderEepromSample.WriteEeprom().Run(readerName));
            }

            var configurationControl = _rootMenuItem.AddSubItem("Configuration Control");
            {
                configurationControl.AddSubItem("Reboot Reader", () => new ReaderConfigurationControlSample.RebootDevice().Run(readerName));
                configurationControl.AddSubItem("Restore Factory Defaults", () => new ReaderConfigurationControlSample.RestoreFactoryDefaults().Run(readerName));
                configurationControl.AddSubItem("Apply Settings", () => new ReaderConfigurationControlSample.ApplySettings().Run(readerName));
            }

            var contactlessSlotConfiguration = _rootMenuItem.AddSubItem("Contactless Slot Configuration");
            {
                var iso14443a = contactlessSlotConfiguration.AddSubItem("ISO 14443 Type A");
                {
                    iso14443a.AddSubItem("Get ISO 14443 Type A RxTx Baud Rates", () => new Iso14443TypeAConfigurationSample.RxTxBaudRate().Run(readerName, RequestType.Get));
                    iso14443a.AddSubItem("Set ISO 14443 Type A RxTx Baud Rates", () => new Iso14443TypeAConfigurationSample.RxTxBaudRate().Run(readerName, RequestType.Set));
                    iso14443a.AddSubItem("Get ISO 14443 Type A Mifare Emulation Preferred", () => new Iso14443TypeAConfigurationSample.MifareEmulationPreferred().Run(readerName, RequestType.Get));
                    iso14443a.AddSubItem("Set ISO 14443 Type A Mifare Emulation Preferred", () => new Iso14443TypeAConfigurationSample.MifareEmulationPreferred().Run(readerName, RequestType.Set));
                }

                var iso14443b = contactlessSlotConfiguration.AddSubItem("ISO 14443 Type B");
                {
                    iso14443b.AddSubItem("Get ISO 14443 Type B RxTx Baud Rates", () => new Iso14443TypeBConfigurationSample.RxTxBaudRate().Run(readerName, RequestType.Get));
                    iso14443b.AddSubItem("Set ISO 14443 Type B RxTx Baud Rates", () => new Iso14443TypeBConfigurationSample.RxTxBaudRate().Run(readerName, RequestType.Set));
                }

                var felica = contactlessSlotConfiguration.AddSubItem("Felica");
                {
                    felica.AddSubItem("Get Felica RxTx Baud Rates", () => new FelicaConfigurationSample.RxTxBaudRate().Run(readerName, RequestType.Get));
                    felica.AddSubItem("Set Felica RxTx Baud Rates", () => new FelicaConfigurationSample.RxTxBaudRate().Run(readerName, RequestType.Set));
                }
            }

            var kwConfiguration = _rootMenuItem.AddSubItem("Keyboard Wedge Configuration");
            {
                kwConfiguration.AddSubItem("Get Credential Type", () => new KeyboardWedgeConfigurationSample.CredentialTypeCommand().Run(readerName, RequestType.Get));
                kwConfiguration.AddSubItem("Set Credential Type", () => new KeyboardWedgeConfigurationSample.CredentialTypeCommand().Run(readerName, RequestType.Set));

                kwConfiguration.AddSubItem("Get Output Format", () => new KeyboardWedgeConfigurationSample.OutputFormatCommand().Run(readerName, RequestType.Get));
                kwConfiguration.AddSubItem("Set Output Format", () => new KeyboardWedgeConfigurationSample.OutputFormatCommand().Run(readerName, RequestType.Set));

                kwConfiguration.AddSubItem("Get Output Flags", () => new KeyboardWedgeConfigurationSample.OutputFlagsCommand().Run(readerName, RequestType.Get));
                kwConfiguration.AddSubItem("Set Output Flags", () => new KeyboardWedgeConfigurationSample.OutputFlagsCommand().Run(readerName, RequestType.Set));

                kwConfiguration.AddSubItem("Get Range Offset", () => new KeyboardWedgeConfigurationSample.RangeOffsetCommand().Run(readerName, RequestType.Get));
                kwConfiguration.AddSubItem("Set Range Offset", () => new KeyboardWedgeConfigurationSample.RangeOffsetCommand().Run(readerName, RequestType.Set));

                kwConfiguration.AddSubItem("Get Range Length", () => new KeyboardWedgeConfigurationSample.RangeLengthCommand().Run(readerName, RequestType.Get));
                kwConfiguration.AddSubItem("Set Range Length", () => new KeyboardWedgeConfigurationSample.RangeLengthCommand().Run(readerName, RequestType.Set));

                kwConfiguration.AddSubItem("Get Post Strokes Start", () => new KeyboardWedgeConfigurationSample.PostStrokesStartCommand().Run(readerName, RequestType.Get));
                kwConfiguration.AddSubItem("Set Post Strokes Start", () => new KeyboardWedgeConfigurationSample.PostStrokesStartCommand().Run(readerName, RequestType.Set));

                kwConfiguration.AddSubItem("Get Pre Post Strokes", () => new KeyboardWedgeConfigurationSample.PrePostStrokesCommand().Run(readerName, RequestType.Get));
                kwConfiguration.AddSubItem("Set Pre Post Strokes", () => new KeyboardWedgeConfigurationSample.PrePostStrokesCommand().Run(readerName, RequestType.Set));

                kwConfiguration.AddSubItem("Get Keyboard Layout", () => new KeyboardWedgeConfigurationSample.KeyboardLayoutCommand().Run(readerName, RequestType.Get));
                kwConfiguration.AddSubItem("Set Keyboard Layout", () => new KeyboardWedgeConfigurationSample.KeyboardLayoutCommand().Run(readerName, RequestType.Set));

                kwConfiguration.AddSubItem("Get Extended Character Support", () => new KeyboardWedgeConfigurationSample.ExtendedCharacterSupportCommand().Run(readerName, RequestType.Get));
                kwConfiguration.AddSubItem("Set Extended Character Support", () => new KeyboardWedgeConfigurationSample.ExtendedCharacterSupportCommand().Run(readerName, RequestType.Set));

                kwConfiguration.AddSubItem("Get Character Differences", () => new KeyboardWedgeConfigurationSample.CharacterDifferencesCommand().Run(readerName, RequestType.Get));
                kwConfiguration.AddSubItem("Set Character Differences", () => new KeyboardWedgeConfigurationSample.CharacterDifferencesCommand().Run(readerName, RequestType.Set));

                kwConfiguration.AddSubItem("Get Configuration Card Support", () => new KeyboardWedgeConfigurationSample.ConfigurationCardSupportCommand().Run(readerName, RequestType.Get));
                kwConfiguration.AddSubItem("Set Configuration Card Support", () => new KeyboardWedgeConfigurationSample.ConfigurationCardSupportCommand().Run(readerName, RequestType.Set));

                kwConfiguration.AddSubItem("Get Led Idle State", () => new KeyboardWedgeConfigurationSample.LedIdleStateCommand().Run(readerName, RequestType.Get));
                kwConfiguration.AddSubItem("Set Led Idle State", () => new KeyboardWedgeConfigurationSample.LedIdleStateCommand().Run(readerName, RequestType.Set));

                kwConfiguration.AddSubItem("Configuration Card Write Data", () => new KeyboardWedgeConfigurationSample.ConfigurationCardWriteDataCommand().Run(readerName));
                kwConfiguration.AddSubItem("Configuration Card Security Key Update (be careful it will update default keys stroed in the reader)", () => new KeyboardWedgeConfigurationSample.ConfigurationCardSecurityKeyUpdateCommand().Run(readerName));
            }
        }