當前位置: 首頁>>代碼示例>>Python>>正文


Python wx.ICON_EXCLAMATION屬性代碼示例

本文整理匯總了Python中wx.ICON_EXCLAMATION屬性的典型用法代碼示例。如果您正苦於以下問題:Python wx.ICON_EXCLAMATION屬性的具體用法?Python wx.ICON_EXCLAMATION怎麽用?Python wx.ICON_EXCLAMATION使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在wx的用法示例。


在下文中一共展示了wx.ICON_EXCLAMATION屬性的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: _on_add

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import ICON_EXCLAMATION [as 別名]
def _on_add(self, event):
        urls = self._get_urls()

        if not urls:
            self._create_popup(self.PROVIDE_URL_MSG,
                               self.WARNING_LABEL,
                               wx.OK | wx.ICON_EXCLAMATION)
        else:
            self._url_list.Clear()
            options = self._options_parser.parse(self.opt_manager.options)

            for url in urls:
                download_item = DownloadItem(url, options)
                download_item.path = self.opt_manager.options["save_path"]

                if not self._download_list.has_item(download_item.object_id):
                    self._status_list.bind_item(download_item)
                    self._download_list.insert(download_item) 
開發者ID:MrS0m30n3,項目名稱:youtube-dl-gui,代碼行數:20,代碼來源:mainframe.py

示例2: AskSave

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import ICON_EXCLAMATION [as 別名]
def AskSave(self):
        if not (self.modified or panel.IsModified()): return True
        flags = wx.ICON_EXCLAMATION | wx.YES_NO | wx.CANCEL | wx.CENTRE
        dlg = wx.MessageDialog( self, 'File is modified. Save before exit?',
                               'Save before too late?', flags )
        say = dlg.ShowModal()
        dlg.Destroy()
        wx.Yield()
        if say == wx.ID_YES:
            self.OnSaveOrSaveAs(wx.CommandEvent(wx.ID_SAVE))
            # If save was successful, modified flag is unset
            if not self.modified: return True
        elif say == wx.ID_NO:
            self.SetModified(False)
            panel.SetModified(False)
            return True
        return False 
開發者ID:andreas-p,項目名稱:admin4,代碼行數:19,代碼來源:xrced.py

示例3: AskDelete

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import ICON_EXCLAMATION [as 別名]
def AskDelete(self):
        actionItemCls = self.document.ActionItem

        def SearchFunc(obj):
            if obj.__class__ == actionItemCls:
                if obj.executable and obj.executable.plugin == self.executable:
                    return True
            return None

        if self.root.Traverse(SearchFunc) is not None:
            eg.MessageBox(
                eg.text.General.deletePlugin,
                eg.APP_NAME,
                wx.NO_DEFAULT | wx.OK | wx.ICON_EXCLAMATION
            )
            return False
        if not TreeItem.AskDelete(self):
            return False
        return True 
開發者ID:EventGhost,項目名稱:EventGhost,代碼行數:21,代碼來源:PluginItem.py

示例4: CheckMultiload

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import ICON_EXCLAMATION [as 別名]
def CheckMultiload(self):
        if not self.checkMultiLoad:
            return True
        info = self.resultData
        if not info:
            return True
        if info.canMultiLoad:
            return True
        if any((plugin.info.path == info.path) for plugin in eg.pluginList):
            eg.MessageBox(
                Text.noMultiload,
                Text.noMultiloadTitle,
                style=wx.ICON_EXCLAMATION
            )
            return False
        else:
            return True 
開發者ID:EventGhost,項目名稱:EventGhost,代碼行數:19,代碼來源:AddPluginDialog.py

示例5: CheckAddOnFiles

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import ICON_EXCLAMATION [as 別名]
def CheckAddOnFiles(self):
        neededFiles = self.GetNeededFiles()
        if len(neededFiles) == 0:
            return True
        if not eg.CallWait(self.ShowDownloadMessage):
            return False
        stopEvent = threading.Event()
        wx.CallAfter(eg.TransferDialog, None, neededFiles, stopEvent)
        stopEvent.wait()
        neededFiles = self.GetNeededFiles()
        if neededFiles:
            eg.CallWait(
                wx.MessageBox,
                Text.downloadFailedMsg,
                caption=Text.dialogCaption % self.plugin.name,
                style=wx.OK | wx.ICON_EXCLAMATION | wx.STAY_ON_TOP,
                parent=eg.document.frame
            )
            return False
        return True 
