根据CheckBox值显示WIX对话框 [英] Based on CheckBox value show the WIX Dialog
问题描述
我有安装程序,我必须根据复选框的值显示对话框.我最初将checkbox属性设置为true.
I have instakllation i have to show the Dialog based on the checkbox value. I have set the checkbox property as true initially.
<Property Id="CHECKBOX_1_PROP" Value="TRUE" />
并显示基于复选框值的对话框.如果为true,则必须显示Newdoalog_1;如果为false,则必须显示设置"对话框
And show the dialog based on the check box values. If it is true i have to show the Newdoalog_1 if it is false i have to show the Setup dialog
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Text="[ButtonText_Next]" TabSkip="no" Default="yes">
<Publish Event="SetTargetPath" Value="APPDIR">INSTALL</Publish>
<Publish Event="NewDialog" Value="NewDialog_1">INSTALL AND CHECKBOX_1_PROP="TRUE"</Publish>
<Publish Event="NewDialog" Value="SetupTypeDlg">INSTALL</Publish>
</Control>
<Control Id="CheckBox_1" Type="CheckBox" X="25" Y="164" Width="211" Height="26" Property="CHECKBOX_1_PROP" Text="Do you want to install the Samples" CheckBoxValue="CheckBox" TabSkip="no" Hidden="yes">
<Condition Action="show">INSTALL</Condition>
</Control>
我的问题总是显示为False的设置对话框.
My Problem is always show the Setup Dialog that is False condition.
请对此提供帮助.
推荐答案
我猜测您的复选框未设置字符串文字"TRUE"
,如果未选中,则复选框会完全删除该属性.将该属性设置为任何值("0","true","false",-1")将导致对其进行检查.因此,忽略该值,只需检查属性是否存在.
I'm guessing your checkbox isn't setting the string literal "TRUE"
, check-boxes completely delete the property when unchecked. Setting that property to any value ("0", "true", "false", "-1") would cause it to be checked. So ignore the value, just check if the property exists or not.
<Publish Dialog="MyDlg" Control="Next" Event="NewDialog" Value="CustomDlg1">PROP1</Publish>
<Publish Dialog="MyDlg" Control="Next" Event="NewDialog" Value="CustomDlg2">Not PROP1</Publish>
这篇关于根据CheckBox值显示WIX对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!