systemsettings.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:wintenApps 作者: josephsl 项目源码 文件源码
def event_liveRegionChange(self, obj, nextHandler):
        if isinstance(obj, UIA) and obj.name != self._nameChangeCache:
            automationID = obj.UIAElement.cachedAutomationID
            try:
                # Don't repeat the fact that update download/installation is in progress if progress bar beep is on.
                if ((automationID == "SystemSettings_MusUpdate_UpdateStatus_DescriptionTextBlock" and obj.previous.value <= "0")
                # For search progress bar, do not repeat it.
                or (automationID == "ProgressBar")
                # Do not announce "result not found" error unless have to.
                or (automationID == "NoResultsFoundTextBlock" and obj.parent.UIAElement.cachedAutomationID == "StatusTextPopup")
                # But announce individual update progress in build 16215 and later.
                or ("ApplicableUpdate" in automationID and automationID.endswith("_ContextDescriptionTextBlock"))):
                    self._nameChangeCache = obj.name
                    # Until the spacing problem is fixed for update label...
                    if "ApplicableUpdate" in automationID and automationID.endswith("_ContextDescriptionTextBlock"):
                        ui.message(" ".join([obj.parent.name, obj.name]))
                    else:
                        ui.message(obj.name)
                    # And no, never allow double-speaking (an ugly hack).
                    return
            except AttributeError:
                pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号