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


Python ConfirmDlg.ConfirmDlg类代码示例

本文整理汇总了Python中ConfirmDlg.ConfirmDlg的典型用法代码示例。如果您正苦于以下问题:Python ConfirmDlg类的具体用法?Python ConfirmDlg怎么用?Python ConfirmDlg使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: __init__

 def __init__(self, app):
     self.app = app
     self.newAccDlg = NewAccDlg(app)
     self.confirmDlg = ConfirmDlg(app)
     self.firstlogin = True
     self.versionChecked = False
     self.createUI()
开发者ID:ospaceteam,项目名称:outerspace,代码行数:7,代码来源:LoginDlg.py

示例2: __init__

 def __init__(self, app):
     self.app = app
     self.wantsNew = False
     self.needsPassword = False
     self.previousSelection = None # this is to fix connection lost/relog usability issue
     self.createUI()
     self.passwordDlg = PasswordDlg(app)
     self.confirmDlg = ConfirmDlg(app)
     self.confirmDlg.setTitle(_("No free starting position"))
开发者ID:ospaceteam,项目名称:outerspace,代码行数:9,代码来源:PlayerSelectDlg.py

示例3: __init__

	def __init__(self, app):
		self.app = app
		self.createUI()
		#
		self.selectedObjID = None
		self.selectedForum = None
		self.selectedTopic = None
		self.selectedType = None
		self.newMessageDlg = NewMessageDlg(app)
		self.newMsgs = 0
		self.confirmDlg = ConfirmDlg(app)
		self.uignore = []
		self.gignore = []
		self.lignore = []
		if  gdata.config.ignore.universe:
			self.uignore = gdata.config.ignore.universe.split(',')
		if  gdata.config.ignore.galaxy:
			self.gignore = gdata.config.ignore.galaxy.split(',')
		if  gdata.config.ignore.local:
			self.lignore = gdata.config.ignore.local.split(',')
开发者ID:OuterDeepSpace,项目名称:OuterDeepSpace,代码行数:20,代码来源:MessagesDlg.py

示例4: __init__

	def __init__(self, app):
		self.app = app
		self.starSystemDlg = StarSystemDlg(self.app)
		self.fleetDlg = FleetDlg(self.app)
		self.researchDlg = ResearchDlg(self.app)
		self.confirmDlg = ConfirmDlg(self.app)
		self.diplomacyDlg = DiplomacyDlg.DiplomacyDlg(self.app)
		self.constructionDlg = ConstructionDlg(self.app)
		self.messagesDlg = MessagesDlg(self.app)
		self.planetsOverviewDlg = PlanetsOverviewDlg(self.app)
		self.systemOverviewDlg = SystemOverviewDlg(self.app)
		self.fleetsOverviewDlg = FleetsOverviewDlg(self.app)
		self.optionsDlg = OptionsDlg(self.app)
		self.searchDlg = SearchDlg(self.app)
		self.problemsDlg = ProblemsDlg.ProblemsDlg(self.app)
		self.empireOverviewDlg = EmpireOverviewDlg.EmpireOverviewDlg(self.app)
		self.galaxyRestartDlg = GalaxyRestartDlg(self.app)
		self.planetsAnalysisDlg = PlanetsAnalysisDlg(app)
		self.fleetsAnalysisDlg = FleetsAnalysisDlg(app)
		self.mapWidget = None
		self.createUI()
		self.centered = 0
开发者ID:mozts2005,项目名称:OuterSpace,代码行数:22,代码来源:MainGameDlg.py

示例5: __init__