開發者ID:EventGhost,項目名稱:EventGhost,代碼行數:22,代碼來源:WinUsb.py

示例6: AskDelete

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import ICON_EXCLAMATION [as 別名]
def AskDelete(self):
        allItems = self.GetAllItems()
        if eg.config.confirmDelete:
            count = len(allItems) - 1
            if count > 0:
                mesg = eg.text.General.deleteManyQuestion % str(count)
            else:
                mesg = eg.text.General.deleteQuestion
            answer = eg.MessageBox(
                mesg,
                eg.APP_NAME,
                wx.NO_DEFAULT | wx.YES_NO | wx.ICON_EXCLAMATION
            )
            if answer == wx.ID_NO:
                return False
        dependants = self.GetDependantsOutside(allItems)
        if len(dependants) > 0:
            answer = eg.MessageBox(
                eg.text.General.deleteLinkedItems,
                eg.APP_NAME,
                wx.NO_DEFAULT | wx.YES_NO | wx.ICON_EXCLAMATION
            )
            return answer == wx.ID_YES
        return True 
開發者ID:EventGhost,項目名稱:EventGhost,代碼行數:26,代碼來源:TreeItem.py

示例7: AskChooseCredentialsFile

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import ICON_EXCLAMATION [as 別名]
def AskChooseCredentialsFile(self):
        dial = wx.MessageDialog(None, 'No Credentials file was found!\n\nDo you want to load one?\n',
                                'Error', wx.YES_NO | wx.ICON_EXCLAMATION)
        res = dial.ShowModal()
        if res == wx.ID_YES:
            return True
        else:
            return false 
開發者ID:hschauhan,項目名稱:gosync,代碼行數:10,代碼來源:GoSyncModel.py

示例8: CreateDirectoryByPath

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import ICON_EXCLAMATION [as 別名]
def CreateDirectoryByPath(self, dirpath):
        self.SendlToLog(3,"create directory: %s\n" % dirpath)
        drivepath = dirpath.split(self.mirror_directory+'/')[1]
        basepath = os.path.dirname(drivepath)
        dirname = self.PathLeaf(dirpath)

        try:
            f = self.LocateFolderOnDrive(drivepath)
            return
        except FolderNotFound:
            if basepath == '':
                self.CreateDirectoryInParent(dirname)
            else:
                try:
                    parent_folder = self.LocateFolderOnDrive(basepath)
                    self.CreateDirectoryInParent(dirname, parent_folder['id'])
                except:
                    errorMsg = "Failed to locate directory path %s on drive.\n" % basepath
                    self.SendlToLog(1,errorMsg)
                    dial = wx.MessageDialog(None, errorMsg, 'Directory Not Found',
                                            wx.ID_OK | wx.ICON_EXCLAMATION)
                    dial.ShowModal()
                    return
        except FileListQueryFailed:
            errorMsg = "Server Query Failed!\n"
            self.SendlToLog(1,errorMsg)
            dial = wx.MessageDialog(None, errorMsg, 'Directory Not Found',
                                    wx.ID_OK | wx.ICON_EXCLAMATION)
            dial.ShowModal()
            return 
開發者ID:hschauhan,項目名稱:gosync,代碼行數:32,代碼來源:GoSyncModel.py

示例9: _on_start

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import ICON_EXCLAMATION [as 別名]
def _on_start(self, event):
        if self.download_manager is None:
            if self.update_thread is not None and self.update_thread.is_alive():
                self._create_popup(_("Update in progress. Please wait for the update to complete"),
                                   self.WARNING_LABEL,
                                   wx.OK | wx.ICON_EXCLAMATION)
            else:
                self._start_download()
        else:
            self.download_manager.stop_downloads() 
開發者ID:MrS0m30n3,項目名稱:youtube-dl-gui,代碼行數:12,代碼來源:mainframe.py

示例10: _on_viewlog

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import ICON_EXCLAMATION [as 別名]
def _on_viewlog(self, event):
        if self.log_manager is None:
            self._create_popup(_("Logging is disabled"),
                               self.WARNING_LABEL,
                               wx.OK | wx.ICON_EXCLAMATION)
        else:
            log_window = LogGUI(self)
            log_window.load(self.log_manager.log_file)
            log_window.Show() 
開發者ID:MrS0m30n3,項目名稱:youtube-dl-gui,代碼行數:11,代碼來源:mainframe.py

