I think you can cascade Conditions logically.

Assuming you already have a checkbox or something tied to a property  
USESQLAUTH:

<Publish Event="NewDialog" Value="NextDialog">SERVERNAME <> "" AND  
DBNAME <> "" AND ((USESQLAUTH = 1 AND USERNAME <> "") OR USESQLAUTH =  
"")</Publish>

<Publish Event="SpawnDialog" Value="ErrorDlg">NOT (SERVERNAME <> ""  
AND DBNAME <> "" AND ((USESQLAUTH = 1 AND USERNAME <> "") OR  
USESQLAUTH = "")</Publish>

Best regards,
Sebastian Brand

Instyler Software - http://www.instyler.com


On Jan 30, 2008, at 15:36 , Daniel Janz wrote:

> I’ve just found a other problem which I’m currently not able to  
> solve, how can I express the following conditions using Wix?:
> (C# “Pseudo”-code)
>
>          //This variable indicates whether we should show the next  
> window or not
>          bool ShowNextWindow = false;
>
>          //First check the essential controls which we need in every  
> case
>          if (MyServerNameTextBox.Text != "" && MyDbNameTextBox.Text ! 
> = "")
>          {
>             //If the essential part succeeded we look if the user  
> wants to use SQL-Authentication
>             if (UseSQLAuthentication == true)
>             {
>                //If the user wants to use SQL-Auth he has to provide  
> a username
>                if (MyUserNameTextBox.Text != "")
>                {
>                   ShowNextWindow = true;
>                }
>                else
>                {
>                   ShowNextWindow = false;
>                }
>             }
>             else
>             {
>                //If the user uses the alternative authentication we  
> don't need a username
>                ShowNextWindow = true;
>             }
>          }
>          else
>          {
>             //If the essential checks failed we don't display the  
> next window
>             ShowNextWindow = false;
>          }
>
>          if (ShowNextWindow == true)
>          {
>             ShowNextWindow();
>          }
>          else
>          {
>             DisplayErrorMessage();
>          }
>
> The whole thing should later do it’s work in a Button’s <Publish>  
> tag condition.
>
> Thanks in advance
> Daniel
>
> From: Daniel Janz
> Sent: Mittwoch, 30. Januar 2008 14:07
> To: Daniel Janz; wix-users@lists.sourceforge.net
> Subject: RE: [WiX-users] How to check if a edit control is empty?
>
> Ok, my mistake:
> <Publish Event="SpawnDialog" Value="WrongTextInputDialog">DBNAME =  
> ""</Publish>
> <Publish Event="NewDialog" Value="VerifyReadyDialog">PASSWORD =  
> CONFIRM_PASSWORD AND DBNAME &lt;&gt; ""</Publish>
>
> This fixes the Problem ;-)
>
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> ] On Behalf Of Daniel Janz
> Sent: Mittwoch, 30. Januar 2008 14:02
> To: wix-users@lists.sourceforge.net
> Subject: [WiX-users] How to check if a edit control is empty?
>
> Hi,
>
> I currently try to check if a Edit-Control is empty (has no text), I  
> already found the MaskedEdit-Control but I think it doesn’t meet my  
> requirements. If I understood this control right, I would have to  
> define a mask with fixed length. But I need the control to validate  
> if a server name was filled in and only want to check if the control  
> was left empty to display an error message.
> Is this possible in a simple way? I already tried to check the  
> property:
> <Publish Event="SpawnDialog" Value="WrongTextInputDialog">DBNAME  
> <>(&lt;&gt;) ""</Publish>
> But it doesn’t work like expected.
>
> Would be grateful for any help.
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to