2010-02-03 44 views
7

Tôi đang có một chút não bị tan chảy tại thời điểm tôi có Hộp kết nối WiX và khi tôi thay đổi lựa chọn, tôi muốn tắt/bật các điều khiển giao diện người dùng khác.Sử dụng WiX làm cách nào để vô hiệu hóa/bật điều khiển dựa trên thay đổi thuộc tính?

<ComboBox Property="SQLAUTHTYPE"> 
    <ListItem Value="WindowsAuth" Text="Windows Authentication" /> 
    <ListItem Value="SqlAuth" Text="SQL Authentication" /> 
    </ComboBox> 

Đó là khi những sự kiện này được kích hoạt ...

MSI (c) ... PROPERTY CHANGE: Modifying SQLAUTHTYPE property. Its current value is 'WindowsAuth'. Its new value: 'SqlAuth'. 
    MSI (c) ... PROPERTY CHANGE: Modifying SQLAUTHTYPE property. Its current value is 'SqlAuth'. Its new value: 'WindowsAuth'. 

Các điều khiển UI sau đây được gắn cờ là vô hiệu hóa khi WindowsAuth được chọn và kích hoạt khi SqlAuth được chọn ...

<Control Type="Edit" Width="164" Height="16" X="25" Y="149" Id="SQLAccountTextbox" Property="SQLACCOUNT" 
    <Control Type="Edit" Width="164" Height="16" X="190" Y="148" Id="SQLPasswordTextbox" Property="SQLPASSWORD" Password="yes" /> 

Trả lời

12

Điều này sẽ làm điều đó:

<Control Type="Edit" Width="164" Height="16" X="190" Y="148" Id="SQLPasswordTextbox" Property="SQLPASSWORD" Password="yes"> 
    <Condition Action="enable">SQLAUTHTYPE = "SqlAuth"</Condition> 
    <Condition Action="disable">SQLAUTHTYPE = "WindowsAuth"</Condition> 
</Control> 
+0

Hoàn hảo. Tôi không biết tại sao tôi không thể thấy điều đó. – JTew

Các vấn đề liên quan