示例11: _update_youtubedl

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import ICON_EXCLAMATION [as 別名]
def _update_youtubedl(self):
        """Update youtube-dl binary to the latest version. """
        if self.download_manager is not None and self.download_manager.is_alive():
            self._create_popup(self.DOWNLOAD_ACTIVE,
                               self.WARNING_LABEL,
                               wx.OK | wx.ICON_EXCLAMATION)
        elif self.update_thread is not None and self.update_thread.is_alive():
            self._create_popup(self.UPDATE_ACTIVE,
                               self.INFO_LABEL,
                               wx.OK | wx.ICON_INFORMATION)
        else:
            self.update_thread = UpdateThread(self.opt_manager.options['youtubedl_path']) 
開發者ID:MrS0m30n3,項目名稱:youtube-dl-gui,代碼行數:14,代碼來源:mainframe.py

示例12: run

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import ICON_EXCLAMATION [as 別名]
def run(self):
    update=OnlineUpdate()
    if update.IsValid():
      adm.updateInfo=update
      if update.UpdateAvailable():
        wx.CallAfter(self.frame.OnUpdate)
    elif update.exception:
      wx.CallAfter(wx.MessageBox,
                   xlt("Connection error while trying to retrieve update information from the update server.\nCheck network connectivity and proxy settings!"), 
                   xlt("Communication error"), wx.ICON_EXCLAMATION) 
開發者ID:andreas-p,項目名稱:admin4,代碼行數:12,代碼來源:Update.py

示例13: OnLinkClicked

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import ICON_EXCLAMATION [as 別名]
def OnLinkClicked(self, event):
        href = event.GetLinkInfo().GetHref()
        if href == 'show_license':
            if config.license_file:
                from wx.lib.dialogs import ScrolledMessageDialog
                try:
                    license_file = codecs.open(config.license_file, encoding='UTF-8')
                    dlg = ScrolledMessageDialog( self, license_file.read(), "wxGlade - License" )
                    license_file.close()
                    dlg.ShowModal()
                    dlg.Destroy()
                except EnvironmentError as inst:
                    bugdialog.ShowEnvironmentError(
                        _('''Can't read the file "LICENSE.txt".\n\nYou can get a license copy at\n'''
                          '''http://www.opensource.org/licenses/mit-license.php'''), inst)
            else:
                wx.MessageBox(_('File "LICENSE.txt" not found!\nYou can get a license copy at\n'
                                'http://www.opensource.org/licenses/mit-license.php'),
                              _('Error'), wx.OK | wx.CENTRE | wx.ICON_EXCLAMATION)
        elif href == 'show_credits':
            if config.credits_file:
                from wx.lib.dialogs import ScrolledMessageDialog
                try:
                    credits_file = codecs.open( config.credits_file, encoding='UTF-8' )
                    dlg = ScrolledMessageDialog( self, credits_file.read(), _("wxGlade - Credits") )
                    credits_file.close()
                    dlg.ShowModal()
                    dlg.Destroy()
                except EnvironmentError as inst:
                    bugdialog.ShowEnvironmentError(_('''Can't read the file "CREDITS.txt"'''), inst)
            else:
                wx.MessageBox(_('File "CREDITS.txt" not found!'), _('Error'),
                              wx.OK | wx.CENTRE | wx.ICON_EXCLAMATION)
        else:
            import webbrowser
            webbrowser.open(href, new=True) 
開發者ID:wxGlade,項目名稱:wxGlade,代碼行數:38,代碼來源:about.py

示例14: DisplayError

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import ICON_EXCLAMATION [as 別名]
def DisplayError(self, errorText):
        eg.MessageBox(
            errorText,
            style=wx.ICON_EXCLAMATION | wx.OK,
            parent=self
        ) 
開發者ID:EventGhost,項目名稱:EventGhost,代碼行數:8,代碼來源:__init__.py

示例15: AddLadderBlock

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import ICON_EXCLAMATION [as 別名]
def AddLadderBlock(self):
        message = wx.MessageDialog(self, _("This option isn't available yet!"), _("Warning"), wx.OK | wx.ICON_EXCLAMATION)
        message.ShowModal()
        message.Destroy()

    # -------------------------------------------------------------------------------
    #                          Delete element functions
    # ------------------------------------------------------------------------------- 
開發者ID:thiagoralves,項目名稱:OpenPLC_Editor,代碼行數:10,代碼來源:LDViewer.py


注:本文中的wx.ICON_EXCLAMATION屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。