当前位置: 首页>>代码示例>>Python>>正文


Python wx.ICON_QUESTION属性代码示例

本文整理汇总了Python中wx.ICON_QUESTION属性的典型用法代码示例。如果您正苦于以下问题:Python wx.ICON_QUESTION属性的具体用法?Python wx.ICON_QUESTION怎么用?Python wx.ICON_QUESTION使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在wx的用法示例。


在下文中一共展示了wx.ICON_QUESTION属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: on_options_load_default

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_QUESTION [as 别名]
def on_options_load_default(self, event):
        '''Resets the changes to the default, but not save them.'''
        r = wx.MessageDialog(
            None,
            _('IkaLog preferences will be reset to default. Continue?') + '\n' +
            _('The change will be updated when the apply button is pressed.'),
            _('Confirm'),
            wx.YES_NO | wx.NO_DEFAULT | wx.ICON_QUESTION
        ).ShowModal()

        if r != wx.ID_YES:
            return

        self.engine.call_plugins('on_config_reset', debug=True)

    # 現在の設定値をYAMLファイルからインポート
    # 
开发者ID:hasegaw,项目名称:IkaLog,代码行数:19,代码来源:gui.py

示例2: onDeleteProfile

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_QUESTION [as 别名]
def onDeleteProfile(self, event):
        """Deletes the currently selected profile after getting confirmation."""
        profname = self.tc_name.GetLineText(0)
        fname = os.path.join(PROFILES_PATH, profname + ".profile")
        file_exists = os.path.isfile(fname)
        if not file_exists:
            msg = "Selected profile is not saved."
            show_message_dialog(msg, "Error")
            return
        # Open confirmation dialog
        dlg = wx.MessageDialog(None,
                               "Do you want to delete profile: {}?".format(profname),
                               'Confirm Delete',
                               wx.YES_NO | wx.ICON_QUESTION)
        result = dlg.ShowModal()
        if result == wx.ID_YES and file_exists:
            os.remove(fname)
            self.update_choiceprofile()
            self.onCreateNewProfile(None)
        else:
            pass 
开发者ID:hhannine,项目名称:superpaper,代码行数:23,代码来源:gui.py

示例3: OnClose

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_QUESTION [as 别名]
def OnClose(self, event):
    if self.is_running:
      confirm_exit = wx.MessageDialog(
        self,
        'Tem certeza que quer parar o programa?',
        'Sair',
        wx.YES_NO | wx.ICON_QUESTION
      )

      if confirm_exit.ShowModal() == wx.ID_YES:
        self.Destroy()
        wx.Window.Destroy(self)
      else:
        confirm_exit.Destroy()
    else:
      event.Skip() 
开发者ID:yanari,项目名称:filmow_to_letterboxd,代码行数:18,代码来源:filmow_to_letterboxd.py

示例4: _wantToReuseAvailableCert

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_QUESTION [as 别名]
def _wantToReuseAvailableCert( self, directReuseCert ):
        certAnswer = wx.NO
        if self.isCertificateGenerated(self.secureBootType):
            if not directReuseCert:
                msgText = ((uilang.kMsgLanguageContentDict['certGenInfo_reuseOldCert'][self.languageIndex]))
                certAnswer = wx.MessageBox(msgText, "Certificate Question", wx.YES_NO | wx.CANCEL | wx.ICON_QUESTION)
                if certAnswer == wx.CANCEL:
                    return None
                elif certAnswer == wx.NO:
                    msgText = ((uilang.kMsgLanguageContentDict['certGenInfo_haveNewCert'][self.languageIndex]))
                    certAnswer = wx.MessageBox(msgText, "Certificate Question", wx.YES_NO | wx.CANCEL | wx.ICON_QUESTION)
                    if certAnswer == wx.CANCEL:
                        return None
                    elif certAnswer == wx.YES:
                        certAnswer = wx.NO
                    else:
                        certAnswer = wx.YES
            else:
                certAnswer = wx.YES
        return (certAnswer == wx.YES) 
开发者ID:JayHeng,项目名称:NXP-MCUBootUtility,代码行数:22,代码来源:RTyyyy_main.py

