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


Python config.ConfigIP类代码示例

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


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

示例1: __init__

	def __init__(self, service):
		self._service = service
		self.onChanged = []
		self.onMethodChanged = []
		method_choices_ip4 = {eNetworkService.METHOD_DHCP : "dhcp", eNetworkService.METHOD_MANUAL : _("manual"), eNetworkService.METHOD_OFF : _("off")}
		#IPv4
		self._config_ip4_method = ConfigSelection(method_choices_ip4, default=eNetworkService.METHOD_DHCP)
		self._config_ip4_address = ConfigIP(default=[0,0,0,0])
		self._config_ip4_mask = ConfigIP(default=[0,0,0,0])
		self._config_ip4_gw = ConfigIP(default=[0,0,0,0])
		#IPv6
		method_choices_ip6 = {eNetworkService.METHOD_AUTO : _("auto"), eNetworkService.METHOD_6TO4 : "6to4", eNetworkService.METHOD_MANUAL : _("manual"), eNetworkService.METHOD_OFF : _("off")}
		choices_privacy_ip6 = {eNetworkService.IPV6_PRIVACY_DISABLED : _("Disabled"), eNetworkService.IPV6_PRIVACY_ENABLED : _("Enabled"), eNetworkService.IPV6_PRIVACY_PREFERRED : _("Preferred")}
		self._config_ip6_method = ConfigSelection(method_choices_ip6, default=eNetworkService.METHOD_DHCP)
		self._config_ip6_address = ConfigIP6()
		self._config_ip6_prefix_length = ConfigInteger(0, limits=(1, 128))
		self._config_ip6_gw = ConfigIP6()
		self._config_ip6_privacy = ConfigSelection(choices_privacy_ip6, default="disabled")

		self._isReloading = False
		self._ipv4Changed = False
		self._ipv6Changed = False
		self._addNotifiers()
		self._service_conn = [
			self._service.ipv4Changed.connect(self._serviceChanged),
			self._service.ipv6Changed.connect(self._serviceChanged),
			self._service.ipv4ConfigChanged.connect(self._serviceChanged),
			self._service.ipv6ConfigChanged.connect(self._serviceChanged),
		]
开发者ID:OpenDMM,项目名称:enigma2,代码行数:29,代码来源:NetworkConfig.py

示例2: ScanIP

class ScanIP(Screen, ConfigListScreen):
	skin = """
		<screen name="ScanIP" position="center,center" size="560,80" title="Scan IP" >
			<ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" />
			<ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" />
			<ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" size="140,40" alphatest="on" />
			<widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" />
			<widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
			<widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" transparent="1" />
			<widget name="config" position="5,50" size="540,25" scrollbarMode="showOnDemand" />
		</screen>"""

	def __init__(self, session):
		Screen.__init__(self, session)
		self.session = session

		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("Scan NFS share"))
		self["key_yellow"] = StaticText(_("Scan range"))

		self["actions"] = ActionMap(["SetupActions", "ColorActions"],
		{
			"back": self.exit,
			"red": self.exit,
			"cancel": self.exit,
			"green": self.goNfs,
			"yellow": self.goAddress,
		}, -1)

		self.ipAddress = ConfigIP(default=[0,0,0,0])

		ConfigListScreen.__init__(self, [
			getConfigListEntry(_("IP Address"), self.ipAddress),
		], self.session)

		self.onLayoutFinish.append(self.layoutFinished)

	def exit(self):
		self.close((None,None))

	def layoutFinished(self):
		self.setWindowTitle()

	def setWindowTitle(self):
		self.setTitle(_("Enter IP to scan..."))

	def goAddress(self):
		if self.ipAddress.getText() != "0.0.0.0":
			self.close((self.ipAddress.getText(), "address"))
		else:
			self.exit

	def goNfs(self):
		if self.ipAddress.getText() != "0.0.0.0":
			self.close((self.ipAddress.getText(), "nfs"))
		else:
			self.exit
