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


Python Flash.close方法代码示例

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


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

示例1: close

# 需要导入模块: from gui.Scaleform.Flash import Flash [as 别名]
# 或者: from gui.Scaleform.Flash.Flash import close [as 别名]
 def close(self):
     self.component.script = None
     Flash.close(self)
     return
开发者ID:webiumsk,项目名称:WOT0.10.0,代码行数:6,代码来源:windows.py

示例2: LogitechMonitorEntry

# 需要导入模块: from gui.Scaleform.Flash import Flash [as 别名]
# 或者: from gui.Scaleform.Flash.Flash import close [as 别名]
class LogitechMonitorEntry(object):
    """
    LogitechMonitor still uses AS2, cause it's an old crap.
    Monitor lives from start to the client's end, cause we use same flash object for all screens
    We embed different logic in screens which works with same flash object
    """

    def __init__(self):
        super(LogitechMonitorEntry, self).__init__()
        self.__navigator = _ScreenNavigator()
        self.__flashObject = None
        self.__screen = None
        self.__screenName = None
        self.__frame = None
        self.__clearDeviceInfo()
        return

    @property
    def isInitialized(self):
        """
        :return: lcd was initialized and we've got notification and performed initial setup
        """
        return self.__width != 0 and self.__height != 0

    @property
    def isColored(self):
        return self.__isColored

    @property
    def component(self):
        if self.__flashObject:
            return self.__flashObject.component
        else:
            return None

    @property
    def screen(self):
        """
        :return: Returns screen name
        """
        return self.__screenName

    def activate(self):
        if LcdKeyboard.g_instance:
            LcdKeyboard.g_instance.changeNotifyCallback = self.__onMonitorInitialized
        else:
            LOG_DEBUG("Can't activate")

    def close(self):
        if LcdKeyboard.g_instance:
            LcdKeyboard.g_instance.changeNotifyCallback = None
        self._stop()
        return

    def startScreen(self, screenName):
        if not screenName is not None:
            raise AssertionError
            self.isInitialized or LOG_WARNING("Monitor isn't active yet. Ignore.", screenName)
            return
        elif screenName == self.__screenName:
            LOG_DEBUG('Requested screen is active already. Ignore', screenName)
            return
        else:
            self.__startScreen(screenName)
            return

    def changeView(self):
        """
        Switch to the next view inside screen if it has more than one
        """
        if self.__screen is not None:
            LOG_DEBUG('Changing view')
            self.__screen.as_changeViewS()
        else:
            LOG_WARNING("No active screen. Can't change view.")
        return

    def _start(self, isColored, width, height):
        LOG_DEBUG('Starting monitor', isColored, width, height)
        self.__isColored = isColored
        self.__width = width
        self.__height = height
        self.__navigator.start(weakref.proxy(self))
        g_keyEventHandlers.add(self.__handleKeyEvent)

    def _stop(self):
        self.__clearDeviceInfo()
        self.__navigator.stop()
        if self.__handleKeyEvent in g_keyEventHandlers:
            g_keyEventHandlers.remove(self.__handleKeyEvent)
        self.__stopCurrentScreen()
        self.__releaseFlash()

    def __onMonitorInitialized(self, isEnabled, isColored, width, height):
        """
        Currently it's fired only if device is created or released while callback is set
        :param isEnabled if device is initialized, otherwise it's released
        """
        if self.isInitialized == isEnabled and self.__isColored == isColored and self.__width == width and self.__height:
            LOG_DEBUG('Monitor is initialized already. Ignore.')
#.........这里部分代码省略.........
开发者ID:webiumsk,项目名称:WOT-0.9.15-CT,代码行数:103,代码来源:logitech_monitor.py


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