class MainGameDlg:

    def __init__(self, app):
        self.app = app
        self.starSystemDlg = StarSystemDlg(self.app)
        self.fleetDlg = FleetDlg(self.app)
        self.researchDlg = ResearchDlg(self.app)
        self.confirmDlg = ConfirmDlg(self.app)
        self.diplomacyDlg = DiplomacyDlg.DiplomacyDlg(self.app)
        self.constructionDlg = ConstructionDlg(self.app)
        self.messagesDlg = MessagesDlg(self.app)
        self.planetsOverviewDlg = PlanetsOverviewDlg(self.app)
        self.globalQueuesDlg = GlobalQueuesDlg(self.app)
        self.systemOverviewDlg = SystemOverviewDlg(self.app)
        self.fleetsOverviewDlg = FleetsOverviewDlg(self.app)
        self.optionsDlg = OptionsDlg(self.app)
        self.searchDlg = SearchDlg(self.app)
        self.problemsDlg = ProblemsDlg.ProblemsDlg(self.app)
        self.empireOverviewDlg = EmpireOverviewDlg.EmpireOverviewDlg(self.app)
        self.galaxyFinishDlg = GalaxyFinishDlg(self.app)
        self.planetsAnalysisDlg = PlanetsAnalysisDlg(app)
        self.fleetsAnalysisDlg = FleetsAnalysisDlg(app)
        self.mapWidget = None
        self.createUI()
        self.centered = 0

    def display(self):
        self.app.showBackground = False
        gdata.mainGameDlg = self
        self.win.show()
        # register for updates
        gdata.updateDlgs.append(self)
        #self.refocus()

    def refocus(self):
        #log.debug("refocusing")
        self.app.setFocus(self.mapWidget)

    def onCmdInProgress(self, inProgress):
        if inProgress:
            self.win.vTurn.background = (0xff, 0xff, 0x00)
        else:
            self.win.vTurn.background = None

    def hide(self):
        self.app.showBackground = True
        self.win.hide()
        gdata.mainGameDlg = None
        # unregister updates
        if self in gdata.updateDlgs:
            gdata.updateDlgs.remove(self)

    def onExit(self, widget, action, data):
        self.app.setStatus(_('Exitting a session...'))
        self.hide()
        self.app.exitLocal()

    def onSelectMapObj(self, widget, action, data):
        self.win.vStarMap.highlightPos = None
        obj = client.get(data, noUpdate = 1)
        if obj == None:
            self.app.setStatus(_('Cannot select object on map'))
            return
        if obj.type in (Const.T_PLANET, Const.T_SYSTEM, Const.T_WORMHOLE):
            self.starSystemDlg.onSelectMapObj(None, None, data)
        elif obj.type == Const.T_FLEET:
            self.fleetDlg.display(data)

    def onResearch(self, widget, action, data):
        self.researchDlg.display()

    def onDiplomacy(self, widget, action, data):
        self.diplomacyDlg.display()

    def onMessages(self, widget, action, data):
        self.messagesDlg.display()

    def onConstruction(self, widget, action, data):
        self.constructionDlg.display()

    def onPlanetsMenu(self, widget, action, data):
        self.systemPlanetMenu.show((16*20, 0))

    def onPlanets(self, widget, action, data):
        self.planetsOverviewDlg.display()

    def onSystems(self, widget, action, data):
        self.systemOverviewDlg.display()

    def onPlanetAnalysis(self, widget, action, data):
        self.planetsAnalysisDlg.display()

    def onGlobalQueues(self, widget, action, data):
        self.globalQueuesDlg.display()

    def onFleetsMenu(self, widget, action, data):
        self.systemFleetMenu.show((20*20, 0))

    def onFleets(self, widget, action, data):
        self.fleetsOverviewDlg.display()
#.........这里部分代码省略.........
开发者ID:ospaceteam,项目名称:outerspace,代码行数:101,代码来源:MainGameDlg.py

示例6: __init__

	def __init__(self, app):
		self.app = app
		self.confirmDlg = ConfirmDlg(self.app)
		self.createUI()
开发者ID:mozts2005,项目名称:OuterSpace,代码行数:4,代码来源:GalaxyRestartDlg.py

示例7: __init__

