Gui.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:Crypter 作者: sithis993 项目源码 文件源码
def blink(self, event):
        '''
        @summary: Blinks the subheader text
        '''

        # Update the time remaining
        time_remaining = self.get_time_remaining()

        # Set message to blank
        if self.set_message_to_null and time_remaining:
            self.FlashingMessageText.SetLabelText("")
            self.HeaderPanel.Layout() # Recenters the child widgets after text update (this works!)
            self.set_message_to_null = False
        # Set message to text
        elif time_remaining:
            self.FlashingMessageText.SetLabelText(self.GUI_LABEL_TEXT_FLASHING_ENCRYPTED[self.LANG])
            self.HeaderPanel.Layout() # Recenters the child widgets after text update (this works!)
            self.set_message_to_null = True

        # If the key has been destroyed, update the menu text
        if not time_remaining:
            # Cleanup decrypter and change dialog message
            self.decrypter.cleanup()
            # Update main window
            self.key_destruction_timer.Stop()
            self.TimeRemainingTime.SetLabelText(self.GUI_LABEL_TEXT_TIME_BLANK[self.LANG])
            self.FlashingMessageText.SetLabelText(self.GUI_LABEL_TEXT_FLASHING_DESTROYED[self.LANG])
            self.FlashingMessageText.SetForegroundColour( wx.Colour(0, 0, 0) )
            # Disable decryption button
            self.EnterDecryptionKeyButton.Disable()
            self.ViewEncryptedFilesButton.Disable()
            self.HeaderPanel.Layout() # Recenters the child widgets after text update (this works!)
        else:
            self.TimeRemainingTime.SetLabelText(time_remaining)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号