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


Python Images.getImage方法代码示例

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


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

示例1: getToolbar

# 需要导入模块: import Images [as 别名]
# 或者: from Images import getImage [as 别名]
def getToolbar(self, toolbar, window):
    SEPARATOR = 1000
    
    mainwindow      = ""
    newconfigwindow = ""
    configwindow    = "" 
    downloadwindow  = ""
    selectserver    = ""

    window = window.upper()
    if window == 'MAINWINDOW':
		mainwindow = ( 
	                 ('Nuevo', 'Crear nuevo codigo fuente ABAP', Config.IMG_PATH + 'newfile.png', self.OnNewFile),
                     ('Abrir', 'Abrir archivo de codigo fuente ABAP', Config.IMG_PATH + 'fileopen.png', self.OnOpen),
 				     ('Obtener codigo fuente', 'Descarga codigo  fuente ABAP del servidor origen', Config.IMG_PATH+'download.png', self.OnDownload), 
                     ('Guardar codigo fuente en SAP', 'Subir codigo fuente a Servidor SAP', Config.IMG_PATH+'upload.png', self.OnUpload),
                     ('Guardar', 'Guarda codigo en disco duro', Config.IMG_PATH + 'save.png', self.OnSave),
                     ('Comentar', 'Comenta codigo seleccionado', Config.IMG_PATH + 'comment.png', self.OnComment),
                     #('Verificar syntaxis', 'Verifica que el codigo fuente este correcto', Config.IMG_PATH + 'syntaxis.png', self.OnSyntaxis),
                     SEPARATOR,

                     ('Ejecutar codigo', 'Ejecuta codigo fuente ABAP en el servidor destino', Config.IMG_PATH+ 'execute.png', self.OnExecute),
                     ('Configurar', 'Configuracion de servidores', Config.IMG_PATH + 'configure.png', self.OnConfig),
                     SEPARATOR,
                     ('Ayuda', 'Ayuda en linea de Zorse', Config.IMG_PATH + 'help.png', self.OnHelp)
 					)
                   
    if window == 'CONFIGWINDOW':
		configwindow = ( ('Nuevo', 'Crear nueva configuracion de servidor', Config.IMG_PATH + 'new.png', self.OnNew), 
                     ('Modificar', 'Modificar configuracion de servidor', Config.IMG_PATH + 'modify.png', self.OnModify),
                     ('Eliminar', 'Eliminar configuracion de servidor', Config.IMG_PATH + 'delete.png', self.OnDelete),
                     ('Actualizar', 'Actualizar informacion', Config.IMG_PATH + 'refresh.png', None),
                      None
                     )
    
    if window == 'NEWCONFIGWINDOW':                 
		newconfigwindow = ( ('Guardar', 'Guarda configuracion', Config.IMG_PATH + 'save.png', self.OnSave), 
                            ('Probar configuracion', 'Probar configuracion', Config.IMG_PATH + 'test_config.png', self.OnTestConfig),
                     None
                    )

    if window == 'DOWNLOADWINDOW':
        downloadwindow = ( ( 'Download', 'Download ABAP Source Code', Config.IMG_PATH + 'download.png', self.OnDownload), None )

    if window == 'SELECTSERVER':
        selectserver = ( ( 'Select Server', 'Execute ABAP Code', Config.IMG_PATH + 'execute.png', self.OnExecute), None )
    
    bars = { 'MAINWINDOW': mainwindow,
             'CONFIGWINDOW': configwindow, 
             'NEWCONFIGWINDOW': newconfigwindow,
             'DOWNLOADWINDOW': downloadwindow,
             'SELECTSERVER': selectserver
            }
  
    bar = bars[window]
   
    for tool in bar:
		if tool != None:
			if tool == SEPARATOR:
				toolbar.AddSeparator()
			else:
				title, stbar, image, handler = tool
				t = toolbar.AddSimpleTool(wx.NewId(), Images.getImage(self,image), title, stbar)
				if handler != None:
					self.Bind(wx.EVT_MENU, handler, t)
    return toolbar
开发者ID:hugo-dc,项目名称:Zorse,代码行数:68,代码来源:Toolbars.py


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