class LoginDlg:

	def __init__(self, app):
		self.app = app
		self.newAccDlg = NewAccDlg(app)
		self.confirmDlg = ConfirmDlg(app)
		self.firstlogin = True
		self.createUI()

	def display(self, caller = None, message = None):
		self.caller = caller
		self.win.vCreate.visible = gdata.config.game.accountcreated == None
		if gdata.config.game.lastlogin != None:
			self.win.vLogin.text = gdata.config.game.lastlogin
		if gdata.config.game.lastpassword:
			self.win.vPassword.text = gdata.config.game.lastpassword
		if gdata.config.game.lastpasswordcrypted:
			self.win.vPassword.text = binascii.a2b_base64(gdata.config.game.lastpasswordcrypted)
		if not gdata.config.game.lastgameid:
			gdata.config.game.lastgameid = 'Alpha'
		self.win.vMessage.text = message
		#if gdata.config.game.autologin != 'yes':	# enable this to disable auto-login after change in options
		#	self.firstlogin = false
		self.win.show()

	def hide(self):
		self.win.hide()

	def autoLogin(self):
		if self.firstlogin:
			self.firstlogin = False
			self.win.vMessage.text = _('Auto-login in progress ...')
			login = self.win.vLogin.text
			password = self.win.vPassword.text
			gameID = gdata.config.game.lastgameid
			self.doLogin(gameID,login,password)

	def onLogin(self, widget, action, data):
		self.firstlogin = False
		login = self.win.vLogin.text
		password = self.win.vPassword.text
		gameID = gdata.config.game.lastgameid
		self.win.vMessage.text = _('Login in progress ...')
		# self.win.hide()
		self.doLogin(gameID,login,password)

	def doLogin(self,gameID,login,password):
		result = client.login(gameID, login, password)
		self.win.hide()
		if result == 1:
			gdata.config.game.lastlogin = login
			# TODO: remove in 0.6
			gdata.config.game.lastpassword = None
			#
			if gdata.savePassword:
				gdata.config.game.lastpasswordcrypted = binascii.b2a_base64(password).strip()
			else:
				gdata.config.game.lastpasswordcrypted = None
			gdata.config.game.lastgameid = gameID
			gdata.config.game.accountcreated = 1
			# write configuration
			gdata.config.save('var/osci.ini')
			gdata.config.game.lastpasswordcrypted = binascii.b2a_base64(password).strip()
			# init ruleset
			Rules.initRules(os.path.join("res", "rules", client.rulesetName))
			# check version
			if (client.lastClientVersion != version or client.lastClientRevision != revision) and version != (0,0,0,'a'):
				# wow, a different version!
				self.confirmDlg.display(
					_("Your client version does not match server version %d.%d.%d%s [Revision %d]. Do you want to continue?") % (
						client.lastClientVersion[0],
						client.lastClientVersion[1],
						client.lastClientVersion[2],
						client.lastClientVersion[3],
						client.lastClientRevision,
					),
					_('Yes'), _('No'), self.onContinueWithOld, self.app.exit)
				return
			# show main dialog
			if not gdata.mainGameDlg:
				gdata.mainGameDlg = MainGameDlg(self.app)
				gdata.mainGameDlg.display()
			client.updateDatabase()
		elif result == 2:
			pass
		else:
			# login failed
			self.win.vPassword.text = ''
			self.win.vMessage.text = _('Wrong login and/or password')
			self.win.show()

	def onCancel(self, widget, action, data):
		self.win.hide()
		if self.caller:
			self.caller.display()
		else:
			self.app.exit()

	def onContinueWithOld(self):
			# show main dialog
#.........这里部分代码省略.........
开发者ID:mozts2005,项目名称:OuterSpace,代码行数:101,代码来源:LoginDlg.py

示例8: __init__