开发者ID:Dog6574,项目名称:enigma2-plugins-1,代码行数:57,代码来源:NetworkBrowser.py

示例3: __init__

    def __init__(self, session, args = None):
        Screen.__init__(self, session)
        self.index = args
        self.list = []
        ConfigListScreen.__init__(self, self.list)
        self.ipConfigEntry = ConfigIP(default=[0,
         0,
         0,
         0])
        self.interface = 'eth0'
        if self.index == self.STATE_UPDATE:
            config.misc.installwizard.hasnetwork.value = False
            config.misc.installwizard.ipkgloaded.value = False
            modes = {0: ' '}
            self.enabled = ConfigSelection(choices=modes, default=0)
            self.adapters = [ (iNetwork.getFriendlyAdapterName(x), x) for x in iNetwork.getAdapterList() ]
            is_found = False
            for x in self.adapters:
                if x[1] == 'eth0':
                    if iNetwork.getAdapterAttribute(x[1], 'up'):
                        self.ipConfigEntry = ConfigIP(default=iNetwork.getAdapterAttribute(x[1], 'ip'))
                        iNetwork.checkNetworkState(self.checkNetworkCB)
                        if_found = True
                        self.interface = x[1]
                    else:
                        iNetwork.restartNetwork(self.checkNetworkLinkCB)
                    break

            if is_found is False:
                self.createMenu()
        elif self.index == self.STATE_CHOISE_CHANNELLIST:
            self.enabled = ConfigYesNo(default=True)
            modes = {'henksat-19e': 'Astra 1',
             'henksat-23e': 'Astra 3',
             'henksat-19e-23e': 'Astra 1 Astra 3',
             'henksat-19e-23e-28e': 'Astra 1 Astra 2 Astra 3',
             'henksat-13e-19e-23e-28e': 'Astra 1 Astra 2 Astra 3 Hotbird'}
            self.channellist_type = ConfigSelection(choices=modes, default='henksat-13e-19e-23e-28e')
            self.createMenu()
        elif self.index == self.STATE_CHOISE_SOFTCAM:
            self.enabled = ConfigYesNo(default=True)
            modes = {'oscam': _('default') + ' OSCam',
             'cccam': 'CCcam',
             'gbox': 'GBox',
             'wicardd': 'Wicardd',
             'mgcamd': 'MGCamd'}
            if getBoxType() in 'vusolo4k':
                modes = {'oscam': _('default') + ' OSCam',
                 'wicardd': 'Wicardd'}
            if getBoxType() in 'wetekplay':
                modes = {'oscam': _('default') + ' OSCam'}
            self.softcam_type = ConfigSelection(choices=modes, default='oscam')
            self.createMenu()
开发者ID:kingvuplus,项目名称:o-guitools,代码行数:53,代码来源:InstallWizard.py

