• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python msilib.Dialog类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: __init__

 def __init__(self, *args, **kw):
     """Dialog(database, name, x, y, w, h, attributes, title, first,
     default, cancel, bitmap=true)"""
     Dialog.__init__(self, *args)
     ruler = self.h - 36
     #if kw.get("bitmap", True):
     #    self.bitmap("Bitmap", 0, 0, bmwidth, ruler, "PythonWin")
     self.line("BottomLine", 0, ruler, self.w, 0)
开发者ID:mantidproject,项目名称:3rdpartylibs-win64,代码行数:8,代码来源:bdist_msi.py


示例2: __init__

 def __init__(self, *args, **kw):
     """Dialog(database, name, x, y, w, h, attributes, title, first,
     default, cancel, bitmap=False)"""
     Dialog.__init__(self, *args)
     ruler = self.h - 36
     bmwidth = 152*ruler/328
     self.has_bitmap = kw.get("bitmap", False)
     if self.has_bitmap:
         self.bitmap("Bitmap", 0, 0, bmwidth, ruler, "InstallerBitmap")
     self.line("BottomLine", 0, ruler, self.w, 0)
开发者ID:project-renard-survey,项目名称:xerox-parc-uplib-mirror,代码行数:10,代码来源:build-msi-installer.py


示例3: add_ui

    def add_ui(self):
        db = self.db
        x = y = 50
        w = 370
        h = 300
        title = "[ProductName] Setup"

        # see "Dialog Style Bits"
        modal = 3      # visible | modal
        modeless = 1   # visible
        track_disk_space = 32

        # UI customization properties
        add_data(db, "Property",
                 # See "DefaultUIFont Property"
                 [("DefaultUIFont", "DlgFont8"),
                  # See "ErrorDialog Style Bit"
                  ("ErrorDialog", "ErrorDlg"),
                  ("Progress1", "Install"),   # modified in maintenance type dlg
                  ("Progress2", "installs"),
                  ("MaintenanceForm_Action", "Repair"),
                  # possible values: ALL, JUSTME
                  ("WhichUsers", "ALL")
                 ])

        # Fonts, see "TextStyle Table"
        add_data(db, "TextStyle",
                 [("DlgFont8", "Tahoma", 9, None, 0),
                  ("DlgFontBold8", "Tahoma", 8, None, 1), #bold
                  ("VerdanaBold10", "Verdana", 10, None, 1),
                  ("VerdanaRed9", "Verdana", 9, 255, 0),
                 ])

        # UI Sequences, see "InstallUISequence Table", "Using a Sequence Table"
        # Numbers indicate sequence; see sequence.py for how these action integrate
        add_data(db, "InstallUISequence",
                 [("PrepareDlg", "Not Privileged or Windows9x or Installed", 140),
                  ("WhichUsersDlg", "Privileged and not Windows9x and not Installed", 141),
                  # In the user interface, assume all-users installation if privileged.
                  ("SelectFeaturesDlg", "Not Installed", 1230),
                  # XXX no support for resume installations yet
                  #("ResumeDlg", "Installed AND (RESUME OR Preselected)", 1240),
                  ("MaintenanceTypeDlg", "Installed AND NOT RESUME AND NOT Preselected", 1250),
                  ("ProgressDlg", None, 1280)])

        add_data(db, 'ActionText', text.ActionText)
        add_data(db, 'UIText', text.UIText)
        #####################################################################
        # Standard dialogs: FatalError, UserExit, ExitDialog
        fatal=PyDialog(db, "FatalError", x, y, w, h, modal, title,
                     "Finish", "Finish", "Finish")
        fatal.title("[ProductName] Installer ended prematurely")
        fatal.back("< Back", "Finish", active = 0)
        fatal.cancel("Cancel", "Back", active = 0)
        fatal.text("Description1", 15, 70, 320, 80, 0x30003,
                   "[ProductName] setup ended prematurely because of an error.  Your system has not been modified.  To install this program at a later time, please run the installation again.")
        fatal.text("Description2", 15, 155, 320, 20, 0x30003,
                   "Click the Finish button to exit the Installer.")
        c=fatal.next("Finish", "Cancel", name="Finish")
        c.event("EndDialog", "Exit")

        user_exit=PyDialog(db, "UserExit", x, y, w, h, modal, title,
                     "Finish", "Finish", "Finish")
        user_exit.title("[ProductName] Installer was interrupted")
        user_exit.back("< Back", "Finish", active = 0)
        user_exit.cancel("Cancel", "Back", active = 0)
        user_exit.text("Description1", 15, 70, 320, 80, 0x30003,
                   "[ProductName] setup was interrupted.  Your system has not been modified.  "
                   "To install this program at a later time, please run the installation again.")
        user_exit.text("Description2", 15, 155, 320, 20, 0x30003,
                   "Click the Finish button to exit the Installer.")
        c = user_exit.next("Finish", "Cancel", name="Finish")
        c.event("EndDialog", "Exit")

        exit_dialog = PyDialog(db, "ExitDialog", x, y, w, h, modal, title,
                             "Finish", "Finish", "Finish")
        exit_dialog.title("Completing the [ProductName] Installer")
        exit_dialog.back("< Back", "Finish", active = 0)
        exit_dialog.cancel("Cancel", "Back", active = 0)
        exit_dialog.text("Description", 15, 235, 320, 20, 0x30003,
                   "Click the Finish button to exit the Installer.")
        c = exit_dialog.next("Finish", "Cancel", name="Finish")
        c.event("EndDialog", "Return")

        #####################################################################
        # Required dialog: FilesInUse, ErrorDlg
        inuse = PyDialog(db, "FilesInUse",
                         x, y, w, h,
                         19,                # KeepModeless|Modal|Visible
                         title,
                         "Retry", "Retry", "Retry", bitmap=False)
        inuse.text("Title", 15, 6, 200, 15, 0x30003,
                   r"{\DlgFontBold8}Files in Use")
        inuse.text("Description", 20, 23, 280, 20, 0x30003,
               "Some files that need to be updated are currently in use.")
        inuse.text("Text", 20, 55, 330, 50, 3,
                   "The following applications are using files that need to be updated by this setup. Close these applications and then click Retry to continue the installation or Cancel to exit it.")
        inuse.control("List", "ListBox", 20, 107, 330, 130, 7, "FileInUseProcess",
                      None, None, None)
        c=inuse.back("Exit", "Ignore", name="Exit")