示例5: _RefuseUnsavedModifications

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_QUESTION [as 别名]
def _RefuseUnsavedModifications(self, refuse_modified_options=False):
        """If there exist unsaved entry modifications, inform the user
        and return True.  Otherwise, return False."""
        if self.entry_modified:
            wx.MessageBox(('Entry has been modified.  You must either '
                           'save or revert it.'),
                          'Modified Entry',
                          wx.OK | wx.ICON_INFORMATION,
                          self.frame)
            return True
        elif refuse_modified_options and self.diary_modified:
            if wx.OK == wx.MessageBox(('Diary has been modified.  Click OK '
                                       'to continue and lose the changes.'),
                                      'Modified Diary',
                                      wx.OK | wx.CANCEL | wx.ICON_QUESTION,
                                      self.frame):
                return False
            return True
        return False 
开发者ID:cmpilato,项目名称:thotkeeper,代码行数:21,代码来源:app.py

示例6: _on_close

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_QUESTION [as 别名]
def _on_close(self, event):
        """Event handler for the wx.EVT_CLOSE event.

        This method is used when the user tries to close the program
        to save the options and make sure that the download & update
        processes are not running.

        """
        if self.opt_manager.options["confirm_exit"]:
            dlg = wx.MessageDialog(self, _("Are you sure you want to exit?"), _("Exit"), wx.YES_NO | wx.ICON_QUESTION)

            result = dlg.ShowModal() == wx.ID_YES
            dlg.Destroy()
        else:
            result = True

        if result:
            self.close() 
开发者ID:MrS0m30n3,项目名称:youtube-dl-gui,代码行数:20,代码来源:mainframe.py

示例7: OnCloseMenu

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_QUESTION [as 别名]
def OnCloseMenu(self, event):
        answer = wx.ID_YES
        result = self.Manager.CloseCurrent()
        if not result:
            dialog = wx.MessageDialog(self, _("There are changes, do you want to save?"),  _("Close File"), wx.YES_NO|wx.CANCEL|wx.ICON_QUESTION)
            answer = dialog.ShowModal()
            dialog.Destroy()
            if answer == wx.ID_YES:
                self.OnSaveMenu(event)
                if self.Manager.CurrentIsSaved():
                    self.Manager.CloseCurrent()
            elif answer == wx.ID_NO:
                self.Manager.CloseCurrent(True)
        if self.FileOpened.GetPageCount() > self.Manager.GetBufferNumber():
            current = self.FileOpened.GetSelection()
            self.FileOpened.DeletePage(current)
            if self.FileOpened.GetPageCount() > 0:
                self.FileOpened.SetSelection(min(current, self.FileOpened.GetPageCount() - 1))
            self.RefreshBufferState()
            self.RefreshMainMenu()
        

#-------------------------------------------------------------------------------
#                         Import and Export Functions
#------------------------------------------------------------------------------- 
开发者ID:jgeisler0303,项目名称:CANFestivino,代码行数:27,代码来源:objdictedit.py

示例8: OnCloseProjectMenu

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_QUESTION [as 别名]
def OnCloseProjectMenu(self, event):
        if self.NodeList:
            if self.NodeList.HasChanged():
                dialog = wx.MessageDialog(self, _("There are changes, do you want to save?"), _("Close Project"), wx.YES_NO|wx.CANCEL|wx.ICON_QUESTION)
                answer = dialog.ShowModal()
                dialog.Destroy()
                if answer == wx.ID_YES:
                    result = self.NodeList.SaveProject()
                    if result:
                        message = wx.MessageDialog(self, result, _("Error"), wx.OK|wx.ICON_ERROR)
                        message.ShowModal()
                        message.Destroy()
                elif answer == wx.ID_NO:
                    self.NodeList.ForceChanged(False)
            if not self.NodeList.HasChanged():
                self.Manager = None
                self.NodeList = None
                self.RefreshNetworkNodes()
                self.RefreshTitle()
                self.RefreshMainMenu()
        
        
#-------------------------------------------------------------------------------
#                             Refresh Functions
#------------------------------------------------------------------------------- 
开发者ID:jgeisler0303,项目名称:CANFestivino,代码行数:27,代码来源:networkedit.py

示例9: OnDeleteButton

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_QUESTION [as 别名]
def OnDeleteButton(self, event):
        filepath = self.GetSelectedFilePath()
        if os.path.isfile(filepath):
            _folder, filename = os.path.split(filepath)

            dialog = wx.MessageDialog(self.ParentWindow,
                                      _("Do you really want to delete the file '%s'?") % filename,
                                      _("Delete File"),
                                      wx.YES_NO | wx.ICON_QUESTION)
            remove = dialog.ShowModal() == wx.ID_YES
            dialog.Destroy()

            if remove:
                os.remove(filepath)
                self.ModuleLibrary.LoadModules()
                wx.CallAfter(self.RefreshView)
        event.Skip() 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:19,代码来源:ConfigEditor.py