class MainGameDlg:

	def __init__(self, app):
		self.app = app
		self.starSystemDlg = StarSystemDlg(self.app)
		self.fleetDlg = FleetDlg(self.app)
		self.researchDlg = ResearchDlg(self.app)
		self.confirmDlg = ConfirmDlg(self.app)
		self.diplomacyDlg = DiplomacyDlg.DiplomacyDlg(self.app)
		self.constructionDlg = ConstructionDlg(self.app)
		self.messagesDlg = MessagesDlg(self.app)
		self.planetsOverviewDlg = PlanetsOverviewDlg(self.app)
		self.globalQueuesDlg = GlobalQueuesDlg(self.app)
		self.systemOverviewDlg = SystemOverviewDlg(self.app)
		self.fleetsOverviewDlg = FleetsOverviewDlg(self.app)
		self.optionsDlg = OptionsDlg(self.app)
		self.searchDlg = SearchDlg(self.app)
		self.problemsDlg = ProblemsDlg.ProblemsDlg(self.app)
		self.empireOverviewDlg = EmpireOverviewDlg.EmpireOverviewDlg(self.app)
		self.galaxyRestartDlg = GalaxyRestartDlg(self.app)
		self.planetsAnalysisDlg = PlanetsAnalysisDlg(app)
		self.fleetsAnalysisDlg = FleetsAnalysisDlg(app)
		self.mapWidget = None
		self.createUI()
		self.centered = 0

	def display(self):
		gdata.showBackground = 0
		gdata.mainGameDlg = self
		self.win.show()
		# register for updates
		gdata.updateDlgs.append(self)
		#self.refocus()

	def refocus(self):
		#log.debug("refocusing")
		self.app.setFocus(self.mapWidget)

	def onCmdInProgress(self, inProgress):
		if inProgress:
			self.win.vTurn.background = (0xff, 0xff, 0x00)
		else:
			self.win.vTurn.background = None

	def hide(self):
		gdata.showBackground = 1
		self.win.hide()
		gdata.mainGameDlg = None
		# unregister updates
		if self in gdata.updateDlgs:
			gdata.updateDlgs.remove(self)

	def onQuit(self, widget, action, data):
		self.app.setStatus(_('Logging out and exitting...'))
		self.app.exit()

	def onSelectMapObj(self, widget, action, data):
		self.win.vStarMap.highlightPos = None
		obj = client.get(data, noUpdate = 1)
		if obj == None:
			self.app.setStatus(_('Cannot select object on map'))
			return
		if obj.type in (T_PLANET, T_SYSTEM, T_WORMHOLE):
			self.starSystemDlg.display(data)
		elif obj.type == T_FLEET:
			self.fleetDlg.display(data)

	def onResearch(self, widget, action, data):
		self.researchDlg.display()

	def onDiplomacy(self, widget, action, data):
		self.diplomacyDlg.display()

	def onMessages(self, widget, action, data):
		self.messagesDlg.display()

	def onConstruction(self, widget, action, data):
		self.constructionDlg.display()

	def onPlanetsMenu(self, widget, action, data):
		self.systemPlanetMenu.show((16*20, 0))
		
	def onPlanets(self, widget, action, data):
		self.planetsOverviewDlg.display()

	def onSystems(self, widget, action, data):
		self.systemOverviewDlg.display()

	def onPlanetAnalysis(self, widget, action, data):
		self.planetsAnalysisDlg.display()
		
	def onGlobalQueues(self, widget, action, data):
		self.globalQueuesDlg.display()
		
	def onFleetsMenu(self, widget, action, data):
		self.systemFleetMenu.show((20*20, 0))
		
	def onFleets(self, widget, action, data):
		self.fleetsOverviewDlg.display()

#.........这里部分代码省略.........
开发者ID:Lukc,项目名称:ospace-lukc,代码行数:101,代码来源:MainGameDlg.py

示例9: __init__

	def __init__(self, app):
		self.app = app
		self.createUI()
		self.confirmDlg = ConfirmDlg(app)
		self.confirmDlg.setTitle(_("No free starting position"))
开发者ID:Lukc,项目名称:ospace-lukc,代码行数:5,代码来源:NewAccountDlg.py


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