#.........这里部分代码省略.........
开发者ID:Eyepea,项目名称:cpython,代码行数:101,代码来源:bdist_msi.py


示例4: add_ui

    def add_ui(self):
        db = self.db
        x = y = 50
        w = 370
        h = 300
        title = "[ProductName] Setup"
        modal = 3
        modeless = 1
        add_data(
            db,
            "Property",
            [
                ("DefaultUIFont", "DlgFont8"),
                ("ErrorDialog", "ErrorDlg"),
                ("Progress1", "Install"),
                ("Progress2", "installs"),
                ("MaintenanceForm_Action", "Repair"),
                ("WhichUsers", "ALL"),
            ],
        )
        add_data(
            db,
            "TextStyle",
            [
                ("DlgFont8", "Tahoma", 9, None, 0),
                ("DlgFontBold8", "Tahoma", 8, None, 1),
                ("VerdanaBold10", "Verdana", 10, None, 1),
                ("VerdanaRed9", "Verdana", 9, 255, 0),
            ],
        )
        add_data(
            db,
            "InstallUISequence",
            [
                ("PrepareDlg", "Not Privileged or Windows9x or Installed", 140),
                ("WhichUsersDlg", "Privileged and not Windows9x and not Installed", 141),
                ("SelectFeaturesDlg", "Not Installed", 1230),
                ("MaintenanceTypeDlg", "Installed AND NOT RESUME AND NOT Preselected", 1250),
                ("ProgressDlg", None, 1280),
            ],
        )
        add_data(db, "ActionText", text.ActionText)
        add_data(db, "UIText", text.UIText)
        fatal = PyDialog(db, "FatalError", x, y, w, h, modal, title, "Finish", "Finish", "Finish")
        fatal.title("[ProductName] Installer ended prematurely")
        fatal.back("< Back", "Finish", active=0)
        fatal.cancel("Cancel", "Back", active=0)
        fatal.text(
            "Description1",
            15,
            70,
            320,
            80,
            196611,
            "[ProductName] setup ended prematurely because of an error.  Your system has not been modified.  To install this program at a later time, please run the installation again.",
        )
        fatal.text("Description2", 15, 155, 320, 20, 196611, "Click the Finish button to exit the Installer.")
        c = fatal.next("Finish", "Cancel", name="Finish")
        c.event("EndDialog", "Exit")
        user_exit = PyDialog(db, "UserExit", x, y, w, h, modal, title, "Finish", "Finish", "Finish")
        user_exit.title("[ProductName] Installer was interrupted")
        user_exit.back("< Back", "Finish", active=0)
        user_exit.cancel("Cancel", "Back", active=0)
        user_exit.text(
            "Description1",
            15,
            70,
            320,
            80,
            196611,
            "[ProductName] setup was interrupted.  Your system has not been modified.  To install this program at a later time, please run the installation again.",
        )
        user_exit.text("Description2", 15, 155, 320, 20, 196611, "Click the Finish button to exit the Installer.")
        c = user_exit.next("Finish", "Cancel", name="Finish")
        c.event("EndDialog", "Exit")
        exit_dialog = PyDialog(db, "ExitDialog", x, y, w, h, modal, title, "Finish", "Finish", "Finish")
        exit_dialog.title("Completing the [ProductName] Installer")
        exit_dialog.back("< Back", "Finish", active=0)
        exit_dialog.cancel("Cancel", "Back", active=0)
        exit_dialog.text("Description", 15, 235, 320, 20, 196611, "Click the Finish button to exit the Installer.")
        c = exit_dialog.next("Finish", "Cancel", name="Finish")
        c.event("EndDialog", "Return")
        inuse = PyDialog(db, "FilesInUse", x, y, w, h, 19, title, "Retry", "Retry", "Retry", bitmap=False)
        inuse.text("Title", 15, 6, 200, 15, 196611, "{\\DlgFontBold8}Files in Use")
        inuse.text("Description", 20, 23, 280, 20, 196611, "Some files that need to be updated are currently in use.")
        inuse.text(
            "Text",
            20,
            55,
            330,
            50,
            3,
            "The following applications are using files that need to be updated by this setup. Close these applications and then click Retry to continue the installation or Cancel to exit it.",
        )
        inuse.control("List", "ListBox", 20, 107, 330, 130, 7, "FileInUseProcess", None, None, None)
        c = inuse.back("Exit", "Ignore", name="Exit")
        c.event("EndDialog", "Exit")
        c = inuse.next("Ignore", "Retry", name="Ignore")
        c.event("EndDialog", "Ignore")
        c = inuse.cancel("Retry", "Exit", name="Retry")
