在WiX中新建对话框,单击后退跳过对话框 [英] New dialog in WiX, clicking Back skips the dialog

查看:152
本文介绍了在WiX中新建对话框,单击后退跳过对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Wii的新手,尝试通过添加新的对话框来自定义对话队列。新对话框的名称为ServerChoice,流程为:

I'm newbie in WiX and trying to customize dialog queue by adding the new one. The new dialog's name is ServerChoice and the flow is:

SetupTypeDlg < - >完整或典型的< - > ServerChoice< - > VerifyReadyDlg

SetupTypeDlg <-> Full or Typical <-> ServerChoice <-> VerifyReadyDlg

SetupTypeDlg < - > Custom< - > CustomizeDlg< - > ServerChoice< - > VerifyReadyDlg

SetupTypeDlg <-> Custom <-> CustomizeDlg <-> ServerChoice <-> VerifyReadyDlg

唯一的问题是在第一种情况下在VerifyReadyDlg。 'Back'带我到SetupTypeDlg并且跳过ServerChoice,尽管在第二个流中它按照需要工作。

The only problem is in the first case at VerifyReadyDlg. 'Back' takes me to SetupTypeDlg and skips ServerChoice although in the second flow it works as required.

资料来源:

<UI>
        <DialogRef Id="ServerChoice" />
        <Publish Dialog="SetupTypeDlg" Control="TypicalButton" Event="NewDialog" Value="ServerChoice">1</Publish>
        <Publish Dialog="SetupTypeDlg" Control="CompleteButton" Event="NewDialog" Value="ServerChoice">1</Publish>
        <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="ServerChoice">1</Publish>
        <Publish Dialog="ServerChoice" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
        <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="ServerChoice">1</Publish>
        <Publish Dialog="ServerChoice" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="1">WixUI_InstallMode = "InstallCustom"</Publish>
        <Publish Dialog="ServerChoice" Control="Back" Event="NewDialog" Value="SetupTypeDlg" Order="2">WixUI_InstallMode = "InstallTypical" OR WixUI_InstallMode = "InstallComplete"</Publish>
        <Publish Dialog="ServerChoice" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="3">WixUI_InstallMode = "Change"</Publish>
        <Publish Dialog="ServerChoice" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="4">WixUI_InstallMode = "Repair" OR WixUI_InstallMode = "Remove"</Publish>
    </UI>

有些帮助新手?你的引用(Mondo?)是什么类型的用户界面?

Some help for a newbie? :)

推荐答案

您的代码中不存在此信息。我认为爸爸的评论是对的,你可能有多个事件为后退按钮,因为Mondo本身挂钩自己的处理程序在这个按钮单击事件。

What type of UI are you referencing (Mondo?). This information is not present in your piece of code. I think daddyman's comment is right, you probably have multiple events for that Back button, since Mondo itself hooks its own 'handlers' on this button-click event.

我最近创建了一个自定义UI对话框,我的方法根本没有引用WiXUI_Mondo。而不是,我创建了我自己的新的UI基于Mondo源代码(你必须检查WiX源)。最后我有这个代码(不相关的代码部分被删除),它的工作正常。

I have created a custom UI dialog flow recently and my approach was not referencing WiXUI_Mondo at all. Instead of it, I created my own new UI based on Mondo source code (you have to check WiX sources). At the end I have this code (irrelevant code parts have been removed) and it works fine.

<Fragment>  
    <!-- this is based on the WixUI_Mondo dialog set -->
    <UI Id="WixUI_MyNewUI">
        <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
        <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
        <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />

        <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
        <Property Id="WixUI_Mode" Value="Mondo" />

        <DialogRef Id="ErrorDlg" />
        <DialogRef Id="FatalError" />
        <DialogRef Id="FilesInUse" />
        <DialogRef Id="MsiRMFilesInUse" />
        <DialogRef Id="PrepareDlg" />
        <DialogRef Id="ProgressDlg" />
        <DialogRef Id="ResumeDlg" />
        <DialogRef Id="UserExit" />

        <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="CustomizeDlg">1</Publish>
        <!-- we do not use the SetupTypeDlg which allows user to choose either Typical, Complete or Custom installation; this ensures InstallCustom schema is run -->
        <Publish Dialog="WelcomeDlg" Control="Next" Property="WixUI_InstallMode" Value="InstallCustom" Order="2">1</Publish>

        <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2">WixUI_InstallMode = "InstallCustom"</Publish>
        <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="MyDlg1">1</Publish>

        <Publish Dialog="MyDlg1" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="1">MY_CONDITION_PROPERTY = 0</Publish>
        <Publish Dialog="MyDlg1" Control="Next" Event="NewDialog" Value="MyDlg2" Order="2">MY_CONDITION_PROPERTY = 1</Publish>

        <Publish Dialog="MyDlg2" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="1" />
        <Publish Dialog="MyDlg2" Control="Back" Event="NewDialog" Value="MyDlg1">1</Publish>


        <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MyDlg1" Order="1">WixUI_InstallMode = "InstallCustom" and MY_CONDITION_PROPERTY = 0</Publish>
        <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MyDlg2" Order="2">WixUI_InstallMode = "InstallCustom" and MY_CONDITION_PROPERTY = 1</Publish>      
    </UI>

    <UIRef Id="WixUI_Common" />
    <UIRef Id="WixUI_ErrorProgressText" />
</Fragment>

这篇关于在WiX中新建对话框,单击后退跳过对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