示例4: __init__

	def __init__(self, session, args = None):
		Screen.__init__(self, session)

		self.index = args
		self.list = []
		ConfigListScreen.__init__(self, self.list)

		if self.index == self.STATE_UPDATE:
			config.misc.installwizard.hasnetwork.value = False
			config.misc.installwizard.ipkgloaded.value = False
			modes = {0: " "}
			self.enabled = ConfigSelection(choices = modes, default = 0)
			self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()]
			is_found = False
			for x in self.adapters:
				if x[1] == 'eth0':
					if iNetwork.getAdapterAttribute(x[1], 'up'):
						self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip"))
						iNetwork.checkNetworkState(self.checkNetworkCB)
						if_found = True
					else:
						iNetwork.restartNetwork(self.checkNetworkLinkCB)
					break
				elif x[1] == 'wlan0':
					if iNetwork.getAdapterAttribute(x[1], 'up'):
						self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip"))
						iNetwork.checkNetworkState(self.checkNetworkCB)
						if_found = True
					else:
						iNetwork.restartNetwork(self.checkNetworkLinkCB)
					break
				elif x[1] == 'ra0':
					if iNetwork.getAdapterAttribute(x[1], 'up'):
						self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip"))
						iNetwork.checkNetworkState(self.checkNetworkCB)
						if_found = True
					else:
						iNetwork.restartNetwork(self.checkNetworkLinkCB)
					break
			if is_found is False:
				self.createMenu()
		elif self.index == self.STATE_CHOISE_CHANNELLIST:
			self.enabled = ConfigYesNo(default = True)
			modes = {"default-ventonsupport": "Default Germany", "henksat-19e": "Astra 1", "henksat-23e": "Astra 3", "henksat-19e-23e": "Astra 1 Astra 3", "henksat-19e-23e-28e": "Astra 1 Astra 2 Astra 3", "henksat-13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird"}
			self.channellist_type = ConfigSelection(choices = modes, default = "default-ventonsupport")
			self.createMenu()
		elif self.index == self.STATE_CHOISE_SOFTCAM:
			self.enabled = ConfigYesNo(default = True)
			modes = {"cccam": _("default") + " (CCcam)", "gbox": "GBox", "wicardd": "Wicardd"}
			self.softcam_type = ConfigSelection(choices = modes, default = "cccam")
			self.createMenu()
开发者ID:almwad3,项目名称:dvbapp2-gui,代码行数:51,代码来源:InstallWizard.py

示例5: ScanIP

class ScanIP(Screen, ConfigListScreen):
    skin = '\n\t\t<screen name="ScanIP" position="center,center" size="560,80" title="Scan IP" >\n\t\t\t<ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" />\n\t\t\t<ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" />\n\t\t\t<ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" size="140,40" alphatest="on" />\n\t\t\t<widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" />\n\t\t\t<widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />\n\t\t\t<widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" transparent="1" />\n\t\t\t<widget name="config" position="5,50" size="540,25" scrollbarMode="showOnDemand" />\n\t\t</screen>'

    def __init__(self, session):
        Screen.__init__(self, session)
        self.session = session
        self['key_red'] = StaticText(_('Cancel'))
        self['key_green'] = StaticText(_('Scan NFS share'))
        self['key_yellow'] = StaticText(_('Scan range'))
        self['actions'] = ActionMap(['SetupActions', 'ColorActions'], {'back': self.exit,
         'red': self.exit,
         'cancel': self.exit,
         'green': self.goNfs,
         'yellow': self.goAddress}, -1)
        self.ipAddress = ConfigIP(default=[0,
         0,
         0,
         0])
        ConfigListScreen.__init__(self, [getConfigListEntry(_('IP Address'), self.ipAddress)], self.session)
        self.onLayoutFinish.append(self.layoutFinished)



    def exit(self):
        self.close((None, None))



    def layoutFinished(self):
        self.setWindowTitle()



    def setWindowTitle(self):
        self.setTitle(_('Enter IP to scan...'))



    def goAddress(self):
        if self.ipAddress.getText() != '0.0.0.0':
            self.close((self.ipAddress.getText(), 'address'))
        else:
            self.exit



    def goNfs(self):
        if self.ipAddress.getText() != '0.0.0.0':
            self.close((self.ipAddress.getText(), 'nfs'))
        else:
            self.exit
开发者ID:OUARGLA86,项目名称:enigma2,代码行数:51,代码来源:NetworkBrowser.py

