0

嗨,我试图从单选按钮启动自定义操作,但意识到这无法完成。相反,我创建了两个复选框。我希望他们有一个共享属性,我已经这样做了,如我的代码中所示,但我需要用户一次只能选择一个,而不是两者都选择。

这是我的代码:

    <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>

任何帮助将不胜感激。谢谢

4

1 回答 1

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属性。希望这对其他人有帮助,因为我花了两个小时才弄清楚..:)

于 2012-09-27T15:24:34.323 回答