Esempio n. 1
0
    def __init__(self, parent):
        pyResManDialogBase.__init__(self, parent)

        readernames = pyResManReader.getReaderList()
        if len(readernames) > 0:
            for readername in readernames:
                self._readernameComboBox.Insert(
                    readername, self._readernameComboBox.GetCount())
            self._readernameComboBox.Select(0)

        self.__controller = pyResManController(self)

        self._claTextCtrl.SetValue('00')
        self._insTextCtrl.SetValue('A4')
        self._p1TextCtrl.SetValue('04')
        self._p2TextCtrl.SetValue('00')
        self._leTextCtrl.SetValue('00')

        self._scriptListCtrl.InsertColumn(0, 'Index', width=50)
        self._scriptListCtrl.InsertColumn(1, 'Command', width=200)
        self._scriptListCtrl.InsertColumn(2, 'Response', width=300)
        self._scriptListCtrl.InsertColumn(3, 'TimeSpent', width=100)
        self._scriptListCtrl.InsertColumn(4, 'DateTime', width=120)

        self._keyDataListCtrl.InsertColumn(0, 'index', width=50)
        self._keyDataListCtrl.InsertColumn(1, 'KVN', width=100)
        self._keyDataListCtrl.InsertColumn(2, 'key index', width=100)
        self._keyDataListCtrl.InsertColumn(3, 'key type', width=100)
        self._keyDataListCtrl.InsertColumn(4, 'key length', width=100)

        self._apduListCtrl.InsertColumn(0, 'Index', width=50)
        self._apduListCtrl.InsertColumn(1, 'Command', width=200)
        self._apduListCtrl.InsertColumn(2, 'Response', width=300)
        self._apduListCtrl.InsertColumn(3, 'TimeSpent', width=100)
        self._apduListCtrl.InsertColumn(4, 'DateTime', width=120)

        defaultKeyValue = '404142434445464748494A4B4C4D4E4F'
        self._key1TextCtrl.SetValue(defaultKeyValue)
        self._key2TextCtrl.SetValue(defaultKeyValue)
        self._key3TextCtrl.SetValue(defaultKeyValue)
        self._oldKVNTextCtrl.SetValue('00')
        self._newKVNTextCtrl.SetValue('01')

        self._apduListCtrl.Bind(wx.EVT_CONTEXT_MENU,
                                self._apduListCtrlOnContextMenu)
        self._scriptListCtrl.Bind(wx.EVT_CONTEXT_MENU,
                                  self._scriptListCtrlOnContextMenu)
Esempio n. 2
0
    def __init__(self, parent):
        pyResManDialogBase.__init__(self, parent)
        
        readernames = pyResManReader.getReaderList()
        if len(readernames) > 0:
            for readername in readernames:
                self._readernameComboBox.Insert(readername, self._readernameComboBox.GetCount())
            self._readernameComboBox.Select(0)
        
        self.__controller = pyResManController(self)
        
        self._claTextCtrl.SetValue('00')
        self._insTextCtrl.SetValue('A4')
        self._p1TextCtrl.SetValue('04')
        self._p2TextCtrl.SetValue('00')
        self._leTextCtrl.SetValue('00')
        
        self._scriptListCtrl.InsertColumn(0, 'Index', width=50)
        self._scriptListCtrl.InsertColumn(1, 'Command', width=200)
        self._scriptListCtrl.InsertColumn(2, 'Response', width=300)
        self._scriptListCtrl.InsertColumn(3, 'TimeSpent', width=100)
        self._scriptListCtrl.InsertColumn(4, 'DateTime', width=120)

        self._keyDataListCtrl.InsertColumn(0, 'index', width=50)
        self._keyDataListCtrl.InsertColumn(1, 'KVN', width=100)
        self._keyDataListCtrl.InsertColumn(2, 'key index', width=100)
        self._keyDataListCtrl.InsertColumn(3, 'key type', width=100)
        self._keyDataListCtrl.InsertColumn(4, 'key length', width=100)

        self._apduListCtrl.InsertColumn(0, 'Index', width=50)
        self._apduListCtrl.InsertColumn(1, 'Command', width=200)
        self._apduListCtrl.InsertColumn(2, 'Response', width=300)
        self._apduListCtrl.InsertColumn(3, 'TimeSpent', width=100)
        self._apduListCtrl.InsertColumn(4, 'DateTime', width=120)
        
        defaultKeyValue = '404142434445464748494A4B4C4D4E4F'
        self._key1TextCtrl.SetValue(defaultKeyValue)
        self._key2TextCtrl.SetValue(defaultKeyValue)
        self._key3TextCtrl.SetValue(defaultKeyValue)
        self._oldKVNTextCtrl.SetValue('00')
        self._newKVNTextCtrl.SetValue('01')
        
        self._apduListCtrl.Bind(wx.EVT_CONTEXT_MENU, self._apduListCtrlOnContextMenu)
        self._scriptListCtrl.Bind(wx.EVT_CONTEXT_MENU, self._scriptListCtrlOnContextMenu)
Esempio n. 3
0
 def _InitController(self):
     """Init controller for logical operations, self as the view;"""
     self.__controller = pyResManController(self)