示例6: __init__

	def __init__(self, session, args = None):
		Screen.__init__(self, session)

		self.index = args
		self.list = []
		ConfigListScreen.__init__(self, self.list)

		if self.index == self.STATE_UPDATE:
			config.misc.installwizard.hasnetwork.value = False
			config.misc.installwizard.ipkgloaded.value = False
			modes = {0: " "}
			self.enabled = ConfigSelection(choices = modes, default = 0)
			self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()]
			is_found = False
			if os.path.isfile("/tmp/netwizardselection"):
			        f = open('/tmp/netwizardselection', 'r')
			        adapx1 = f.read()
			        f.close()
			        adapx1 = adapx1.replace('\n','')
                        	print "adapx1:", adapx1 
                        else:                                                				
				adapx1 = 'eth0'
                                print "adapx1+1:", adapx1 	
			for x in self.adapters:
				if adapx1 == 'eth0':
					if iNetwork.getAdapterAttribute(adapx1, 'up'):
						self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(adapx1, "ip"))
						iNetwork.checkNetworkState(self.checkNetworkCB)
						if_found = True
					else:
						iNetwork.restartNetwork(self.checkNetworkLinkCB)
					break
				elif adapx1 == 'wlan0':
					if iNetwork.getAdapterAttribute(adapx1, 'up'):
						self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(adapx1, "ip"))
						iNetwork.checkNetworkState(self.checkNetworkCB)
						if_found = True
					else:
						iNetwork.restartNetwork(self.checkNetworkLinkCB)
					break
				elif adapx1 == 'ra0':
					if iNetwork.getAdapterAttribute(adapx1, 'up'):
						self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(adapx1, "ip"))
						iNetwork.checkNetworkState(self.checkNetworkCB)
						if_found = True
					else:
						iNetwork.restartNetwork(self.checkNetworkLinkCB)
					break
			if is_found is False:
				self.createMenu()
开发者ID:Venom83,项目名称:openNFR-gui,代码行数:50,代码来源:InstallWizard.py

示例7: __init__

	def __init__(self, session, args = None):
		Screen.__init__(self, session)

		self.index = args
		self.list = []
		ConfigListScreen.__init__(self, self.list)

		if self.index == self.STATE_UPDATE:
			config.misc.installwizard.hasnetwork.value = False
			config.misc.installwizard.ipkgloaded.value = False
			modes = {0: " "}
			self.enabled = ConfigSelection(choices = modes, default = 0)
			self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()]
			is_found = False
			for x in self.adapters:
				if x[1] == 'eth0':
					if iNetwork.getAdapterAttribute(x[1], 'up'):
						self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip"))
						iNetwork.checkNetworkState(self.checkNetworkCB)
						if_found = True
					else:
						iNetwork.restartNetwork(self.checkNetworkLinkCB)
					break
			if is_found is False:
				self.createMenu()
		elif self.index == self.STATE_CHOISE_CHANNELLIST:
			self.enabled = ConfigYesNo(default = True)
			modes = {"sfteam": "Astra 19e", "23e": "Astra 3", "19e-23e": "Astra 1 Astra 3", "19e-23e-28e": "Astra 1 Astra 2 Astra 3", "13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird"}
			self.channellist_type = ConfigSelection(choices = modes, default = "sfteam")
			self.createMenu()

		elif self.index == self.STATE_CHOISE_PICONS:
			self.enabled = ConfigYesNo(default = True)
			modes = {"220x132.black-white": "Astra 19e - Black White 220x132", "220x132.white-black": "Astra 19e - White Black 220x132", "220x132.blue-black": "Astra 19e - Blue Black 220x132", "220x132.reflection-black": "Astra 19e - Reflection Black 220x132", "220x132.transparent-black": "Astra 19e - Transparent Black 220x132", "220x132.transparent-white": "Astra 19e - Transparent White 220x132"}
			self.picons_type = ConfigSelection(choices = modes, default = "220x132.black-white")
			self.createMenu()

		elif self.index == self.STATE_CHOISE_SOFTCAM:
			self.enabled = ConfigYesNo(default = True)
			modes = {"cccam230": "CCcam 2.3.0", "cccam221": "CCcam 2.2.1","cccam214": "CCcam 2.1.4","mgcamd": "MGcamd 1.30d","evocamd": "Evocamd 2.1.7","rqcamd": "RQcamd 1.3.1","scam": "Scam 3.5.3",}
			self.softcam_type = ConfigSelection(choices = modes, default = "cccam230")
			self.createMenu()

		elif self.index == self.STATE_CHOISE_CARDSERVER:
			self.enabled = ConfigYesNo(default = True)
			modes = {"oscam": "OScam","newcs167": "NewCS 1.6.7"}
			self.cardserver_type = ConfigSelection(choices = modes, default = "oscam")
			self.createMenu()
			
		elif self.index == self.STATE_CHOISE_MBOOT:
			self.enabled = ConfigYesNo(default = True)
			modes = {"openmultiboot": "OpenMultiBoot"}
			self.cache_type = ConfigSelection(choices = modes, default = "openmultiboot")
			self.createMenu()

		elif self.index == self.STATE_CHOISE_HBBTV:
			self.enabled = ConfigYesNo(default = True)
			modes = {"browser": "Install"}
			self.hbbtv_type = ConfigSelection(choices = modes, default = "browser")
			self.createMenu()
