From: Daniel J. <Dan...@eu...> - 2008-01-30 15:21:50
|
I already tried a similar approach but failed. I will simply try it again with your code and reply to you. Thx for help! -----Original Message----- From: Sebastian Brand [mailto:seb...@in...]=20 Sent: Mittwoch, 30. Januar 2008 16:11 To: Daniel Janz Cc: wix...@li... Subject: Re: [WiX-users] How to check if a edit control is empty? I think you can cascade Conditions logically. Assuming you already have a checkbox or something tied to a property =20 USESQLAUTH: <Publish Event=3D"NewDialog" Value=3D"NextDialog">SERVERNAME <> "" AND =20 DBNAME <> "" AND ((USESQLAUTH =3D 1 AND USERNAME <> "") OR USESQLAUTH = =3D =20 "")</Publish> <Publish Event=3D"SpawnDialog" Value=3D"ErrorDlg">NOT (SERVERNAME <> "" = AND DBNAME <> "" AND ((USESQLAUTH =3D 1 AND USERNAME <> "") OR =20 USESQLAUTH =3D "")</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 =20 > solve, how can I express the following conditions using Wix?: > (C# "Pseudo"-code) > > //This variable indicates whether we should show the next =20 > window or not > bool ShowNextWindow =3D false; > > //First check the essential controls which we need in every =20 > case > if (MyServerNameTextBox.Text !=3D "" && MyDbNameTextBox.Text = !=20 > =3D "") > { > //If the essential part succeeded we look if the user =20 > wants to use SQL-Authentication > if (UseSQLAuthentication =3D=3D true) > { > //If the user wants to use SQL-Auth he has to provide =20 > a username > if (MyUserNameTextBox.Text !=3D "") > { > ShowNextWindow =3D true; > } > else > { > ShowNextWindow =3D false; > } > } > else > { > //If the user uses the alternative authentication we =20 > don't need a username > ShowNextWindow =3D true; > } > } > else > { > //If the essential checks failed we don't display the =20 > next window > ShowNextWindow =3D false; > } > > if (ShowNextWindow =3D=3D true) > { > ShowNextWindow(); > } > else > { > DisplayErrorMessage(); > } > > The whole thing should later do it's work in a Button's <Publish> =20 > tag condition. > > Thanks in advance > Daniel > > From: Daniel Janz > Sent: Mittwoch, 30. Januar 2008 14:07 > To: Daniel Janz; wix...@li... > Subject: RE: [WiX-users] How to check if a edit control is empty? > > Ok, my mistake: > <Publish Event=3D"SpawnDialog" Value=3D"WrongTextInputDialog">DBNAME = =3D =20 > ""</Publish> > <Publish Event=3D"NewDialog" Value=3D"VerifyReadyDialog">PASSWORD =3D = > CONFIRM_PASSWORD AND DBNAME <> ""</Publish> > > This fixes the Problem ;-) > > From: wix...@li... [mailto:wix...@li...=20 > ] On Behalf Of Daniel Janz > Sent: Mittwoch, 30. Januar 2008 14:02 > To: wix...@li... > 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 =20 > already found the MaskedEdit-Control but I think it doesn't meet my =20 > requirements. If I understood this control right, I would have to =20 > define a mask with fixed length. But I need the control to validate =20 > if a server name was filled in and only want to check if the control =20 > was left empty to display an error message. > Is this possible in a simple way? I already tried to check the =20 > property: > <Publish Event=3D"SpawnDialog" Value=3D"WrongTextInputDialog">DBNAME =20 > <>(<>) ""</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...@li... > https://lists.sourceforge.net/lists/listinfo/wix-users |