public override void SetOpened(bool opened)
        {
            if (_smartCard == null)
            {
                _smartCard = (SmartCardRW)PosCommon;

                
                cbInterfaceMode.Items.Clear();
                foreach (SmartCardInterfaceModes val in Enum.GetValues(typeof(SmartCardInterfaceModes)))
                {
                    if (((int)_smartCard.CapInterfaceMode & (int)val) > 0)
                        cbInterfaceMode.Items.Add(val.ToString());
                }

                cbIsoEmvMode.Items.Clear();
                foreach (SmartCardIsoEmvModes val in Enum.GetValues(typeof(SmartCardIsoEmvModes)))
                {
                    if (((int)_smartCard.CapIsoEmvMode & (int)val) > 0)
                        cbIsoEmvMode.Items.Add(val.ToString());
                }

                cbSCSlot.Items.Clear();
                for (int i=0; i<32; i++)
                {
                    if ((_smartCard.CapSCSlots & (1<<i)) > 0)
                        cbSCSlot.Items.Add(i.ToString());
                }
            }
        }
Beispiel #2
0
        public override void SetOpened(bool opened)
        {
            if (_smartCard == null)
            {
                _smartCard = (SmartCardRW)PosCommon;


                cbInterfaceMode.Items.Clear();
                foreach (SmartCardInterfaceModes val in Enum.GetValues(typeof(SmartCardInterfaceModes)))
                {
                    if (((int)_smartCard.CapInterfaceMode & (int)val) > 0)
                    {
                        cbInterfaceMode.Items.Add(val.ToString());
                    }
                }

                cbIsoEmvMode.Items.Clear();
                foreach (SmartCardIsoEmvModes val in Enum.GetValues(typeof(SmartCardIsoEmvModes)))
                {
                    if (((int)_smartCard.CapIsoEmvMode & (int)val) > 0)
                    {
                        cbIsoEmvMode.Items.Add(val.ToString());
                    }
                }

                cbSCSlot.Items.Clear();
                for (int i = 0; i < 32; i++)
                {
                    if ((_smartCard.CapSCSlots & (1 << i)) > 0)
                    {
                        cbSCSlot.Items.Add(i.ToString(System.Globalization.CultureInfo.CurrentCulture));
                    }
                }
            }
        }