开发者ID:trunca,项目名称:novale-viejo,代码行数:60,代码来源:InstallWizard.py

示例8: __init__

	def __init__(self, session, args = None):
		Screen.__init__(self, session)

		self.index = args
		self.list = []
		ConfigListScreen.__init__(self, self.list)

		if self.index is self.STATE_UPDATE:
			config.misc.installwizard.hasnetwork.value = False
			config.misc.installwizard.ipkgloaded.value = False
			modes = {0: " "}
			self.enabled = ConfigSelection(choices = modes, default = 0)
			self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()]
			is_found = False
			for x in self.adapters:
				if x[1] == 'eth0':
					if iNetwork.getAdapterAttribute(x[1], 'up'):
						self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip"))
						iNetwork.checkNetworkState(self.checkNetworkCB)
						if_found = True
					else:
						iNetwork.restartNetwork(self.checkNetworkLinkCB)
					break
			if is_found is False:
				self.createMenu()
		elif self.index is self.STATE_CHOISE_CHANNELLIST:
			self.enabled = ConfigYesNo(default = True)
			modes = {"19e-23e-basis": "Astra1 Astra3 basis", "19e-23e": "Astra 1 Astra 3", "19e-23e-28e": "Astra 1 Astra 2 Astra 3", "13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird", "kabelnl": "Kabel-NL"}
			self.channellist_type = ConfigSelection(choices = modes, default = "19e-23e-basis")
			self.createMenu()
		elif self.index is self.STATE_CHOISE_SOFTCAM:
			self.enabled = ConfigYesNo(default = True)
			modes = {"wicardd": _("default") + " (Wicard)", "oscam-ymod": "Oscam-Ymod", "mgcamd": "Mgcamd", "cccam": "Cccam"}
			self.softcam_type = ConfigSelection(choices = modes, default = "wicardd")
			self.createMenu()
开发者ID:Taapat,项目名称:enigma2-openpli-fulan,代码行数:35,代码来源:InstallWizard.py

示例9: __init__

	def __init__(self, session):
		Screen.__init__(self, session)
		self.session = session

		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("Scan NFS share"))
		self["key_yellow"] = StaticText(_("Scan range"))
		self["summary_description"] = StaticText("")

		self["actions"] = ActionMap(["SetupActions", "ColorActions"],
		{
			"back": self.exit,
			"red": self.exit,
			"cancel": self.exit,
			"green": self.goNfs,
			"yellow": self.goAddress,
		}, -1)

		self.ipAddress = ConfigIP(default=[0,0,0,0])

		ConfigListScreen.__init__(self, [
			getConfigListEntry(_("IP Address"), self.ipAddress),
		], self.session)

		self.onLayoutFinish.append(self.layoutFinished)
开发者ID:Linux-Box,项目名称:enigma2-plugins,代码行数:25,代码来源:NetworkBrowser.py

