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()
评论列表
文章目录