Esempio n. 1
0
    def show_decryption_dialog(self, event):
        '''
		@summary: Creates a dialog object to show the decryption dialog
		'''

        # If dialog open. Don't open another
        if self.decryption_dialog:
            return

        # Create dialog object
        self.decryption_dialog = EnterDecryptionKeyDialog(self)
        # Set gauge size
        self.decryption_dialog.DecryptionGauge.SetRange(100)
        # Set encrypted file number
        self.decryption_dialog.EncryptedFilesNumberLabel.SetLabelText(
            self.GUI_DECRYPTION_DIALOG_LABEL_TEXT_FILE_COUNT[self.LANG] + str(
                len(self.encrypted_files_list) -
                len(self.decrypted_files_list)))

        # Bind OK button to decryption process
        self.decryption_dialog.Bind(wx.EVT_BUTTON,
                                    self.start_decryption_thread,
                                    self.decryption_dialog.OkCancelSizerOK)
        # Bind close and cancel event to thread killer
        self.decryption_dialog.Bind(wx.EVT_BUTTON, self.stop_decryption,
                                    self.decryption_dialog.OkCancelSizerCancel)
        self.decryption_dialog.Bind(wx.EVT_CLOSE, self.stop_decryption)
        self.decryption_dialog.Show()
Esempio n. 2
0
    def show_decryption_dialog(self, event):
        '''
		@summary: Creates a dialog object to show the decryption dialog
		'''

        # Create dialog object
        self.decryption_dialog = EnterDecryptionKeyDialog(self)

        # Bind OK button to decryption process
        self.decryption_dialog.Bind(wx.EVT_BUTTON, self.decrypt,
                                    self.decryption_dialog.OkCancelSizerOK)
        self.decryption_dialog.Show()