示例10: __init__

	def __init__(self, session, args = None):
		Screen.__init__(self, session)

		self.index = args
		self.list = []
		ConfigListScreen.__init__(self, self.list)

		if self.index == self.STATE_UPDATE:
			config.misc.installwizard.hasnetwork.value = False
			config.misc.installwizard.ipkgloaded.value = False
			modes = {0: " "}
			self.enabled = ConfigSelection(choices = modes, default = 0)
			self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()]
			is_found = False
			for x in self.adapters:
				if x[1] == 'eth0':
					if iNetwork.getAdapterAttribute(x[1], 'up'):
						self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip"))
						iNetwork.checkNetworkState(self.checkNetworkCB)
						if_found = True
					else:
						iNetwork.restartNetwork(self.checkNetworkLinkCB)
					break
			if is_found is False:
				self.createMenu()
		elif self.index == self.STATE_CHOISE_CHANNELLIST:
			self.enabled = ConfigYesNo(default = True)
			modes = {"19e": "Astra 1", "23e": "Astra 3", "19e-23e": "Astra 1 Astra 3", "19e-23e-28e": "Astra 1 Astra 2 Astra 3", "13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird"}
			self.channellist_type = ConfigSelection(choices = modes, default = "19e")
			self.createMenu()

		elif self.index == self.STATE_CHOISE_PICONS:
			self.enabled = ConfigYesNo(default = True)
			modes = {"19e": "Astra 19e", "23e": "Astra 3", "19e-23e": "Astra 1 Astra 3", "19e-23e-28e": "Astra 1 Astra 2 Astra 3", "13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird"}
			self.picons_type = ConfigSelection(choices = modes, default = "19e")
			self.createMenu()

		elif self.index == self.STATE_CHOISE_EPG:
			self.enabled = ConfigYesNo(default = True)
			modes = {"xmltvimport": "Xmltvimport", "crossepg": "CrossEPG"}
			self.epg_type = ConfigSelection(choices = modes, default = "xmltvimport")
			self.createMenu()
			
		elif self.index == self.STATE_CHOISE_TDT:
			self.enabled = ConfigYesNo(default = True)
			modes = {"siano": "Siano", "Volar Black": "Hauppauge"}
			self.tdt_type = ConfigSelection(choices = modes, default = "siano")
			self.createMenu()

		elif self.index == self.STATE_CHOISE_SOFTCAM:
			self.enabled = ConfigYesNo(default = True)
			modes = {"cccam": "CCcam", "oscam": "Oscam"}
			self.softcam_type = ConfigSelection(choices = modes, default = "cccam")
			self.createMenu()
			
		elif self.index == self.STATE_CHOISE_CACHE:
			self.enabled = ConfigYesNo(default = True)
			modes = {"multics": "MultiCS"}
			self.cache_type = ConfigSelection(choices = modes, default = "multics")
			self.createMenu()
开发者ID:vega123,项目名称:enigma2,代码行数:60,代码来源:InstallWizard.py

示例11: __init__

	def __init__(self, session, args = None):
		Screen.__init__(self, session)

		self.index = args
		self.list = []
		ConfigListScreen.__init__(self, self.list)

		if self.index == self.STATE_UPDATE:
			config.misc.installwizard.hasnetwork.value = False
			config.misc.installwizard.ipkgloaded.value = False
			modes = {0: " "}
			self.enabled = ConfigSelection(choices = modes, default = 0)
			self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()]
			is_found = False
			for x in self.adapters:
				if x[1] == 'eth0' or x[1] == 'eth1':
					if iNetwork.getAdapterAttribute(x[1], 'up'):
						self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip"))
						iNetwork.checkNetworkState(self.checkNetworkCB)
						if_found = True
					else:
						iNetwork.restartNetwork(self.checkNetworkLinkCB)
					break
			if is_found is False:
				self.createMenu()
		elif self.index == self.STATE_CHOISE_CHANNELLIST:
			self.enabled = ConfigYesNo(default = True)
			modes = {"ESI": "ESI default(13e-19e)", "19e": "Astra 1", "23e": "Astra 3", "19e-23e": "Astra 1 Astra 3", "19e-23e-28e": "Astra 1 Astra 2 Astra 3", "13e-19e-23e-28e": "Astra 1 Astra 2 Astra 3 Hotbird"}
			self.channellist_type = ConfigSelection(choices = modes, default = "ESI")
			self.createMenu()