#.........这里部分代码省略.........
开发者ID:webiumsk,项目名称:WOT-0.9.12,代码行数:101,代码来源:bdist_msi.py


示例5: add_ui

    def add_ui(self):
        db = self.db
        x = y = 50
        w = 370
        h = 300
        title = '[ProductName] Setup'
        modal = 3
        modeless = 1
        add_data(db, 'Property', [('DefaultUIFont', 'DlgFont8'),
         ('ErrorDialog', 'ErrorDlg'),
         ('Progress1', 'Install'),
         ('Progress2', 'installs'),
         ('MaintenanceForm_Action', 'Repair'),
         ('WhichUsers', 'ALL')])
        add_data(db, 'TextStyle', [('DlgFont8', 'Tahoma', 9, None, 0),
         ('DlgFontBold8', 'Tahoma', 8, None, 1),
         ('VerdanaBold10', 'Verdana', 10, None, 1),
         ('VerdanaRed9', 'Verdana', 9, 255, 0)])
        add_data(db, 'InstallUISequence', [('PrepareDlg', 'Not Privileged or Windows9x or Installed', 140),
         ('WhichUsersDlg', 'Privileged and not Windows9x and not Installed', 141),
         ('SelectFeaturesDlg', 'Not Installed', 1230),
         ('MaintenanceTypeDlg', 'Installed AND NOT RESUME AND NOT Preselected', 1250),
         ('ProgressDlg', None, 1280)])
        add_data(db, 'ActionText', text.ActionText)
        add_data(db, 'UIText', text.UIText)
        fatal = PyDialog(db, 'FatalError', x, y, w, h, modal, title, 'Finish', 'Finish', 'Finish')
        fatal.title('[ProductName] Installer ended prematurely')
        fatal.back('< Back', 'Finish', active=0)
        fatal.cancel('Cancel', 'Back', active=0)
        fatal.text('Description1', 15, 70, 320, 80, 196611, '[ProductName] setup ended prematurely because of an error.  Your system has not been modified.  To install this program at a later time, please run the installation again.')
        fatal.text('Description2', 15, 155, 320, 20, 196611, 'Click the Finish button to exit the Installer.')
        c = fatal.next('Finish', 'Cancel', name='Finish')
        c.event('EndDialog', 'Exit')
        user_exit = PyDialog(db, 'UserExit', x, y, w, h, modal, title, 'Finish', 'Finish', 'Finish')
        user_exit.title('[ProductName] Installer was interrupted')
        user_exit.back('< Back', 'Finish', active=0)
        user_exit.cancel('Cancel', 'Back', active=0)
        user_exit.text('Description1', 15, 70, 320, 80, 196611, '[ProductName] setup was interrupted.  Your system has not been modified.  To install this program at a later time, please run the installation again.')
        user_exit.text('Description2', 15, 155, 320, 20, 196611, 'Click the Finish button to exit the Installer.')
        c = user_exit.next('Finish', 'Cancel', name='Finish')
        c.event('EndDialog', 'Exit')
        exit_dialog = PyDialog(db, 'ExitDialog', x, y, w, h, modal, title, 'Finish', 'Finish', 'Finish')
        exit_dialog.title('Completing the [ProductName] Installer')
        exit_dialog.back('< Back', 'Finish', active=0)
        exit_dialog.cancel('Cancel', 'Back', active=0)
        exit_dialog.text('Description', 15, 235, 320, 20, 196611, 'Click the Finish button to exit the Installer.')
        c = exit_dialog.next('Finish', 'Cancel', name='Finish')
        c.event('EndDialog', 'Return')
        inuse = PyDialog(db, 'FilesInUse', x, y, w, h, 19, title, 'Retry', 'Retry', 'Retry', bitmap=False)
        inuse.text('Title', 15, 6, 200, 15, 196611, '{\\DlgFontBold8}Files in Use')
        inuse.text('Description', 20, 23, 280, 20, 196611, 'Some files that need to be updated are currently in use.')
        inuse.text('Text', 20, 55, 330, 50, 3, 'The following applications are using files that need to be updated by this setup. Close these applications and then click Retry to continue the installation or Cancel to exit it.')
        inuse.control('List', 'ListBox', 20, 107, 330, 130, 7, 'FileInUseProcess', None, None, None)
        c = inuse.back('Exit', 'Ignore', name='Exit')
        c.event('EndDialog', 'Exit')
        c = inuse.next('Ignore', 'Retry', name='Ignore')
        c.event('EndDialog', 'Ignore')
        c = inuse.cancel('Retry', 'Exit', name='Retry')
        c.event('EndDialog', 'Retry')
        error = Dialog(db, 'ErrorDlg', 50, 10, 330, 101, 65543, title, 'ErrorText', None, None)
        error.text('ErrorText', 50, 9, 280, 48, 3, '')
        error.pushbutton('N', 120, 72, 81, 21, 3, 'No', None).event('EndDialog', 'ErrorNo')
        error.pushbutton('Y', 240, 72, 81, 21, 3, 'Yes', None).event('EndDialog', 'ErrorYes')
        error.pushbutton('A', 0, 72, 81, 21, 3, 'Abort', None).event('EndDialog', 'ErrorAbort')
        error.pushbutton('C', 42, 72, 81, 21, 3, 'Cancel', None).event('EndDialog', 'ErrorCancel')
        error.pushbutton('I', 81, 72, 81, 21, 3, 'Ignore', None).event('EndDialog', 'ErrorIgnore')
        error.pushbutton('O', 159, 72, 81, 21, 3, 'Ok', None).event('EndDialog', 'ErrorOk')
        error.pushbutton('R', 198, 72, 81, 21, 3, 'Retry', None).event('EndDialog', 'ErrorRetry')
        cancel = Dialog(db, 'CancelDlg', 50, 10, 260, 85, 3, title, 'No', 'No', 'No')
        cancel.text('Text', 48, 15, 194, 30, 3, 'Are you sure you want to cancel [ProductName] installation?')
        c = cancel.pushbutton('Yes', 72, 57, 56, 17, 3, 'Yes', 'No')
        c.event('EndDialog', 'Exit')
        c = cancel.pushbutton('No', 132, 57, 56, 17, 3, 'No', 'Yes')
        c.event('EndDialog', 'Return')
        costing = Dialog(db, 'WaitForCostingDlg', 50, 10, 260, 85, modal, title, 'Return', 'Return', 'Return')
        costing.text('Text', 48, 15, 194, 30, 3, 'Please wait while the installer finishes determining your disk space requirements.')
        c = costing.pushbutton('Return', 102, 57, 56, 17, 3, 'Return', None)
        c.event('EndDialog', 'Exit')
        prep = PyDialog(db, 'PrepareDlg', x, y, w, h, modeless, title, 'Cancel', 'Cancel', 'Cancel')
        prep.text('Description', 15, 70, 320, 40, 196611, 'Please wait while the Installer prepares to guide you through the installation.')
        prep.title('Welcome to the [ProductName] Installer')
        c = prep.text('ActionText', 15, 110, 320, 20, 196611, 'Pondering...')
        c.mapping('ActionText', 'Text')
        c = prep.text('ActionData', 15, 135, 320, 30, 196611, None)
        c.mapping('ActionData', 'Text')
        prep.back('Back', None, active=0)
        prep.next('Next', None, active=0)
        c = prep.cancel('Cancel', None)
        c.event('SpawnDialog', 'CancelDlg')
        seldlg = PyDialog(db, 'SelectFeaturesDlg', x, y, w, h, modal, title, 'Next', 'Next', 'Cancel')
        seldlg.title('Select Python Installations')
        seldlg.text('Hint', 15, 30, 300, 20, 3, 'Select the Python locations where %s should be installed.' % self.distribution.get_fullname())
        seldlg.back('< Back', None, active=0)
        c = seldlg.next('Next >', 'Cancel')
        order = 1
        c.event('[TARGETDIR]', '[SourceDir]', ordering=order)
        for version in self.versions + [self.other_version]:
            order += 1
            c.event('[TARGETDIR]', '[TARGETDIR%s]' % version, 'FEATURE_SELECTED AND &Python%s=3' % version, ordering=order)

#.........这里部分代码省略.........
开发者ID:webiumsk,项目名称:WOT-0.9.14-CT,代码行数:101,代码来源:bdist_msi.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python mslib.wait_for_element_present函数代码示例发布时间:2022-05-27
下一篇:
Python msilib.add_data函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap