您好我尝试从单选按钮启动自定义操作,但意识到这无法完成。相反,我创建了两个复选框。我希望他们有一个我已经完成的共享属性,如我的代码中所示,但我需要用户一次只能选择一个而不是两个。
继承我的代码:
<Control Id="CheckBoxLock" Type="CheckBox" Text="DiskID/NIC Adapter Address" Property="LOCKTYPE" X="50" Y="215" Width="200" Height="15" CheckBoxValue="0">
</Control>
<Control Id="CheckBoxLock2" Type="CheckBox" Text="Hardware Key Serial Number" CheckBoxPropertyRef="LOCKTYPE" X="50" Y="230" Width="200" Height="15" CheckBoxValue="1">
<Publish Event="DoAction" Value="OnLockOptionModified"><![CDATA[LOCKTYPE = "1"]]></Publish>
</Control>
非常感谢任何帮助。感谢
答案 0 :(得分:1)
很好的解决方法,但我创造了一个可行的工作:
<Control Id="CheckBoxLock" Type="CheckBox" Text="DiskID/NIC Adapter Address" Property="LOCKTYPESW" X="90" Y="215" Width="200" Height="15" CheckBoxValue="0">
<Publish Property="LOCKTYPE" Value="[LOCKTYPESW]">1</Publish>
<Publish Property="LOCKTYPEHW" Value="{}">1</Publish>
<Publish Event="DoAction" Value="OnLockOptionModified"><![CDATA[LOCKTYPE = "0"]]></Publish>
</Control>
<Control Id="CheckBoxLock2" Type="CheckBox" Text="Hardware Key Serial Number" Property="LOCKTYPEHW" X="90" Y="230" Width="200" Height="15" CheckBoxValue="1">
<Publish Property="LOCKTYPE" Value="[LOCKTYPEHW]">1</Publish>
<Publish Property="LOCKTYPESW" Value="{}">1</Publish>
<Publish Event="DoAction" Value="OnLockOptionModified"><![CDATA[LOCKTYPE = "1"]]></Publish>
</Control>
然后我的自定义操作会读取LOCKTYPE
属性。希望这可以帮助别人,因为它花了我两个小时搞清楚.. :)