开发者ID:OpenESI,项目名称:Gui,代码行数:30,代码来源:InstallWizard.py

示例12: __init__

	def __init__(self, session, args = None):
		Screen.__init__(self, session)

		self.index = args
		self.list = []
		ConfigListScreen.__init__(self, self.list)

		if self.index == self.STATE_UPDATE:
			config.misc.installwizard.hasnetwork.value = False
			config.misc.installwizard.ipkgloaded.value = False
			modes = {0: " "}
			self.enabled = ConfigSelection(choices = modes, default = 0)
			self.adapters = [(iNetwork.getFriendlyAdapterName(x),x) for x in iNetwork.getAdapterList()]
			is_found = False
			for x in self.adapters:
				if x[1] == 'eth0':
					if iNetwork.getAdapterAttribute(x[1], 'up'):
						self.ipConfigEntry = ConfigIP(default = iNetwork.getAdapterAttribute(x[1], "ip"))
						iNetwork.checkNetworkState(self.checkNetworkCB)
						if_found = True
					else:
						iNetwork.restartNetwork(self.checkNetworkLinkCB)
					break
			if is_found is False:
				self.createMenu()
		elif self.index == self.STATE_CHOISE_CHANNELLIST:
			self.enabled = ConfigYesNo(default = True)
			modes = {"19e": "SAT: 19e", "19e-13e": "SAT: 19e 13e", "19e-13e-5e-75e": "SAT: 19e 13e 5e 75e", "19e-16e-13e": "SAT: 19e 13e 16e", "42e-19e-13e-7e": "SAT: 42e 19e 13e 7e"}
			self.channellist_type = ConfigSelection(choices = modes, default = "19e")
			self.createMenu()
		elif self.index == self.STATE_CHOISE_SOFTCAM:
			self.enabled = ConfigYesNo(default = True)
			modes = {"oscam": _("default") + " (Oscam)", "cccam": "CCcam", "scam": "scam"}
			self.softcam_type = ConfigSelection(choices = modes, default = "oscam")
			self.createMenu()
开发者ID:schleichdi2,项目名称:openpli-e2,代码行数:35,代码来源:InstallWizard.py

示例13: __init__

    def __init__(self, session, args = None):
        Screen.__init__(self, session)
        self.index = args
        self.list = []
        ConfigListScreen.__init__(self, self.list)
        self.ipConfigEntry = ConfigIP(default=[0,
         0,
         0,
         0])
        self.interface = 'eth0'
        if self.index == self.STATE_UPDATE:
            config.misc.installwizard.hasnetwork.value = False
            config.misc.installwizard.ipkgloaded.value = False
            modes = {0: ' '}
            self.enabled = ConfigSelection(choices=modes, default=0)
            self.adapters = [ (iNetwork.getFriendlyAdapterName(x), x) for x in iNetwork.getAdapterList() ]
            is_found = False
            for x in self.adapters:
                if x[1] == 'eth0' or x[1] == 'eth1' or x[1] == 'wlan0' or x[1] == 'ra0':
                    if iNetwork.getAdapterAttribute(x[1], 'up'):
                        self.ipConfigEntry = ConfigIP(default=iNetwork.getAdapterAttribute(x[1], 'ip'))
                        iNetwork.checkNetworkState(self.checkNetworkCB)
                        if_found = True
                        self.interface = x[1]
                    else:
                        iNetwork.restartNetwork(self.checkNetworkLinkCB)
                    break

            if is_found is False:
                self.createMenu()
        elif self.index == self.STATE_CHOISE_CHANNELLIST:
            self.enabled = ConfigYesNo(default=True)
            modes = {'default-ventonsupport': 'Default Germany',
             'henksat-19e': 'Astra 1',
             'henksat-23e': 'Astra 3',
             'henksat-19e-23e': 'Astra 1 Astra 3',
             'henksat-19e-23e-28e': 'Astra 1 Astra 2 Astra 3',
             'henksat-13e-19e-23e-28e': 'Astra 1 Astra 2 Astra 3 Hotbird'}
            self.channellist_type = ConfigSelection(choices=modes, default='henksat-13e-19e-23e-28e')
            self.createMenu()