示例10: OnDeleteButton

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_QUESTION [as 别名]
def OnDeleteButton(self, event):
        filepath = self.ManagedDir.GetPath()
        if os.path.isfile(filepath):
            _folder, filename = os.path.split(filepath)

            dialog = wx.MessageDialog(self,
                                      _("Do you really want to delete the file '%s'?") % filename,
                                      _("Delete File"),
                                      wx.YES_NO | wx.ICON_QUESTION)
            remove = dialog.ShowModal() == wx.ID_YES
            dialog.Destroy()

            if remove:
                os.remove(filepath)
                self.ManagedDir.RefreshTree()
        event.Skip() 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:18,代码来源:FileManagementPanel.py

示例11: CheckProjectPathPerm

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_QUESTION [as 别名]
def CheckProjectPathPerm(self, dosave=True):
        if CheckPathPerm(self.ProjectPath):
            return True
        if self.AppFrame is not None:
            dialog = wx.MessageDialog(
                self.AppFrame,
                _('You must have permission to work on the project\nWork on a project copy ?'),
                _('Error'),
                wx.YES_NO | wx.NO_DEFAULT | wx.ICON_QUESTION)
            answer = dialog.ShowModal()
            dialog.Destroy()
            if answer == wx.ID_YES:
                if self.SaveProjectAs():
                    self.AppFrame.RefreshTitle()
                    self.AppFrame.RefreshFileMenu()
                    self.AppFrame.RefreshPageTitles()
                    return True
        return False 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:20,代码来源:ProjectController.py

示例12: CheckSaveBeforeClosing

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_QUESTION [as 别名]
def CheckSaveBeforeClosing(self, title=_("Close Project")):
        """Function displaying an question dialog if project is not saved"

        :returns: False if closing cancelled.
        """
        if not self.Controler.ProjectIsSaved():
            dialog = wx.MessageDialog(self, _("There are changes, do you want to save?"), title, wx.YES_NO | wx.CANCEL | wx.ICON_QUESTION)
            answer = dialog.ShowModal()
            dialog.Destroy()
            if answer == wx.ID_YES:
                self.SaveProject()
            elif answer == wx.ID_CANCEL:
                return False

        for idx in xrange(self.TabsOpened.GetPageCount()):
            window = self.TabsOpened.GetPage(idx)
            if not window.CheckSaveBeforeClosing():
                return False

        return True

    # -------------------------------------------------------------------------------
    #                            File Menu Functions
    # ------------------------------------------------------------------------------- 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:26,代码来源:IDEFrame.py

示例13: YesNo

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_QUESTION [as 别名]
def YesNo(self, question, caption='Yes or no?'):
        dlg = wx.MessageDialog(self.parent, question, caption,
                               wx.YES_NO | wx.ICON_QUESTION)
        result = dlg.ShowModal() == wx.ID_YES
        dlg.Destroy()
        return result 
开发者ID:jantman,项目名称:python-wifi-survey-heatmap,代码行数:8,代码来源:ui.py

示例14: onReset

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_QUESTION [as 别名]
def onReset(self, e):
		dlg = wx.MessageDialog(None, _('If your sensors are not detected right, try resetting system or forcing name and address.\n\nDo you want to try auto detection again?'),_('Question'), wx.YES_NO | wx.NO_DEFAULT | wx.ICON_QUESTION)
		if dlg.ShowModal() == wx.ID_YES:
			try:
				os.remove(self.home + '/.pypilot/RTIMULib2.ini')
			except: pass
			self.detection()
		dlg.Destroy() 
开发者ID:sailoog,项目名称:openplotter,代码行数:10,代码来源:add_i2c.py

示例15: _File_Close

# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_QUESTION [as 别名]
def _File_Close(self):
        #if self.filename != None and self.file_changed:
        if self.file_changed:
            dlg = wx.MessageDialog(self, 'You have unsaved changes. Do you want to close the file anyway?', 'Question', wx.YES_NO | wx.NO_DEFAULT | wx.ICON_QUESTION)
            if not dlg.ShowModal() == wx.ID_YES:
                return False
        while self.n:
            self.DeleteNode(self.n[0])
        self.menu_file_save_as.Enable(False)
        self.menu_file_close.Enable(False)
        self.filename = None
        self.file_changed = None
        self._title_update()
        return True 
开发者ID:hvqzao,项目名称:report-ng,代码行数:16,代码来源:yamled.py


注:本文中的wx.ICON_QUESTION属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。