如果Dialog文本框无效/无值,如何在msi中禁用下一个按钮? [英] How to disable next button in msi if Dialog textbox has invalid/no value?

查看:72
本文介绍了如果Dialog文本框无效/无值,如何在msi中禁用下一个按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了安装Windows服务的安装项目。我已经在已经存在的对话框中添加了额外的对话框,该对话框应该提示用户2参数。如果用户在文本框中没有输入任何数据,则禁用下一个按钮安装时间。

解决方案

如果您能够创建一个新窗口以获取用户的详细信息,那么您必须能够获得他的详细信息。 。例如,如果您创建了一个新对话框,然后又返回该值(您将进一步使用该值)。您可以将该值检查为null或有用。



  if (valueReturned!=  null && valueReturned ==有用){
// 其中valueReturned是用户提供的价值
// 有用的是要检查的内容,因为你有确保
// 值也正确;例如产品密钥等。
}





但除此之外,我建议您尝试在用户向您提供有效数据之前,请勿关闭该对话框。如果用户未提供数据,请在此时终止该过程。这样,您可以在该阶段自动提示用户输入值,而不是检查返回的值并禁用该按钮。 :)


I have created setup project to install windows service.In that i have added extra dialog box to already existing dialog box which should prompt user 2 parameter .how to disable next button if user does not enter any data into the text boxes during the installation time.

解决方案

If you are able to create a new window to get detailed information from the user, then you must be able to get the detailed interactions of his. For example, if you created a new dialog box and which in turn returns the value (which you would use further). You can check that value to be null or useful.

if(valueReturned != null && valueReturned == useful) {
   // Where valueReturned is the value user would provide
   // useful is what to check against, because you have to make sure
   // value is correct also; such as Product key etc.
}



But, apart from this I would recommend that you try to not close that dialog until user has provided you with a valid data. If user has not provided data, terminate the process at that time. This way, instead of checking the returned value and disabling the button you will be able to prompt the user for value at that stage itself. :)


这篇关于如果Dialog文本框无效/无值,如何在msi中禁用下一个按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