开发者ID:kingvuplus,项目名称:EGAMI-G,代码行数:40,代码来源:InstallWizard.py

示例14: __init__

 def __init__(self, session):
     Screen.__init__(self, session)
     self.session = session
     self['key_red'] = StaticText(_('Cancel'))
     self['key_green'] = StaticText(_('Scan NFS share'))
     self['key_yellow'] = StaticText(_('Scan range'))
     self['actions'] = ActionMap(['SetupActions', 'ColorActions'], {'back': self.exit,
      'red': self.exit,
      'cancel': self.exit,
      'green': self.goNfs,
      'yellow': self.goAddress}, -1)
     self.ipAddress = ConfigIP(default=[0,
      0,
      0,
      0])
     ConfigListScreen.__init__(self, [getConfigListEntry(_('IP Address'), self.ipAddress)], self.session)
     self.onLayoutFinish.append(self.layoutFinished)
开发者ID:OUARGLA86,项目名称:enigma2,代码行数:17,代码来源:NetworkBrowser.py

示例15: __init__

    def __init__(self, session, args = None):
        Screen.__init__(self, session)
        self.index = args
        self.list = []
        ConfigListScreen.__init__(self, self.list)
        if self.index == self.STATE_UPDATE:
            config.misc.installwizard.hasnetwork.value = False
            config.misc.installwizard.ipkgloaded.value = False
            modes = {0: ' '}
            self.enabled = ConfigSelection(choices=modes, default=0)
            self.adapters = [ (iNetwork.getFriendlyAdapterName(x), x) for x in iNetwork.getAdapterList() ]
            is_found = False
            for x in self.adapters:
                if x[1] == 'eth0' or x[1] == 'eth1':
                    if iNetwork.getAdapterAttribute(x[1], 'up'):
                        self.ipConfigEntry = ConfigIP(default=iNetwork.getAdapterAttribute(x[1], 'ip'))
                        iNetwork.checkNetworkState(self.checkNetworkCB)
                        if_found = True
                    else:
                        iNetwork.restartNetwork(self.checkNetworkLinkCB)
                    break

            if is_found is False:
                self.createMenu()
        elif self.index == self.STATE_CHOISE_CHANNELLIST:
            self.enabled = ConfigYesNo(default=True)
            modes = {'19e': 'Astra 1',
             '23e': 'Astra 3',
             '19e-23e': 'Astra 1 Astra 3',
             '19e-23e-28e': 'Astra 1 Astra 2 Astra 3',
             '13e-19e-23e-28e': 'Astra 1 Astra 2 Astra 3 Hotbird'}
            self.channellist_type = ConfigSelection(choices=modes, default='19e')
            self.createMenu()
        elif self.index == self.STATE_CHOISE_SETTINGPLUGIN:
            self.enabled = ConfigYesNo(default=True)
            modes = {'isettinge2': 'iSettingE2',
             'cyrussettings': 'Cyrus Setting'}
            self.pluginsetting_type = ConfigSelection(choices=modes, default='isettinge2')
            self.createMenu()
        elif self.index == self.STATE_CHOISE_MULTIBOOTPLUGIN:
            self.enabled = ConfigYesNo(default=True)
            modes = {'multiboot': 'ItalySat Multiboot',
             'openmultiboot': 'OpenMultiboot'}
            self.pluginmultiboot_type = ConfigSelection(choices=modes, default='multiboot')
            self.createMenu()
开发者ID:kingvuplus,项目名称:boom,代码行数:45,代码来源:InstallWizard.py


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