本文整理汇总了Python中wx.ICON_INFORMATION属性的典型用法代码示例。如果您正苦于以下问题:Python wx.ICON_INFORMATION属性的具体用法?Python wx.ICON_INFORMATION怎么用?Python wx.ICON_INFORMATION使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类wx
的用法示例。
在下文中一共展示了wx.ICON_INFORMATION属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: OnInternetDown
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_INFORMATION [as 别名]
def OnInternetDown(self, event):
if event.data == 1:
self.sb.SetStatusText("Network is down")
if self.sync_model.GetUseSystemNotifSetting():
if wxgtk4:
nmsg = wx.adv.NotificationMessage(title="GoSync", message="Network has gone down!")
nmsg.SetFlags(wx.ICON_WARNING)
nmsg.Show(timeout=wx.adv.NotificationMessage.Timeout_Auto)
else:
nmsg = wx.NotificationMessage("GoSync", "Network has gone down!")
nmsg.SetFlags(wx.ICON_WARNING)
nmsg.Show(timeout=wx.NotificationMessage.Timeout_Auto)
else:
self.sb.SetStatusText("Network is up!")
if self.sync_model.GetUseSystemNotifSetting():
if wxgtk4:
nmsg = wx.adv.NotificationMessage(title="GoSync", message="Network is up!")
nmsg.SetFlags(wx.ICON_INFORMATION)
nmsg.Show(timeout=wx.adv.NotificationMessage.Timeout_Auto)
else:
nmsg = wx.NotificationMessage("GoSync", "Network is up!")
nmsg.SetFlags(wx.ICON_INFORMATION)
nmsg.Show(timeout=wx.NotificationMessage.Timeout_Auto)
示例2: OnSyncStarted
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_INFORMATION [as 别名]
def OnSyncStarted(self, event):
if self.sync_model.GetUseSystemNotifSetting():
if wxgtk4 :
nmsg = wx.adv.NotificationMessage(title="GoSync", message="Sync Started")
nmsg.SetFlags(wx.ICON_INFORMATION)
nmsg.Show(timeout=wx.adv.NotificationMessage.Timeout_Auto)
else:
nmsg = wx.NotificationMessage("GoSync", "Sync Started")
nmsg.SetFlags(wx.ICON_INFORMATION)
nmsg.Show(timeout=wx.NotificationMessage.Timeout_Auto)
self.sb.SetStatusText("Sync started...")
self.sb.SetStatusText("Running", 1)
self.sync_now_mitem.Enable(False)
self.rcu.Enable(False)
self.pr_item.SetItemLabel("Pause Sync")
示例3: OnSyncDone
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_INFORMATION [as 别名]
def OnSyncDone(self, event):
if not event.data:
if self.sync_model.GetUseSystemNotifSetting():
if wxgtk4:
nmsg = wx.adv.NotificationMessage(title="GoSync", message="Sync Completed!")
nmsg.SetFlags(wx.ICON_INFORMATION)
nmsg.Show(timeout=wx.adv.NotificationMessage.Timeout_Auto)
else:
nmsg = wx.NotificationMessage("GoSync", "Sync Completed!")
nmsg.SetFlags(wx.ICON_INFORMATION)
nmsg.Show(timeout=wx.NotificationMessage.Timeout_Auto)
self.sb.SetStatusText("Sync completed.")
else:
if self.sync_model.GetUseSystemNotifSetting():
if wxgtk4:
nmsg = wx.adv.NotificationMessage(title="GoSync", message="Sync Completed with errors!\nPlease check ~/GoSync.log")
nmsg.SetFlags(wx.ICON_ERROR)
nmsg.Show(timeout=wx.adv.NotificationMessage.Timeout_Auto)
else:
nmsg = wx.NotificationMessage("GoSync", "Sync Completed with errors!\nPlease check ~/GoSync.log")
nmsg.SetFlags(wx.ICON_ERROR)
nmsg.Show(timeout=wx.NotificationMessage.Timeout_Auto)
self.sb.SetStatusText("Sync failed. Please check the logs.")
self.sync_now_mitem.Enable(True)
self.rcu.Enable(True)
示例4: save
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_INFORMATION [as 别名]
def save(self):
try:
gender_id = self.ctrl_gender.GetClientData(self.ctrl_gender.GetSelection())
age_id = self.ctrl_age.GetClientData(self.ctrl_age.GetSelection())
self.user_profile.set_gender(gender_id)
self.user_profile.set_age(age_id)
self.user_profile.save()
return True
except Exception as e:
print_exc()
try:
msg = str(e)
except:
msg = 'Cannot save profile'
dlg = wx.MessageDialog(None, msg, self.bgapp.appname, wx.OK | wx.ICON_INFORMATION)
dlg.ShowModal()
dlg.Destroy()
return False
示例5: _RefuseUnsavedModifications
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_INFORMATION [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
示例6: _after_download
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_INFORMATION [as 别名]
def _after_download(self):
"""Run tasks after download process has been completed.
Note:
Here you can add any tasks you want to run after the
download process has been completed.
"""
if self.opt_manager.options['shutdown']:
dlg = ShutdownDialog(self, 60, _("Shutting down in {0} second(s)"), _("Shutdown"))
result = dlg.ShowModal() == wx.ID_OK
dlg.Destroy()
if result:
self.opt_manager.save_to_file()
success = shutdown_sys(self.opt_manager.options['sudo_password'])
if success:
self._status_bar_write(self.SHUTDOWN_MSG)
else:
self._status_bar_write(self.SHUTDOWN_ERR)
else:
if self.opt_manager.options["show_completion_popup"]:
self._create_popup(self.DL_COMPLETED_MSG, self.INFO_LABEL, wx.OK | wx.ICON_INFORMATION)
示例7: on_pick
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_INFORMATION [as 别名]
def on_pick(self, event):
# The event received here is of the type
# matplotlib.backend_bases.PickEvent
#
# It carries lots of information, of which we're using
# only a small amount here.
#
box_points = event.artist.get_bbox().get_points()
msg = "You've clicked on a bar with coords:\n %s" % box_points
dlg = wx.MessageDialog(
self,
msg,
"Click!",
wx.OK | wx.ICON_INFORMATION)
dlg.ShowModal()
dlg.Destroy()
示例8: callbackShowHomePage
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_INFORMATION [as 别名]
def callbackShowHomePage( self, event ):
msgText = ((uilang.kMsgLanguageContentDict['homePage_info'][self.languageIndex]))
wx.MessageBox(msgText, uilang.kMsgLanguageContentDict['homePage_title'][self.languageIndex], wx.OK | wx.ICON_INFORMATION)
示例9: callbackShowAboutAuthor
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_INFORMATION [as 别名]
def callbackShowAboutAuthor( self, event ):
msgText = ((uilang.kMsgLanguageContentDict['aboutAuthor_author'][self.languageIndex]) +
(uilang.kMsgLanguageContentDict['aboutAuthor_email1'][self.languageIndex]) +
(uilang.kMsgLanguageContentDict['aboutAuthor_email2'][self.languageIndex]) +
(uilang.kMsgLanguageContentDict['aboutAuthor_blog'][self.languageIndex]))
wx.MessageBox(msgText, uilang.kMsgLanguageContentDict['aboutAuthor_title'][self.languageIndex], wx.OK | wx.ICON_INFORMATION)
示例10: callbackShowRevisionHistory
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_INFORMATION [as 别名]
def callbackShowRevisionHistory( self, event ):
msgText = ((uilang.kMsgLanguageContentDict['revisionHistory_v1_0_0'][self.languageIndex]) +
(uilang.kMsgLanguageContentDict['revisionHistory_v2_0_0'][self.languageIndex]) +
(uilang.kMsgLanguageContentDict['revisionHistory_v3_0_0'][self.languageIndex]))
wx.MessageBox(msgText, uilang.kMsgLanguageContentDict['revisionHistory_title'][self.languageIndex], wx.OK | wx.ICON_INFORMATION)
示例11: onCheckAddresses
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_INFORMATION [as 别名]
def onCheckAddresses(self, e):
addresses = ''
try:
addresses = subprocess.check_output(['i2cdetect', '-y', '1'])
except:
addresses = subprocess.check_output(['i2cdetect', '-y', '2'])
wx.MessageBox(addresses, _('Detected I2C addresses'), wx.OK | wx.ICON_INFORMATION)
示例12: ShowMessage
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_INFORMATION [as 别名]
def ShowMessage(self, w_msg):
wx.MessageBox(w_msg, 'Info', wx.OK | wx.ICON_INFORMATION)
示例13: onSelect
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_INFORMATION [as 别名]
def onSelect(self, e):
option = self.actions_options[self.action_select.GetCurrentSelection()][0]
msg = self.actions_options[self.action_select.GetCurrentSelection()][1]
field = self.actions_options[self.action_select.GetCurrentSelection()][2]
if field == 0:
self.data.Disable()
self.data.SetValue('')
self.edit_skkey.Disable()
if field == 1:
self.data.Enable()
self.data.SetFocus()
self.edit_skkey.Enable()
if msg:
if msg == 'OpenFileDialog':
dlg = wx.FileDialog(self, message=_('Choose a file'), defaultDir=self.currentpath + '/sounds',
defaultFile='',
wildcard=_('Audio files').decode('utf8') + ' (*.mp3)|*.mp3|' + _('All files').decode('utf8') + ' (*.*)|*.*',
style=wx.OPEN | wx.CHANGE_DIR)
if dlg.ShowModal() == wx.ID_OK:
file_path = dlg.GetPath()
self.data.SetValue(file_path)
print self.currentpath
os.chdir(self.currentpath)
dlg.Destroy()
else:
if msg == 0:
pass
else:
if field == 1 and option != _('wait'):
msg = msg+ _('\n\nYou can add the current value of any Signal K key typing its name between angle brackets, e.g: <navigation.position.latitude>')
wx.MessageBox(msg, 'Info', wx.OK | wx.ICON_INFORMATION)
示例14: on_convert
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_INFORMATION [as 别名]
def on_convert(self, e):
convert = 0
if self.convert.GetValue():
convert = 1
if self.conf.has_option('SPI', 'value_' + str(self.edit[2])):
data = self.conf.get('SPI', 'value_' + str(self.edit[2]))
try:
temp_list = eval(data)
except:
temp_list = []
min = 1023
max = 0
for ii in temp_list:
if ii[0] > max: max = ii[0]
if ii[0] < min: min = ii[0]
if min > 0:
wx.MessageBox(_('minimum raw value in setting table > 0'), 'info', wx.OK | wx.ICON_INFORMATION)
convert = 0
if max < 1023:
wx.MessageBox(_('maximum raw value in setting table < 1023'), 'info', wx.OK | wx.ICON_INFORMATION)
convert = 0
else:
wx.MessageBox(_('no option value ').decode('utf8') + str(self.edit[2]) + _(' in openplotter.conf').decode('utf8'), 'info',
wx.OK | wx.ICON_INFORMATION)
convert = 0
self.convert.SetValue(convert)
示例15: ShowMessage
# 需要导入模块: import wx [as 别名]
# 或者: from wx import ICON_INFORMATION [as 别名]
def ShowMessage(self, w_msg):
wx.MessageBox(w_msg, 'Info', wx.OK | wx.ICON_INFORMATION)