示例#1
0
 def __init__(self, parent):
     CommandDialogBase_REQBWUPB.__init__(self, parent)
     self.__mode = MODE_IDLE
     self._textctrlAFI.SetMaxLength(1 * 2)
     self._textctrlApf.SetMaxLength(1 * 2)
     self._textctrlCommandValue.SetMaxLength(3 * 3)
     # Set validator;
     self._textctrlAFI.SetValidator(HexValidator())
     self._textctrlApf.SetValidator(HexValidator())
     self._textctrlCommandValue.SetValidator(HexValidator())
示例#2
0
    def __init__( self, parent ):
        CommandDialogBase_ATTRIB.__init__ ( self, parent )
        self.__mode = MODE_IDLE
        self._textctrlCommandHeader.SetMaxLength(1 * 2)
#         self._textctrlHigherLayerINF.SetMaxLength()
        self._textctrlIdentifier.SetMaxLength(4 * 2)
#         self._textctrlCommandValue.SetMaxLength()

        # Set validator;
        self._textctrlCommandHeader.SetValidator(HexValidator())
        self._textctrlHigherLayerINF.SetValidator(HexValidator())
        self._textctrlIdentifier.SetValidator(HexValidator())
        self._textctrlCommandValue.SetValidator(HexValidator())
示例#3
0
    def __init__(self, parent, bytesCount=1):
        CommandDialogBase_MifareAuthentication.__init__(self, parent)
        self.__mode = MODE_IDLE
        self._textctrlCommandValue.SetMaxLength(bytesCount * 2)
        # Set validator;
        self._textctrlCommandValue.SetValidator(HexValidator())

        self._textctrlUID.SetValue('00000000')

        for i in range(256):
            self._choiceBlockNumber.Append('%d' % (i))
示例#4
0
 def __init__( self, parent ):
     DESFireDialogBase_CreateApplication.__init__ ( self, parent )
     
     self._textctrlAID.SetValidator(HexValidator())
     self._textctrlKeySettings.SetValidator(HexValidator())
     self._textctrlNumOfKeys.SetValidator(HexValidator())
示例#5
0
    def __init__(self, parent, file_type):
        DESFireDialogBase_CreateFile.__init__(self, parent)

        self._textctrlFileNo.SetValidator(HexValidator())
        self._textctrlComSet.SetValidator(HexValidator())
        self._textctrlAccessRights.SetValidator(HexValidator())
        self._textctrlFileSize.SetValidator(HexValidator())
        self._textctrlLowerLimit.SetValidator(HexValidator())
        self._textctrlUpperLimit.SetValidator(HexValidator())
        self._textctrlValue.SetValidator(HexValidator())
        self._textctrlRecordSize.SetValidator(HexValidator())
        self._textctrlMaxNumOfRecords.SetValidator(HexValidator())

        self._textctrlFileSize.Hide()
        self._textctrlLowerLimit.Hide()
        self._textctrlUpperLimit.Hide()
        self._textctrlValue.Hide()
        self._checkboxLimitedCreditEnabled.Hide()
        self._textctrlRecordSize.Hide()
        self._textctrlMaxNumOfRecords.Hide()

        self._statictextFileSize.Hide()
        self._statictextLowerLimit.Hide()
        self._statictextUpperLimit.Hide()
        self._statictextValue.Hide()
        self._statictextRecordSize.Hide()
        self._statictextMaxNumOfRecords.Hide()

        if (file_type == CREATE_STDDATAFILE) or (file_type
                                                 == CREATE_BACKUPDATAFILE):
            self._statictextFileSize.Show()
            self._textctrlFileSize.Show()
        elif (file_type == CREATE_VALUE_FILE):
            self._textctrlLowerLimit.Show()
            self._textctrlUpperLimit.Show()
            self._textctrlValue.Show()
            self._checkboxLimitedCreditEnabled.Show()
            self._statictextLowerLimit.Show()
            self._statictextUpperLimit.Show()
            self._statictextValue.Show()
        elif (file_type
              == CREATE_LINEAR_RECORD_FILE) or (file_type
                                                == CREATE_CYCLIC_RECORD_FILE):
            self._textctrlRecordSize.Show()
            self._textctrlMaxNumOfRecords.Show()
            self._statictextRecordSize.Show()
            self._statictextMaxNumOfRecords.Show()
        else:
            pass

        title = 'DESFire Create File'
        if file_type == CREATE_STDDATAFILE:
            title = 'DESFire Create Std Data File'
        elif file_type == CREATE_BACKUPDATAFILE:
            title = 'DESFire Create Backup Data File'
        elif file_type == CREATE_VALUE_FILE:
            title = 'DESFire Create Value File'
        elif file_type == CREATE_LINEAR_RECORD_FILE:
            title = 'DESFire Create Linear Record File'
        elif file_type == CREATE_CYCLIC_RECORD_FILE:
            title = 'DESFire Create Cyclic Record File'
        else:
            pass
        self.SetTitle(title)

        self.DoLayoutAdaptation()